WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
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
import {defineMixin} from '../../libs/vue'
import defProps from '../../libs/config/props.js'
 
export const props = defineMixin({
    props: {
        // tab的数据
        list: {
            type: Array,
            default: () => defProps.subsection.list
        },
        // 当前活动的tab的index
        current: {
            type: [String, Number],
            default: () => defProps.subsection.current
        },
        // 激活的颜色
        activeColor: {
            type: String,
            default: () => defProps.subsection.activeColor
        },
        // 未激活的颜色
        inactiveColor: {
            type: String,
            default: () => defProps.subsection.inactiveColor
        },
        // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式
        mode: {
            type: String,
            default: () => defProps.subsection.mode
        },
        // 字体大小
        fontSize: {
            type: [String, Number],
            default: () => defProps.subsection.fontSize
        },
        // 激活tab的字体是否加粗
        bold: {
            type: Boolean,
            default: () => defProps.subsection.bold
        },
        // mode = button时,组件背景颜色
        bgColor: {
            type: String,
            default: () => defProps.subsection.bgColor
        },
        // 从list元素对象中读取的键名
        keyName: {
            type: String,
            default: () => defProps.subsection.keyName
        },
        // 从`list`元素对象中读取激活时的颜色  如果存在字段 优先级大于 activeColor
        activeColorKeyName: {
            type: String,
            default: () => defProps.subsection.activeColorKeyName
        },
        // 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor
        inactiveColorKeyName: {
            type: String,
            default: () => defProps.subsection.inactiveColorKeyName
        },
        // 是否禁用
        disabled: {
            type: Boolean,
            default: () => defProps.subsection.disabled
        }
    }
})