Button.vue 788 Bytes
<template>
  <el-button
    :style="{
      background: backgroundColor,
      color: textColor,
      borderColor: backgroundColor === '#FFFFFF' ? '#dcdfe6' : backgroundColor
    }"
    :disabled="disabled"
    @click.stop="buttonClick"
  >
    <slot>按钮</slot>
  </el-button>
</template>
<script>
export default {
  name: 'RcButton',
  components: {},
  props: {
    backgroundColor: {
      type: String,
      default: '#009688'
    },
    textColor: {
      type: String,
      default: '#FFFFFF'
    },
    disabled: {
      type: Boolean,
      default() {
        return false
      }
    }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {
  },
  methods: {
    buttonClick() {
      this.$emit('buttonClick')
    }
  }
}
</script>