uview-plus 3.2.6 → 3.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +7 -0
- package/components/u-action-sheet/props.js +11 -10
- package/components/u-album/props.js +12 -11
- package/components/u-alert/props.js +9 -8
- package/components/u-avatar/props.js +15 -14
- package/components/u-avatar-group/props.js +10 -9
- package/components/u-back-top/props.js +11 -10
- package/components/u-badge/props.js +15 -14
- package/components/u-button/props.js +29 -37
- package/components/u-calendar/props.js +28 -27
- package/components/u-car-keyboard/props.js +1 -0
- package/components/u-cell/props.js +21 -20
- package/components/u-cell/u-cell.vue +3 -2
- package/components/u-cell-group/props.js +3 -2
- package/components/u-checkbox/props.js +14 -13
- package/components/u-checkbox-group/props.js +17 -16
- package/components/u-circle-progress/props.js +2 -1
- package/components/u-code/props.js +7 -6
- package/components/u-code-input/props.js +17 -16
- package/components/u-col/props.js +6 -5
- package/components/u-collapse/props.js +4 -3
- package/components/u-collapse-item/props.js +12 -11
- package/components/u-column-notice/props.js +11 -10
- package/components/u-count-down/props.js +5 -4
- package/components/u-count-to/props.js +12 -11
- package/components/u-datetime-picker/props.js +25 -24
- package/components/u-divider/props.js +9 -8
- package/components/u-dropdown/props.js +1 -0
- package/components/u-dropdown-item/props.js +1 -0
- package/components/u-dropdown-item/u-dropdown-item.vue +3 -5
- package/components/u-empty/props.js +12 -11
- package/components/u-form/props.js +9 -8
- package/components/u-form-item/props.js +11 -10
- package/components/u-gap/props.js +5 -4
- package/components/u-grid/props.js +4 -3
- package/components/u-grid-item/props.js +3 -2
- package/components/u-icon/props.js +18 -17
- package/components/u-image/props.js +17 -16
- package/components/u-index-anchor/props.js +6 -5
- package/components/u-index-item/props.js +1 -0
- package/components/u-index-list/props.js +6 -5
- package/components/u-input/props.js +36 -35
- package/components/u-keyboard/props.js +17 -16
- package/components/u-line/props.js +7 -6
- package/components/u-line-progress/props.js +6 -5
- package/components/u-link/props.js +8 -7
- package/components/u-list/props.js +15 -14
- package/components/u-list-item/props.js +2 -1
- package/components/u-loading-icon/props.js +12 -11
- package/components/u-loading-page/props.js +10 -9
- package/components/u-loadmore/props.js +19 -18
- package/components/u-modal/props.js +17 -16
- package/components/u-navbar/props.js +17 -16
- package/components/u-no-network/props.js +4 -3
- package/components/u-notice-bar/props.js +14 -13
- package/components/u-notify/props.js +10 -9
- package/components/u-number-box/props.js +23 -22
- package/components/u-number-keyboard/props.js +4 -3
- package/components/u-overlay/props.js +5 -4
- package/components/u-parse/props.js +9 -8
- package/components/u-picker/props.js +17 -16
- package/components/u-picker-column/props.js +1 -0
- package/components/u-popup/props.js +16 -15
- package/components/u-radio/props.js +14 -13
- package/components/u-radio-group/props.js +18 -17
- package/components/u-rate/props.js +15 -14
- package/components/u-read-more/props.js +9 -8
- package/components/u-row/props.js +4 -3
- package/components/u-row-notice/props.js +8 -7
- package/components/u-safe-bottom/props.js +1 -0
- package/components/u-scroll-list/props.js +7 -6
- package/components/u-search/props.js +25 -24
- package/components/u-skeleton/props.js +12 -11
- package/components/u-slider/props.js +12 -11
- package/components/u-status-bar/props.js +2 -1
- package/components/u-steps/props.js +8 -7
- package/components/u-steps-item/props.js +5 -4
- package/components/u-sticky/props.js +7 -6
- package/components/u-subsection/props.js +10 -9
- package/components/u-swipe-action/props.js +2 -1
- package/components/u-swipe-action-item/props.js +8 -7
- package/components/u-swiper/props.js +25 -24
- package/components/u-swiper-indicator/props.js +6 -5
- package/components/u-switch/props.js +12 -11
- package/components/u-tabbar/props.js +9 -8
- package/components/u-tabbar-item/props.js +7 -6
- package/components/u-table/props.js +1 -0
- package/components/u-tabs/props.js +13 -12
- package/components/u-tabs-item/props.js +1 -0
- package/components/u-tag/props.js +20 -18
- package/components/u-td/props.js +1 -0
- package/components/u-text/props.js +22 -21
- package/components/u-textarea/props.js +24 -23
- package/components/u-toolbar/props.js +7 -6
- package/components/u-tooltip/props.js +12 -11
- package/components/u-tr/props.js +1 -0
- package/components/u-transition/props.js +5 -4
- package/components/u-upload/props.js +23 -22
- package/index.js +16 -1
- package/libs/function/index.js +30 -23
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 操作菜单是否展示 (默认false)
|
|
4
5
|
show: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.actionSheet.show
|
|
7
8
|
},
|
|
8
9
|
// 标题
|
|
9
10
|
title: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.actionSheet.title
|
|
12
13
|
},
|
|
13
14
|
// 选项上方的描述信息
|
|
14
15
|
description: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.actionSheet.description
|
|
17
18
|
},
|
|
18
19
|
// 数据
|
|
19
20
|
actions: {
|
|
20
21
|
type: Array,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.actionSheet.actions
|
|
22
23
|
},
|
|
23
24
|
// 取消按钮的文字,不为空时显示按钮
|
|
24
25
|
cancelText: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.actionSheet.cancelText
|
|
27
28
|
},
|
|
28
29
|
// 点击某个菜单项时是否关闭弹窗
|
|
29
30
|
closeOnClickAction: {
|
|
30
31
|
type: Boolean,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.actionSheet.closeOnClickAction
|
|
32
33
|
},
|
|
33
34
|
// 处理底部安全区(默认true)
|
|
34
35
|
safeAreaInsetBottom: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.actionSheet.safeAreaInsetBottom
|
|
37
38
|
},
|
|
38
39
|
// 小程序的打开方式
|
|
39
40
|
openType: {
|
|
40
41
|
type: String,
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.actionSheet.openType
|
|
42
43
|
},
|
|
43
44
|
// 点击遮罩是否允许关闭 (默认true)
|
|
44
45
|
closeOnClickOverlay: {
|
|
45
46
|
type: Boolean,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.actionSheet.closeOnClickOverlay
|
|
47
48
|
},
|
|
48
49
|
// 圆角值
|
|
49
50
|
round: {
|
|
50
51
|
type: [Boolean, String, Number],
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.actionSheet.round
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 图片地址,Array<String>|Array<Object>形式
|
|
4
5
|
urls: {
|
|
5
6
|
type: Array,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.album.urls
|
|
7
8
|
},
|
|
8
9
|
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
9
10
|
keyName: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.album.keyName
|
|
12
13
|
},
|
|
13
14
|
// 单图时,图片长边的长度
|
|
14
15
|
singleSize: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.album.singleSize
|
|
17
18
|
},
|
|
18
19
|
// 多图时,图片边长
|
|
19
20
|
multipleSize: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.album.multipleSize
|
|
22
23
|
},
|
|
23
24
|
// 多图时,图片水平和垂直之间的间隔
|
|
24
25
|
space: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.album.space
|
|
27
28
|
},
|
|
28
29
|
// 单图时,图片缩放裁剪的模式
|
|
29
30
|
singleMode: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.album.singleMode
|
|
32
33
|
},
|
|
33
34
|
// 多图时,图片缩放裁剪的模式
|
|
34
35
|
multipleMode: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.album.multipleMode
|
|
37
38
|
},
|
|
38
39
|
// 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
|
|
39
40
|
maxCount: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.album.maxCount
|
|
42
43
|
},
|
|
43
44
|
// 是否可以预览图片
|
|
44
45
|
previewFullImage: {
|
|
45
46
|
type: Boolean,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.album.previewFullImage
|
|
47
48
|
},
|
|
48
49
|
// 每行展示图片数量,如设置,singleSize和multipleSize将会无效
|
|
49
50
|
rowCount: {
|
|
50
51
|
type: [String, Number],
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.album.rowCount
|
|
52
53
|
},
|
|
53
54
|
// 超出maxCount时是否显示查看更多的提示
|
|
54
55
|
showMore: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.album.showMore
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 显示文字
|
|
4
5
|
title: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.alert.title
|
|
7
8
|
},
|
|
8
9
|
// 主题,success/warning/info/error
|
|
9
10
|
type: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.alert.type
|
|
12
13
|
},
|
|
13
14
|
// 辅助性文字
|
|
14
15
|
description: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.alert.description
|
|
17
18
|
},
|
|
18
19
|
// 是否可关闭
|
|
19
20
|
closable: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.alert.closable
|
|
22
23
|
},
|
|
23
24
|
// 是否显示图标
|
|
24
25
|
showIcon: {
|
|
25
26
|
type: Boolean,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.alert.showIcon
|
|
27
28
|
},
|
|
28
29
|
// 浅或深色调,light-浅色,dark-深色
|
|
29
30
|
effect: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.alert.effect
|
|
32
33
|
},
|
|
33
34
|
// 文字是否居中
|
|
34
35
|
center: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.alert.center
|
|
37
38
|
},
|
|
38
39
|
// 字体大小
|
|
39
40
|
fontSize: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.alert.fontSize
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -1,64 +1,65 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 头像图片路径(不能为相对路径)
|
|
4
5
|
src: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.avatar.src
|
|
7
8
|
},
|
|
8
9
|
// 头像形状,circle-圆形,square-方形
|
|
9
10
|
shape: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.avatar.shape
|
|
12
13
|
},
|
|
13
14
|
// 头像尺寸
|
|
14
15
|
size: {
|
|
15
16
|
type: [String, Number],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.avatar.size
|
|
17
18
|
},
|
|
18
19
|
// 裁剪模式
|
|
19
20
|
mode: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.avatar.mode
|
|
22
23
|
},
|
|
23
24
|
// 显示的文字
|
|
24
25
|
text: {
|
|
25
26
|
type: String,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.avatar.text
|
|
27
28
|
},
|
|
28
29
|
// 背景色
|
|
29
30
|
bgColor: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.avatar.bgColor
|
|
32
33
|
},
|
|
33
34
|
// 文字颜色
|
|
34
35
|
color: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.avatar.color
|
|
37
38
|
},
|
|
38
39
|
// 文字大小
|
|
39
40
|
fontSize: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.avatar.fontSize
|
|
42
43
|
},
|
|
43
44
|
// 显示的图标
|
|
44
45
|
icon: {
|
|
45
46
|
type: String,
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.avatar.icon
|
|
47
48
|
},
|
|
48
49
|
// 显示小程序头像,只对百度,微信,QQ小程序有效
|
|
49
50
|
mpAvatar: {
|
|
50
51
|
type: Boolean,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.avatar.mpAvatar
|
|
52
53
|
},
|
|
53
54
|
// 是否使用随机背景色
|
|
54
55
|
randomBgColor: {
|
|
55
56
|
type: Boolean,
|
|
56
|
-
default: () =>
|
|
57
|
+
default: () => defProps.avatar.randomBgColor
|
|
57
58
|
},
|
|
58
59
|
// 加载失败的默认头像(组件有内置默认图片)
|
|
59
60
|
defaultUrl: {
|
|
60
61
|
type: String,
|
|
61
|
-
default: () =>
|
|
62
|
+
default: () => defProps.avatar.defaultUrl
|
|
62
63
|
},
|
|
63
64
|
// 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
|
|
64
65
|
colorIndex: {
|
|
@@ -67,12 +68,12 @@ export default {
|
|
|
67
68
|
validator(n) {
|
|
68
69
|
return uni.$u.test.range(n, [0, 19]) || n === ''
|
|
69
70
|
},
|
|
70
|
-
default: () =>
|
|
71
|
+
default: () => defProps.avatar.colorIndex
|
|
71
72
|
},
|
|
72
73
|
// 组件标识符
|
|
73
74
|
name: {
|
|
74
75
|
type: String,
|
|
75
|
-
default: () =>
|
|
76
|
+
default: () => defProps.avatar.name
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 头像图片组
|
|
4
5
|
urls: {
|
|
5
6
|
type: Array,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.avatarGroup.urls
|
|
7
8
|
},
|
|
8
9
|
// 最多展示的头像数量
|
|
9
10
|
maxCount: {
|
|
10
11
|
type: [String, Number],
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.avatarGroup.maxCount
|
|
12
13
|
},
|
|
13
14
|
// 头像形状
|
|
14
15
|
shape: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.avatarGroup.shape
|
|
17
18
|
},
|
|
18
19
|
// 图片裁剪模式
|
|
19
20
|
mode: {
|
|
20
21
|
type: String,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.avatarGroup.mode
|
|
22
23
|
},
|
|
23
24
|
// 超出maxCount时是否显示查看更多的提示
|
|
24
25
|
showMore: {
|
|
25
26
|
type: Boolean,
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.avatarGroup.showMore
|
|
27
28
|
},
|
|
28
29
|
// 头像大小
|
|
29
30
|
size: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.avatarGroup.size
|
|
32
33
|
},
|
|
33
34
|
// 指定从数组的对象元素中读取哪个属性作为图片地址
|
|
34
35
|
keyName: {
|
|
35
36
|
type: String,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.avatarGroup.keyName
|
|
37
38
|
},
|
|
38
39
|
// 头像之间的遮挡比例
|
|
39
40
|
gap: {
|
|
@@ -41,12 +42,12 @@ export default {
|
|
|
41
42
|
validator(value) {
|
|
42
43
|
return value >= 0 && value <= 1
|
|
43
44
|
},
|
|
44
|
-
default: () =>
|
|
45
|
+
default: () => defProps.avatarGroup.gap
|
|
45
46
|
},
|
|
46
47
|
// 需额外显示的值
|
|
47
48
|
extraValue: {
|
|
48
49
|
type: [Number, String],
|
|
49
|
-
default: () =>
|
|
50
|
+
default: () => defProps.avatarGroup.extraValue
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 返回顶部的形状,circle-圆形,square-方形
|
|
4
5
|
mode: {
|
|
5
6
|
type: String,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.backtop.mode
|
|
7
8
|
},
|
|
8
9
|
// 自定义图标
|
|
9
10
|
icon: {
|
|
10
11
|
type: String,
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.backtop.icon
|
|
12
13
|
},
|
|
13
14
|
// 提示文字
|
|
14
15
|
text: {
|
|
15
16
|
type: String,
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.backtop.text
|
|
17
18
|
},
|
|
18
19
|
// 返回顶部滚动时间
|
|
19
20
|
duration: {
|
|
20
21
|
type: [String, Number],
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.backtop.duration
|
|
22
23
|
},
|
|
23
24
|
// 滚动距离
|
|
24
25
|
scrollTop: {
|
|
25
26
|
type: [String, Number],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.backtop.scrollTop
|
|
27
28
|
},
|
|
28
29
|
// 距离顶部多少距离显示,单位px
|
|
29
30
|
top: {
|
|
30
31
|
type: [String, Number],
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.backtop.top
|
|
32
33
|
},
|
|
33
34
|
// 返回顶部按钮到底部的距离,单位px
|
|
34
35
|
bottom: {
|
|
35
36
|
type: [String, Number],
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.backtop.bottom
|
|
37
38
|
},
|
|
38
39
|
// 返回顶部按钮到右边的距离,单位px
|
|
39
40
|
right: {
|
|
40
41
|
type: [String, Number],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.backtop.right
|
|
42
43
|
},
|
|
43
44
|
// 层级
|
|
44
45
|
zIndex: {
|
|
45
46
|
type: [String, Number],
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.backtop.zIndex
|
|
47
48
|
},
|
|
48
49
|
// 图标的样式,对象形式
|
|
49
50
|
iconStyle: {
|
|
50
51
|
type: Object,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.backtop.iconStyle
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
+
import defProps from '../../libs/config/props.js';
|
|
1
2
|
export default {
|
|
2
3
|
props: {
|
|
3
4
|
// 是否显示圆点
|
|
4
5
|
isDot: {
|
|
5
6
|
type: Boolean,
|
|
6
|
-
default: () =>
|
|
7
|
+
default: () => defProps.badge.isDot
|
|
7
8
|
},
|
|
8
9
|
// 显示的内容
|
|
9
10
|
value: {
|
|
10
11
|
type: [Number, String],
|
|
11
|
-
default: () =>
|
|
12
|
+
default: () => defProps.badge.value
|
|
12
13
|
},
|
|
13
14
|
// 显示的内容
|
|
14
15
|
modelValue: {
|
|
15
16
|
type: [Number, String],
|
|
16
|
-
default: () =>
|
|
17
|
+
default: () => defProps.badge.modelValue
|
|
17
18
|
},
|
|
18
19
|
// 是否显示
|
|
19
20
|
show: {
|
|
20
21
|
type: Boolean,
|
|
21
|
-
default: () =>
|
|
22
|
+
default: () => defProps.badge.show
|
|
22
23
|
},
|
|
23
24
|
// 最大值,超过最大值会显示 '{max}+'
|
|
24
25
|
max: {
|
|
25
26
|
type: [Number, String],
|
|
26
|
-
default: () =>
|
|
27
|
+
default: () => defProps.badge.max
|
|
27
28
|
},
|
|
28
29
|
// 主题类型,error|warning|success|primary
|
|
29
30
|
type: {
|
|
30
31
|
type: String,
|
|
31
|
-
default: () =>
|
|
32
|
+
default: () => defProps.badge.type
|
|
32
33
|
},
|
|
33
34
|
// 当数值为 0 时,是否展示 Badge
|
|
34
35
|
showZero: {
|
|
35
36
|
type: Boolean,
|
|
36
|
-
default: () =>
|
|
37
|
+
default: () => defProps.badge.showZero
|
|
37
38
|
},
|
|
38
39
|
// 背景颜色,优先级比type高,如设置,type参数会失效
|
|
39
40
|
bgColor: {
|
|
40
41
|
type: [String, null],
|
|
41
|
-
default: () =>
|
|
42
|
+
default: () => defProps.badge.bgColor
|
|
42
43
|
},
|
|
43
44
|
// 字体颜色
|
|
44
45
|
color: {
|
|
45
46
|
type: [String, null],
|
|
46
|
-
default: () =>
|
|
47
|
+
default: () => defProps.badge.color
|
|
47
48
|
},
|
|
48
49
|
// 徽标形状,circle-四角均为圆角,horn-左下角为直角
|
|
49
50
|
shape: {
|
|
50
51
|
type: String,
|
|
51
|
-
default: () =>
|
|
52
|
+
default: () => defProps.badge.shape
|
|
52
53
|
},
|
|
53
54
|
// 设置数字的显示方式,overflow|ellipsis|limit
|
|
54
55
|
// overflow会根据max字段判断,超出显示`${max}+`
|
|
@@ -56,22 +57,22 @@ export default {
|
|
|
56
57
|
// limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
|
|
57
58
|
numberType: {
|
|
58
59
|
type: String,
|
|
59
|
-
default: () =>
|
|
60
|
+
default: () => defProps.badge.numberType
|
|
60
61
|
},
|
|
61
62
|
// 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
|
|
62
63
|
offset: {
|
|
63
64
|
type: Array,
|
|
64
|
-
default: () =>
|
|
65
|
+
default: () => defProps.badge.offset
|
|
65
66
|
},
|
|
66
67
|
// 是否反转背景和字体颜色
|
|
67
68
|
inverted: {
|
|
68
69
|
type: Boolean,
|
|
69
|
-
default: () =>
|
|
70
|
+
default: () => defProps.badge.inverted
|
|
70
71
|
},
|
|
71
72
|
// 是否绝对定位
|
|
72
73
|
absolute: {
|
|
73
74
|
type: Boolean,
|
|
74
|
-
default: () =>
|
|
75
|
+
default: () => defProps.badge.absolute
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|