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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
| <!--
| * @Author: 张嘉彬
| * @Date: 2022-03-04 10:42:47
| * @Description: 自定义表格内按钮
| -->
| <template>
| <el-button :size="btnStyle.size" :disabled='disabled' :type="btnStyle.type==='text'?'text':type"
| @click="clickBtn" :icon="icon" :plain='plain' :loading='loading'>
| <slot></slot>
| </el-button>
| </template>
|
| <script>
| export default {
| props: {
| // medium / small / mini
| size: {
| type: String,
| default: 'small'
| },
| // 类型 primary / success / warning / danger / info / text
| type: {
| type: String,
| default: ''
| },
| icon: String,
| text: {
| type: String,
| default: ''
| },
| // 是否朴素按钮
| plain: {
| type: Boolean,
| default: false
| },
| loading: {
| type: Boolean,
| default: false
| },
| disabled: {
| type: Boolean,
| default: false
| },
| // 是否圆角按钮
| round: {
| type: Boolean,
| default: false
| }
| },
| computed: {
| btnStyle () {
| return this.$store.state.btnStyleVal
| }
| },
| methods: {
| clickBtn (e) {
| this.$emit('click', 4444444)
| }
| }
| }
| </script>
|
| <style lang="scss" scoped>
| </style>
|
|