uview-plus 3.1.45 → 3.1.48

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.
Files changed (137) hide show
  1. package/changelog.md +10 -0
  2. package/components/u-action-sheet/props.js +10 -11
  3. package/components/u-album/props.js +11 -12
  4. package/components/u-alert/props.js +8 -9
  5. package/components/u-avatar/props.js +14 -15
  6. package/components/u-avatar-group/props.js +9 -10
  7. package/components/u-back-top/props.js +10 -11
  8. package/components/u-badge/props.js +14 -15
  9. package/components/u-button/props.js +28 -29
  10. package/components/u-calendar/month.vue +1 -1
  11. package/components/u-calendar/props.js +27 -28
  12. package/components/u-car-keyboard/props.js +0 -1
  13. package/components/u-cell/props.js +17 -18
  14. package/components/u-cell/u-cell.vue +11 -2
  15. package/components/u-cell-group/props.js +2 -3
  16. package/components/u-checkbox/props.js +13 -14
  17. package/components/u-checkbox-group/props.js +16 -17
  18. package/components/u-circle-progress/props.js +1 -2
  19. package/components/u-code/props.js +6 -7
  20. package/components/u-code/u-code.vue +5 -0
  21. package/components/u-code-input/props.js +16 -17
  22. package/components/u-col/props.js +5 -6
  23. package/components/u-collapse/props.js +3 -4
  24. package/components/u-collapse-item/props.js +11 -12
  25. package/components/u-column-notice/props.js +10 -11
  26. package/components/u-count-down/props.js +4 -5
  27. package/components/u-count-down/u-count-down.vue +5 -0
  28. package/components/u-count-to/props.js +11 -12
  29. package/components/u-datetime-picker/props.js +24 -25
  30. package/components/u-divider/props.js +8 -9
  31. package/components/u-dropdown/props.js +0 -1
  32. package/components/u-dropdown-item/props.js +0 -1
  33. package/components/u-empty/props.js +11 -12
  34. package/components/u-form/props.js +8 -9
  35. package/components/u-form/u-form.vue +1 -1
  36. package/components/u-form-item/props.js +13 -9
  37. package/components/u-form-item/u-form-item.vue +1 -0
  38. package/components/u-gap/props.js +4 -5
  39. package/components/u-grid/props.js +3 -4
  40. package/components/u-grid-item/props.js +2 -3
  41. package/components/u-grid-item/u-grid-item.vue +5 -0
  42. package/components/u-icon/props.js +17 -18
  43. package/components/u-icon/u-icon.vue +9 -6
  44. package/components/u-image/props.js +16 -17
  45. package/components/u-index-anchor/props.js +5 -6
  46. package/components/u-index-item/props.js +0 -1
  47. package/components/u-index-list/props.js +5 -6
  48. package/components/u-index-list/u-index-list.vue +2 -1
  49. package/components/u-input/props.js +35 -36
  50. package/components/u-keyboard/props.js +16 -17
  51. package/components/u-line/props.js +6 -7
  52. package/components/u-line-progress/props.js +5 -6
  53. package/components/u-link/props.js +7 -8
  54. package/components/u-list/props.js +14 -15
  55. package/components/u-list-item/props.js +1 -2
  56. package/components/u-loading-icon/props.js +11 -12
  57. package/components/u-loading-page/props.js +9 -10
  58. package/components/u-loadmore/props.js +18 -19
  59. package/components/u-modal/props.js +16 -17
  60. package/components/u-navbar/props.js +16 -17
  61. package/components/u-no-network/props.js +3 -4
  62. package/components/u-notice-bar/props.js +13 -14
  63. package/components/u-notify/props.js +9 -10
  64. package/components/u-notify/u-notify.vue +5 -0
  65. package/components/u-number-box/props.js +22 -23
  66. package/components/u-number-keyboard/props.js +3 -4
  67. package/components/u-overlay/props.js +4 -5
  68. package/components/u-parse/props.js +8 -9
  69. package/components/u-parse/u-parse.vue +6 -1
  70. package/components/u-picker/props.js +16 -17
  71. package/components/u-picker-column/props.js +0 -1
  72. package/components/u-popup/props.js +15 -16
  73. package/components/u-radio/props.js +13 -14
  74. package/components/u-radio-group/props.js +17 -18
  75. package/components/u-rate/props.js +14 -15
  76. package/components/u-read-more/props.js +8 -9
  77. package/components/u-row/props.js +3 -4
  78. package/components/u-row-notice/props.js +7 -8
  79. package/components/u-row-notice/u-row-notice.vue +5 -0
  80. package/components/u-safe-bottom/props.js +0 -1
  81. package/components/u-scroll-list/props.js +6 -7
  82. package/components/u-search/props.js +24 -25
  83. package/components/u-skeleton/props.js +11 -12
  84. package/components/u-slider/props.js +11 -12
  85. package/components/u-status-bar/props.js +1 -2
  86. package/components/u-steps/props.js +7 -8
  87. package/components/u-steps-item/props.js +4 -5
  88. package/components/u-sticky/props.js +6 -7
  89. package/components/u-sticky/u-sticky.vue +5 -0
  90. package/components/u-subsection/props.js +9 -10
  91. package/components/u-swipe-action/props.js +1 -2
  92. package/components/u-swipe-action-item/nvue.js +5 -0
  93. package/components/u-swipe-action-item/props.js +6 -7
  94. package/components/u-swiper/props.js +24 -25
  95. package/components/u-swiper-indicator/props.js +5 -6
  96. package/components/u-switch/props.js +11 -12
  97. package/components/u-tabbar/props.js +8 -9
  98. package/components/u-tabbar-item/props.js +6 -7
  99. package/components/u-table/props.js +0 -1
  100. package/components/u-tabs/props.js +12 -13
  101. package/components/u-tabs-item/props.js +0 -1
  102. package/components/u-tag/props.js +15 -16
  103. package/components/u-td/props.js +0 -1
  104. package/components/u-text/props.js +21 -22
  105. package/components/u-textarea/props.js +23 -24
  106. package/components/u-toast/u-toast.vue +5 -0
  107. package/components/u-toolbar/props.js +6 -7
  108. package/components/u-tooltip/props.js +11 -12
  109. package/components/u-tr/props.js +0 -1
  110. package/components/u-transition/props.js +4 -5
  111. package/components/u-transition/transition.js +8 -9
  112. package/components/u-upload/props.js +22 -23
  113. package/libs/config/props/actionSheet.js +1 -1
  114. package/libs/config/props/album.js +1 -1
  115. package/libs/config/props/avatarGroup.js +1 -1
  116. package/libs/config/props/backtop.js +2 -2
  117. package/libs/config/props/badge.js +1 -1
  118. package/libs/config/props/calendar.js +3 -3
  119. package/libs/config/props/checkboxGroup.js +1 -1
  120. package/libs/config/props/datetimePicker.js +1 -1
  121. package/libs/config/props/form.js +3 -3
  122. package/libs/config/props/formItem.js +1 -0
  123. package/libs/config/props/indexList.js +1 -1
  124. package/libs/config/props/noticeBar.js +1 -1
  125. package/libs/config/props/picker.js +2 -2
  126. package/libs/config/props/popup.js +1 -1
  127. package/libs/config/props/search.js +2 -2
  128. package/libs/config/props/slider.js +1 -1
  129. package/libs/config/props/swiper.js +1 -1
  130. package/libs/config/props/tabs.js +7 -7
  131. package/libs/config/props/text.js +2 -2
  132. package/libs/config/props/toast.js +1 -1
  133. package/libs/config/props/tooltip.js +1 -1
  134. package/libs/config/props/upload.js +3 -3
  135. package/libs/css/components.scss +11 -1
  136. package/libs/css/flex.scss +73 -71
  137. package/package.json +1 -1
package/changelog.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 3.1.48(2024-03-18)
2
+ fix:[plugin:uni:pre-css] Unbalanced delimiter found in string
3
+ ## 3.1.47(2024-03-18)
4
+ fix: setConfig设置组件默认参数无效问题
5
+ fix: 修复自定义图标无效问题
6
+ feat: 增加u-form-item单独设置规则变量
7
+ fix:#293小程序是自定义导航栏的时候即传了customNavHeight的时候会出现跳转偏移的情况
8
+
9
+ ## 3.1.46(2024-01-29)
10
+ beforeUnmount
1
11
  ## 3.1.45(2024-01-24)
2
12
  fix: #262ext组件为超链接的情况下size属性不生效
3
13
  fix: #263最新版本3.1.42中微信小程序u-swipe-action-item报错
@@ -1,55 +1,54 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 操作菜单是否展示 (默认false)
5
4
  show: {
6
5
  type: Boolean,
7
- default: defprops.actionSheet.show
6
+ default: () => uni.$u.props.actionSheet.show
8
7
  },
9
8
  // 标题
10
9
  title: {
11
10
  type: String,
12
- default: defprops.actionSheet.title
11
+ default: () => uni.$u.props.actionSheet.title
13
12
  },
14
13
  // 选项上方的描述信息
15
14
  description: {
16
15
  type: String,
17
- default: defprops.actionSheet.description
16
+ default: () => uni.$u.props.actionSheet.description
18
17
  },
19
18
  // 数据
20
19
  actions: {
21
20
  type: Array,
22
- default: defprops.actionSheet.actions
21
+ default: () => uni.$u.props.actionSheet.actions
23
22
  },
24
23
  // 取消按钮的文字,不为空时显示按钮
25
24
  cancelText: {
26
25
  type: String,
27
- default: defprops.actionSheet.cancelText
26
+ default: () => uni.$u.props.actionSheet.cancelText
28
27
  },
29
28
  // 点击某个菜单项时是否关闭弹窗
30
29
  closeOnClickAction: {
31
30
  type: Boolean,
32
- default: defprops.actionSheet.closeOnClickAction
31
+ default: () => uni.$u.props.actionSheet.closeOnClickAction
33
32
  },
34
33
  // 处理底部安全区(默认true)
35
34
  safeAreaInsetBottom: {
36
35
  type: Boolean,
37
- default: defprops.actionSheet.safeAreaInsetBottom
36
+ default: () => uni.$u.props.actionSheet.safeAreaInsetBottom
38
37
  },
39
38
  // 小程序的打开方式
40
39
  openType: {
41
40
  type: String,
42
- default: defprops.actionSheet.openType
41
+ default: () => uni.$u.props.actionSheet.openType
43
42
  },
44
43
  // 点击遮罩是否允许关闭 (默认true)
45
44
  closeOnClickOverlay: {
46
45
  type: Boolean,
47
- default: defprops.actionSheet.closeOnClickOverlay
46
+ default: () => uni.$u.props.actionSheet.closeOnClickOverlay
48
47
  },
49
48
  // 圆角值
50
49
  round: {
51
50
  type: [Boolean, String, Number],
52
- default: defprops.actionSheet.round
51
+ default: () => uni.$u.props.actionSheet.round
53
52
  }
54
53
  }
55
54
  }
@@ -1,60 +1,59 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 图片地址,Array<String>|Array<Object>形式
5
4
  urls: {
6
5
  type: Array,
7
- default: defprops.album.urls
6
+ default: () => uni.$u.props.album.urls
8
7
  },
9
8
  // 指定从数组的对象元素中读取哪个属性作为图片地址
10
9
  keyName: {
11
10
  type: String,
12
- default: defprops.album.keyName
11
+ default: () => uni.$u.props.album.keyName
13
12
  },
14
13
  // 单图时,图片长边的长度
15
14
  singleSize: {
16
15
  type: [String, Number],
17
- default: defprops.album.singleSize
16
+ default: () => uni.$u.props.album.singleSize
18
17
  },
19
18
  // 多图时,图片边长
20
19
  multipleSize: {
21
20
  type: [String, Number],
22
- default: defprops.album.multipleSize
21
+ default: () => uni.$u.props.album.multipleSize
23
22
  },
24
23
  // 多图时,图片水平和垂直之间的间隔
25
24
  space: {
26
25
  type: [String, Number],
27
- default: defprops.album.space
26
+ default: () => uni.$u.props.album.space
28
27
  },
29
28
  // 单图时,图片缩放裁剪的模式
30
29
  singleMode: {
31
30
  type: String,
32
- default: defprops.album.singleMode
31
+ default: () => uni.$u.props.album.singleMode
33
32
  },
34
33
  // 多图时,图片缩放裁剪的模式
35
34
  multipleMode: {
36
35
  type: String,
37
- default: defprops.album.multipleMode
36
+ default: () => uni.$u.props.album.multipleMode
38
37
  },
39
38
  // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量
40
39
  maxCount: {
41
40
  type: [String, Number],
42
- default: defprops.album.maxCount
41
+ default: () => uni.$u.props.album.maxCount
43
42
  },
44
43
  // 是否可以预览图片
45
44
  previewFullImage: {
46
45
  type: Boolean,
47
- default: defprops.album.previewFullImage
46
+ default: () => uni.$u.props.album.previewFullImage
48
47
  },
49
48
  // 每行展示图片数量,如设置,singleSize和multipleSize将会无效
50
49
  rowCount: {
51
50
  type: [String, Number],
52
- default: defprops.album.rowCount
51
+ default: () => uni.$u.props.album.rowCount
53
52
  },
54
53
  // 超出maxCount时是否显示查看更多的提示
55
54
  showMore: {
56
55
  type: Boolean,
57
- default: defprops.album.showMore
56
+ default: () => uni.$u.props.album.showMore
58
57
  }
59
58
  }
60
59
  }
@@ -1,45 +1,44 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 显示文字
5
4
  title: {
6
5
  type: String,
7
- default: defprops.alert.title
6
+ default: () => uni.$u.props.alert.title
8
7
  },
9
8
  // 主题,success/warning/info/error
10
9
  type: {
11
10
  type: String,
12
- default: defprops.alert.type
11
+ default: () => uni.$u.props.alert.type
13
12
  },
14
13
  // 辅助性文字
15
14
  description: {
16
15
  type: String,
17
- default: defprops.alert.description
16
+ default: () => uni.$u.props.alert.description
18
17
  },
19
18
  // 是否可关闭
20
19
  closable: {
21
20
  type: Boolean,
22
- default: defprops.alert.closable
21
+ default: () => uni.$u.props.alert.closable
23
22
  },
24
23
  // 是否显示图标
25
24
  showIcon: {
26
25
  type: Boolean,
27
- default: defprops.alert.showIcon
26
+ default: () => uni.$u.props.alert.showIcon
28
27
  },
29
28
  // 浅或深色调,light-浅色,dark-深色
30
29
  effect: {
31
30
  type: String,
32
- default: defprops.alert.effect
31
+ default: () => uni.$u.props.alert.effect
33
32
  },
34
33
  // 文字是否居中
35
34
  center: {
36
35
  type: Boolean,
37
- default: defprops.alert.center
36
+ default: () => uni.$u.props.alert.center
38
37
  },
39
38
  // 字体大小
40
39
  fontSize: {
41
40
  type: [String, Number],
42
- default: defprops.alert.fontSize
41
+ default: () => uni.$u.props.alert.fontSize
43
42
  }
44
43
  }
45
44
  }
@@ -1,65 +1,64 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 头像图片路径(不能为相对路径)
5
4
  src: {
6
5
  type: String,
7
- default: defprops.avatar.src
6
+ default: () => uni.$u.props.avatar.src
8
7
  },
9
8
  // 头像形状,circle-圆形,square-方形
10
9
  shape: {
11
10
  type: String,
12
- default: defprops.avatar.shape
11
+ default: () => uni.$u.props.avatar.shape
13
12
  },
14
13
  // 头像尺寸
15
14
  size: {
16
15
  type: [String, Number],
17
- default: defprops.avatar.size
16
+ default: () => uni.$u.props.avatar.size
18
17
  },
19
18
  // 裁剪模式
20
19
  mode: {
21
20
  type: String,
22
- default: defprops.avatar.mode
21
+ default: () => uni.$u.props.avatar.mode
23
22
  },
24
23
  // 显示的文字
25
24
  text: {
26
25
  type: String,
27
- default: defprops.avatar.text
26
+ default: () => uni.$u.props.avatar.text
28
27
  },
29
28
  // 背景色
30
29
  bgColor: {
31
30
  type: String,
32
- default: defprops.avatar.bgColor
31
+ default: () => uni.$u.props.avatar.bgColor
33
32
  },
34
33
  // 文字颜色
35
34
  color: {
36
35
  type: String,
37
- default: defprops.avatar.color
36
+ default: () => uni.$u.props.avatar.color
38
37
  },
39
38
  // 文字大小
40
39
  fontSize: {
41
40
  type: [String, Number],
42
- default: defprops.avatar.fontSize
41
+ default: () => uni.$u.props.avatar.fontSize
43
42
  },
44
43
  // 显示的图标
45
44
  icon: {
46
45
  type: String,
47
- default: defprops.avatar.icon
46
+ default: () => uni.$u.props.avatar.icon
48
47
  },
49
48
  // 显示小程序头像,只对百度,微信,QQ小程序有效
50
49
  mpAvatar: {
51
50
  type: Boolean,
52
- default: defprops.avatar.mpAvatar
51
+ default: () => uni.$u.props.avatar.mpAvatar
53
52
  },
54
53
  // 是否使用随机背景色
55
54
  randomBgColor: {
56
55
  type: Boolean,
57
- default: defprops.avatar.randomBgColor
56
+ default: () => uni.$u.props.avatar.randomBgColor
58
57
  },
59
58
  // 加载失败的默认头像(组件有内置默认图片)
60
59
  defaultUrl: {
61
60
  type: String,
62
- default: defprops.avatar.defaultUrl
61
+ default: () => uni.$u.props.avatar.defaultUrl
63
62
  },
64
63
  // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间
65
64
  colorIndex: {
@@ -68,12 +67,12 @@ export default {
68
67
  validator(n) {
69
68
  return uni.$u.test.range(n, [0, 19]) || n === ''
70
69
  },
71
- default: defprops.avatar.colorIndex
70
+ default: () => uni.$u.props.avatar.colorIndex
72
71
  },
73
72
  // 组件标识符
74
73
  name: {
75
74
  type: String,
76
- default: defprops.avatar.name
75
+ default: () => uni.$u.props.avatar.name
77
76
  }
78
77
  }
79
78
  }
@@ -1,40 +1,39 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 头像图片组
5
4
  urls: {
6
5
  type: Array,
7
- default: defprops.avatarGroup.urls
6
+ default: () => uni.$u.props.avatarGroup.urls
8
7
  },
9
8
  // 最多展示的头像数量
10
9
  maxCount: {
11
10
  type: [String, Number],
12
- default: defprops.avatarGroup.maxCount
11
+ default: () => uni.$u.props.avatarGroup.maxCount
13
12
  },
14
13
  // 头像形状
15
14
  shape: {
16
15
  type: String,
17
- default: defprops.avatarGroup.shape
16
+ default: () => uni.$u.props.avatarGroup.shape
18
17
  },
19
18
  // 图片裁剪模式
20
19
  mode: {
21
20
  type: String,
22
- default: defprops.avatarGroup.mode
21
+ default: () => uni.$u.props.avatarGroup.mode
23
22
  },
24
23
  // 超出maxCount时是否显示查看更多的提示
25
24
  showMore: {
26
25
  type: Boolean,
27
- default: defprops.avatarGroup.showMore
26
+ default: () => uni.$u.props.avatarGroup.showMore
28
27
  },
29
28
  // 头像大小
30
29
  size: {
31
30
  type: [String, Number],
32
- default: defprops.avatarGroup.size
31
+ default: () => uni.$u.props.avatarGroup.size
33
32
  },
34
33
  // 指定从数组的对象元素中读取哪个属性作为图片地址
35
34
  keyName: {
36
35
  type: String,
37
- default: defprops.avatarGroup.keyName
36
+ default: () => uni.$u.props.avatarGroup.keyName
38
37
  },
39
38
  // 头像之间的遮挡比例
40
39
  gap: {
@@ -42,12 +41,12 @@ export default {
42
41
  validator(value) {
43
42
  return value >= 0 && value <= 1
44
43
  },
45
- default: defprops.avatarGroup.gap
44
+ default: () => uni.$u.props.avatarGroup.gap
46
45
  },
47
46
  // 需额外显示的值
48
47
  extraValue: {
49
48
  type: [Number, String],
50
- default: defprops.avatarGroup.extraValue
49
+ default: () => uni.$u.props.avatarGroup.extraValue
51
50
  }
52
51
  }
53
52
  }
@@ -1,55 +1,54 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 返回顶部的形状,circle-圆形,square-方形
5
4
  mode: {
6
5
  type: String,
7
- default: defprops.backtop.mode
6
+ default: () => uni.$u.props.backtop.mode
8
7
  },
9
8
  // 自定义图标
10
9
  icon: {
11
10
  type: String,
12
- default: defprops.backtop.icon
11
+ default: () => uni.$u.props.backtop.icon
13
12
  },
14
13
  // 提示文字
15
14
  text: {
16
15
  type: String,
17
- default: defprops.backtop.text
16
+ default: () => uni.$u.props.backtop.text
18
17
  },
19
18
  // 返回顶部滚动时间
20
19
  duration: {
21
20
  type: [String, Number],
22
- default: defprops.backtop.duration
21
+ default: () => uni.$u.props.backtop.duration
23
22
  },
24
23
  // 滚动距离
25
24
  scrollTop: {
26
25
  type: [String, Number],
27
- default: defprops.backtop.scrollTop
26
+ default: () => uni.$u.props.backtop.scrollTop
28
27
  },
29
28
  // 距离顶部多少距离显示,单位px
30
29
  top: {
31
30
  type: [String, Number],
32
- default: defprops.backtop.top
31
+ default: () => uni.$u.props.backtop.top
33
32
  },
34
33
  // 返回顶部按钮到底部的距离,单位px
35
34
  bottom: {
36
35
  type: [String, Number],
37
- default: defprops.backtop.bottom
36
+ default: () => uni.$u.props.backtop.bottom
38
37
  },
39
38
  // 返回顶部按钮到右边的距离,单位px
40
39
  right: {
41
40
  type: [String, Number],
42
- default: defprops.backtop.right
41
+ default: () => uni.$u.props.backtop.right
43
42
  },
44
43
  // 层级
45
44
  zIndex: {
46
45
  type: [String, Number],
47
- default: defprops.backtop.zIndex
46
+ default: () => uni.$u.props.backtop.zIndex
48
47
  },
49
48
  // 图标的样式,对象形式
50
49
  iconStyle: {
51
50
  type: Object,
52
- default: defprops.backtop.iconStyle
51
+ default: () => uni.$u.props.backtop.iconStyle
53
52
  }
54
53
  }
55
54
  }
@@ -1,55 +1,54 @@
1
- import defprops from '../../libs/config/props';
2
1
  export default {
3
2
  props: {
4
3
  // 是否显示圆点
5
4
  isDot: {
6
5
  type: Boolean,
7
- default: defprops.badge.isDot
6
+ default: () => uni.$u.props.badge.isDot
8
7
  },
9
8
  // 显示的内容
10
9
  value: {
11
10
  type: [Number, String],
12
- default: defprops.badge.value
11
+ default: () => uni.$u.props.badge.value
13
12
  },
14
13
  // 显示的内容
15
14
  modelValue: {
16
15
  type: [Number, String],
17
- default: defprops.badge.modelValue
16
+ default: () => uni.$u.props.badge.modelValue
18
17
  },
19
18
  // 是否显示
20
19
  show: {
21
20
  type: Boolean,
22
- default: defprops.badge.show
21
+ default: () => uni.$u.props.badge.show
23
22
  },
24
23
  // 最大值,超过最大值会显示 '{max}+'
25
24
  max: {
26
25
  type: [Number, String],
27
- default: defprops.badge.max
26
+ default: () => uni.$u.props.badge.max
28
27
  },
29
28
  // 主题类型,error|warning|success|primary
30
29
  type: {
31
30
  type: String,
32
- default: defprops.badge.type
31
+ default: () => uni.$u.props.badge.type
33
32
  },
34
33
  // 当数值为 0 时,是否展示 Badge
35
34
  showZero: {
36
35
  type: Boolean,
37
- default: defprops.badge.showZero
36
+ default: () => uni.$u.props.badge.showZero
38
37
  },
39
38
  // 背景颜色,优先级比type高,如设置,type参数会失效
40
39
  bgColor: {
41
40
  type: [String, null],
42
- default: defprops.badge.bgColor
41
+ default: () => uni.$u.props.badge.bgColor
43
42
  },
44
43
  // 字体颜色
45
44
  color: {
46
45
  type: [String, null],
47
- default: defprops.badge.color
46
+ default: () => uni.$u.props.badge.color
48
47
  },
49
48
  // 徽标形状,circle-四角均为圆角,horn-左下角为直角
50
49
  shape: {
51
50
  type: String,
52
- default: defprops.badge.shape
51
+ default: () => uni.$u.props.badge.shape
53
52
  },
54
53
  // 设置数字的显示方式,overflow|ellipsis|limit
55
54
  // overflow会根据max字段判断,超出显示`${max}+`
@@ -57,22 +56,22 @@ export default {
57
56
  // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数
58
57
  numberType: {
59
58
  type: String,
60
- default: defprops.badge.numberType
59
+ default: () => uni.$u.props.badge.numberType
61
60
  },
62
61
  // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
63
62
  offset: {
64
63
  type: Array,
65
- default: defprops.badge.offset
64
+ default: () => uni.$u.props.badge.offset
66
65
  },
67
66
  // 是否反转背景和字体颜色
68
67
  inverted: {
69
68
  type: Boolean,
70
- default: defprops.badge.inverted
69
+ default: () => uni.$u.props.badge.inverted
71
70
  },
72
71
  // 是否绝对定位
73
72
  absolute: {
74
73
  type: Boolean,
75
- default: defprops.badge.absolute
74
+ default: () => uni.$u.props.badge.absolute
76
75
  }
77
76
  }
78
77
  }