1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<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>