WXL
4 天以前 9bce51f651aad297ef9eb6df832bfdaf1de05d84
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import { defineMixin } from '../../libs/vue'
import defProps from '../../libs/config/props.js'
export const props = defineMixin({
    props: {
        // 标签类型info、primary、success、warning、error
        type: {
            type: String,
            default: () => defProps.tag.type
        },
        // 不可用
        disabled: {
            type: [Boolean, String],
            default: () => defProps.tag.disabled
        },
        // 标签的大小,large,medium,mini
        size: {
            type: String,
            default: () => defProps.tag.size
        },
        // tag的形状,circle(两边半圆形), square(方形,带圆角)
        shape: {
            type: String,
            default: () => defProps.tag.shape
        },
        // 标签文字
        text: {
            type: [String, Number],
            default: () => defProps.tag.text
        },
        // 背景颜色,默认为空字符串,即不处理
        bgColor: {
            type: String,
            default: () => defProps.tag.bgColor
        },
        // 标签字体颜色,默认为空字符串,即不处理
        color: {
            type: String,
            default: () => defProps.tag.color
        },
        // 标签的边框颜色
        borderColor: {
            type: String,
            default: () => defProps.tag.borderColor
        },
        // 关闭按钮图标的颜色
        closeColor: {
            type: String,
            default: () => defProps.tag.closeColor
        },
        // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了
        name: {
            type: [String, Number],
            default: () => defProps.tag.name
        },
        // // 模式选择,dark|light|plain
        // mode: {
        //     type: String,
        //     default: 'light'
        // },
        // 镂空时是否填充背景色
        plainFill: {
            type: Boolean,
            default: () => defProps.tag.plainFill
        },
        // 是否镂空
        plain: {
            type: Boolean,
            default: () => defProps.tag.plain
        },
        // 是否可关闭
        closable: {
            type: Boolean,
            default: () => defProps.tag.closable
        },
        // 是否显示
        show: {
            type: Boolean,
            default: () => defProps.tag.show
        },
        // 内置图标,或绝对路径的图片
        icon: {
            type: String,
            default: () => defProps.tag.icon,
        },
        // 图标颜色
        iconColor: {
            type: String,
            default: () => defProps.tag.iconColor,
        },
        // 自定义尺寸字体大小
        textSize: {
            type: String,
            default: () => defProps.tag.textSize
        },
        // 自定义尺寸高度
        height: {
            type: String,
            default: () => defProps.tag.height
        },
        // 自定义尺寸padding
        padding: {
            type: String,
            default: () => defProps.tag.padding
        },
        // 自定义尺寸
        borderRadius: {
            type: String,
            default: () => defProps.tag.borderRadius
        },
        // 自动计算背景色
        autoBgColor: {
            type: Number,
            default: () => defProps.tag.autoBgColor
        },
    }
})