uview-plus 3.1.52 → 3.2.5

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 (134) hide show
  1. package/changelog.md +51 -0
  2. package/components/u-action-sheet/u-action-sheet.vue +1 -1
  3. package/components/u-album/u-album.vue +261 -261
  4. package/components/u-avatar/u-avatar.vue +3 -2
  5. package/components/u-avatar-group/u-avatar-group.vue +106 -106
  6. package/components/u-button/u-button.vue +6 -1
  7. package/components/u-calendar/u-calendar.vue +4 -3
  8. package/components/u-cell/u-cell.vue +4 -2
  9. package/components/u-checkbox/props.js +5 -0
  10. package/components/u-checkbox/u-checkbox.vue +29 -17
  11. package/components/u-code/u-code.vue +1 -1
  12. package/components/u-dropdown/props.js +8 -14
  13. package/components/u-dropdown/u-dropdown.vue +202 -77
  14. package/components/u-dropdown-item/props.js +45 -36
  15. package/components/u-dropdown-item/u-dropdown-item.vue +121 -148
  16. package/components/u-form/u-form.vue +1 -1
  17. package/components/u-form-item/props.js +6 -1
  18. package/components/u-form-item/u-form-item.vue +1 -1
  19. package/components/u-grid/u-grid.vue +4 -2
  20. package/components/u-grid-item/u-grid-item.vue +8 -7
  21. package/components/u-input/u-input.vue +1 -1
  22. package/components/u-lazy-load/u-lazy-load.vue +251 -0
  23. package/components/u-number-box/u-number-box.vue +4 -4
  24. package/components/u-picker/u-picker.vue +5 -2
  25. package/components/u-popup/u-popup.vue +1 -1
  26. package/components/u-radio/u-radio.vue +2 -2
  27. package/components/u-rate/u-rate.vue +1 -1
  28. package/components/u-read-more/u-read-more.vue +164 -160
  29. package/components/u-slider/u-slider.vue +6 -6
  30. package/components/u-steps-item/u-steps-item.vue +318 -318
  31. package/components/u-subsection/u-subsection.vue +35 -21
  32. package/components/u-swiper/u-swiper.vue +6 -8
  33. package/components/u-switch/u-switch.vue +1 -1
  34. package/components/u-tabbar-item/u-tabbar-item.vue +1 -1
  35. package/components/u-tabs/u-tabs.vue +1 -0
  36. package/components/u-tag/props.js +5 -2
  37. package/components/u-tag/u-tag.vue +1 -1
  38. package/components/u-text/u-text.vue +226 -226
  39. package/components/u-textarea/u-textarea.vue +275 -275
  40. package/components/u-transition/u-transition.vue +1 -1
  41. package/components/u-waterfall/u-waterfall.vue +225 -0
  42. package/index.js +5 -2
  43. package/libs/config/props/formItem.js +1 -0
  44. package/libs/config/props/tag.js +30 -29
  45. package/libs/css/common.scss +4 -1
  46. package/libs/css/components.scss +5 -5
  47. package/libs/css/flex.scss +45 -45
  48. package/libs/mixin/mixin.js +2 -2
  49. package/libs/mixin/mpShare.js +15 -13
  50. package/package.json +1 -1
  51. package/types/comps/_common.d.ts +9 -0
  52. package/types/comps/actionSheet.d.ts +121 -0
  53. package/types/comps/album.d.ts +72 -0
  54. package/types/comps/alert.d.ts +55 -0
  55. package/types/comps/avatar.d.ts +85 -0
  56. package/types/comps/avatarGroup.d.ts +62 -0
  57. package/types/comps/backTop.d.ts +74 -0
  58. package/types/comps/badge.d.ts +76 -0
  59. package/types/comps/button.d.ts +169 -0
  60. package/types/comps/calendar.d.ts +164 -0
  61. package/types/comps/cell.d.ts +133 -0
  62. package/types/comps/cellGroup.d.ts +27 -0
  63. package/types/comps/checkbox.d.ts +69 -0
  64. package/types/comps/checkboxGroup.d.ts +93 -0
  65. package/types/comps/code.d.ts +69 -0
  66. package/types/comps/codeInput.d.ts +98 -0
  67. package/types/comps/col.d.ts +43 -0
  68. package/types/comps/collapse.d.ts +52 -0
  69. package/types/comps/collapseItem.d.ts +83 -0
  70. package/types/comps/countDown.d.ts +60 -0
  71. package/types/comps/countTo.d.ts +88 -0
  72. package/types/comps/datetimePicker.d.ts +146 -0
  73. package/types/comps/divider.d.ts +58 -0
  74. package/types/comps/empty.d.ts +72 -0
  75. package/types/comps/form.d.ts +76 -0
  76. package/types/comps/formItem.d.ts +68 -0
  77. package/types/comps/gap.d.ts +35 -0
  78. package/types/comps/grid.d.ts +34 -0
  79. package/types/comps/gridItem.d.ts +28 -0
  80. package/types/comps/icon.d.ts +93 -0
  81. package/types/comps/image.d.ts +119 -0
  82. package/types/comps/indexAnchor.d.ts +38 -0
  83. package/types/comps/indexItem.d.ts +18 -0
  84. package/types/comps/indexList.d.ts +39 -0
  85. package/types/comps/input.d.ts +234 -0
  86. package/types/comps/keyboard.d.ts +125 -0
  87. package/types/comps/line.d.ts +44 -0
  88. package/types/comps/lineProgress.d.ts +51 -0
  89. package/types/comps/link.d.ts +51 -0
  90. package/types/comps/list.d.ts +92 -0
  91. package/types/comps/listItem.d.ts +18 -0
  92. package/types/comps/loadMore.d.ts +108 -0
  93. package/types/comps/loadingIcon.d.ts +68 -0
  94. package/types/comps/loadingPage.d.ts +58 -0
  95. package/types/comps/modal.d.ts +115 -0
  96. package/types/comps/navbar.d.ts +113 -0
  97. package/types/comps/noNetwork.d.ts +40 -0
  98. package/types/comps/noticeBar.d.ts +85 -0
  99. package/types/comps/notify.d.ts +73 -0
  100. package/types/comps/numberBox.d.ts +155 -0
  101. package/types/comps/overlay.d.ts +46 -0
  102. package/types/comps/parse.d.ts +101 -0
  103. package/types/comps/picker.d.ts +115 -0
  104. package/types/comps/popup.d.ts +103 -0
  105. package/types/comps/radio.d.ts +77 -0
  106. package/types/comps/radioGroup.d.ts +97 -0
  107. package/types/comps/rate.d.ts +85 -0
  108. package/types/comps/readMore.d.ts +80 -0
  109. package/types/comps/row.d.ts +34 -0
  110. package/types/comps/scrollList.d.ts +51 -0
  111. package/types/comps/search.d.ts +167 -0
  112. package/types/comps/skeleton.d.ts +70 -0
  113. package/types/comps/slider.d.ts +79 -0
  114. package/types/comps/steps.d.ts +48 -0
  115. package/types/comps/stepsItem.d.ts +41 -0
  116. package/types/comps/sticky.d.ts +48 -0
  117. package/types/comps/subsection.d.ts +64 -0
  118. package/types/comps/swipeAction.d.ts +24 -0
  119. package/types/comps/swipeActionItem.d.ts +58 -0
  120. package/types/comps/swiper.d.ts +142 -0
  121. package/types/comps/swiperIndicator.d.ts +37 -0
  122. package/types/comps/switch.d.ts +73 -0
  123. package/types/comps/tabbar.d.ts +54 -0
  124. package/types/comps/tabbarItem.d.ts +52 -0
  125. package/types/comps/tabs.d.ts +85 -0
  126. package/types/comps/tag.d.ts +93 -0
  127. package/types/comps/text.d.ts +110 -0
  128. package/types/comps/textarea.d.ts +158 -0
  129. package/types/comps/toast.d.ts +59 -0
  130. package/types/comps/tooltip.d.ts +71 -0
  131. package/types/comps/transition.d.ts +61 -0
  132. package/types/comps/upload.d.ts +163 -0
  133. package/types/comps.d.ts +99 -0
  134. package/types/index.d.ts +47 -0
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view class="u-number-box">
3
3
  <view
4
- class="u-number-box__slot"
4
+ class="u-number-box__slot cursor-pointer"
5
5
  @tap.stop="clickHandler('minus')"
6
6
  @touchstart="onTouchStart('minus')"
7
7
  @touchend.stop="clearTimeout"
@@ -11,7 +11,7 @@
11
11
  </view>
12
12
  <view
13
13
  v-else-if="showMinus"
14
- class="u-number-box__minus"
14
+ class="u-number-box__minus cursor-pointer"
15
15
  @tap.stop="clickHandler('minus')"
16
16
  @touchstart="onTouchStart('minus')"
17
17
  @touchend.stop="clearTimeout"
@@ -60,7 +60,7 @@
60
60
  <!-- #endif -->
61
61
  </slot>
62
62
  <view
63
- class="u-number-box__slot"
63
+ class="u-number-box__slot cursor-pointer"
64
64
  @tap.stop="clickHandler('plus')"
65
65
  @touchstart="onTouchStart('plus')"
66
66
  @touchend.stop="clearTimeout"
@@ -70,7 +70,7 @@
70
70
  </view>
71
71
  <view
72
72
  v-else-if="showPlus"
73
- class="u-number-box__plus"
73
+ class="u-number-box__plus cursor-pointer"
74
74
  @tap.stop="clickHandler('plus')"
75
75
  @touchstart="onTouchStart('plus')"
76
76
  @touchend.stop="clearTimeout"
@@ -38,7 +38,8 @@
38
38
  :style="{
39
39
  height: $u.addUnit(itemHeight),
40
40
  lineHeight: $u.addUnit(itemHeight),
41
- fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
41
+ fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal',
42
+ display: 'block'
42
43
  }"
43
44
  >{{ getItemText(item1) }}</view>
44
45
  </picker-view-column>
@@ -79,7 +80,7 @@
79
80
  */
80
81
  import props from './props.js';
81
82
  import mpMixin from '../../libs/mixin/mpMixin.js';
82
- import mixin from '../../libs/mixin/mixin.js';
83
+ import mixin from '../../libs/mixin/mixin.js';
83
84
  export default {
84
85
  name: 'u-picker',
85
86
  mixins: [mpMixin, mixin, props],
@@ -194,6 +195,8 @@ export default {
194
195
  setColumnValues(columnIndex, values) {
195
196
  // 替换innerColumns数组中columnIndex索引的值为values,使用的是数组的splice方法
196
197
  this.innerColumns.splice(columnIndex, 1, values)
198
+ // 替换完成之后将修改列之后的已选值置空
199
+ this.setLastIndex(this.innerIndex.slice(0, columnIndex))
197
200
  // 拷贝一份原有的innerIndex做临时变量,将大于当前变化列的所有的列的默认索引设置为0
198
201
  let tmpIndex = uni.$u.deepClone(this.innerIndex)
199
202
  for (let i = 0; i < this.innerColumns.length; i++) {
@@ -57,7 +57,7 @@
57
57
  * @property {Boolean} overlay 是否显示遮罩 (默认 true )
58
58
  * @property {String} mode 弹出方向(默认 'bottom' )
59
59
  * @property {String | Number} duration 动画时长,单位ms (默认 300 )
60
- * @property {String | Number} overlayDuration 遮罩层动画时长,单位ms (默认 350 )
60
+ * @property {String | Number} overlayDuration 遮罩层动画时长,单位ms (默认 350 )
61
61
  * @property {Boolean} closeable 是否显示关闭图标(默认 false )
62
62
  * @property {Object | String} overlayStyle 自定义遮罩的样式
63
63
  * @property {String | Number} overlayOpacity 遮罩透明度,0-1之间(默认 0.5)
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <view
3
- class="u-radio"
3
+ class="u-radio cursor-pointer"
4
4
  @tap.stop="wrapperClickHandler"
5
5
  :style="[radioStyle]"
6
6
  :class="[`u-radio-label--${parentData.iconPlacement}`, parentData.borderBottom && parentData.placement === 'column' && 'u-border-bottom']"
7
7
  >
8
8
  <view
9
- class="u-radio__icon-wrap"
9
+ class="u-radio__icon-wrap cursor-pointer"
10
10
  @tap.stop="iconClickHandler"
11
11
  :class="iconClasses"
12
12
  :style="[iconWrapStyle]"
@@ -11,7 +11,7 @@
11
11
  @touchend.stop="touchEnd"
12
12
  >
13
13
  <view
14
- class="u-rate__content__item"
14
+ class="u-rate__content__item cursor-pointer"
15
15
  v-for="(item, index) in Number(count)"
16
16
  :key="index"
17
17
  :class="[elClass]"
@@ -1,160 +1,164 @@
1
- <template>
2
- <view class="u-read-more">
3
- <view
4
- class="u-read-more__content"
5
- :style="{
6
- height: isLongContent && status === 'close' ? $u.addUnit(showHeight) : $u.addUnit(contentHeight),
7
- textIndent: textIndent
8
- }"
9
- >
10
- <view
11
- class="u-read-more__content__inner"
12
- ref="u-read-more__content__inner"
13
- :class="[elId]"
14
- >
15
- <slot></slot>
16
- </view>
17
- </view>
18
- <view
19
- class="u-read-more__toggle"
20
- :style="[innerShadowStyle]"
21
- v-if="isLongContent"
22
- >
23
- <slot name="toggle">
24
- <view
25
- class="u-read-more__toggle__text"
26
- @tap="toggleReadMore"
27
- >
28
- <u--text
29
- :text="status === 'close' ? closeText : openText"
30
- :color="color"
31
- :size="fontSize"
32
- :lineHeight="fontSize"
33
- margin="0 5px 0 0"
34
- ></u--text>
35
- <view class="u-read-more__toggle__icon">
36
- <u-icon
37
- :color="color"
38
- :size="fontSize + 2"
39
- :name="status === 'close' ? 'arrow-down' : 'arrow-up'"
40
- ></u-icon>
41
- </view>
42
- </view>
43
- </slot>
44
- </view>
45
- </view>
46
- </template>
47
-
48
- <script>
49
- // #ifdef APP-NVUE
50
- const dom = uni.requireNativePlugin('dom')
51
- // #endif
52
- import props from './props.js';
53
- import mpMixin from '../../libs/mixin/mpMixin.js';
54
- import mixin from '../../libs/mixin/mixin.js';
55
- /**
56
- * readMore 阅读更多
57
- * @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
58
- * @tutorial https://ijry.github.io/uview-plus/components/readMore.html
59
- * @property {String | Number} showHeight 内容超出此高度才会显示展开全文按钮,单位px(默认 400 )
60
- * @property {Boolean} toggle 展开后是否显示收起按钮(默认 false )
61
- * @property {String} closeText 关闭时的提示文字(默认 '展开阅读全文' )
62
- * @property {String} openText 展开时的提示文字(默认 '收起' )
63
- * @property {String} color 提示文字的颜色(默认 '#2979ff' )
64
- * @property {String | Number} fontSize 提示文字的大小,单位px (默认 14 )
65
- * @property {Object} shadowStyle 显示阴影的样式
66
- * @property {String} textIndent 段落首行缩进的字符个数 (默认 '2em' )
67
- * @property {String | Number} name 用于在 open 和 close 事件中当作回调参数返回
68
- * @event {Function} open 内容被展开时触发
69
- * @event {Function} close 内容被收起时触发
70
- * @example <u-read-more><rich-text :nodes="content"></rich-text></u-read-more>
71
- */
72
- export default {
73
- name: 'u-read-more',
74
- mixins: [mpMixin, mixin, props],
75
- data() {
76
- return {
77
- isLongContent: false, // 是否需要隐藏一部分内容
78
- status: 'close', // 当前隐藏与显示的状态,close-收起状态,open-展开状态
79
- elId: uni.$u.guid(), // 生成唯一class
80
- contentHeight: 100, // 内容高度
81
- }
82
- },
83
- computed: {
84
- // 展开后无需阴影,收起时才需要阴影样式
85
- innerShadowStyle() {
86
- if (this.status === 'open') return {}
87
- else return this.shadowStyle
88
- }
89
- },
90
- mounted() {
91
- this.init()
92
- },
93
- emits: ["open", "close"],
94
- methods: {
95
- async init() {
96
- this.getContentHeight().then(height => {
97
- this.contentHeight = height
98
- // 判断高度,如果真实内容高度大于占位高度,则显示收起与展开的控制按钮
99
- if (height > uni.$u.getPx(this.showHeight)) {
100
- this.isLongContent = true
101
- this.status = 'close'
102
- }
103
- })
104
- },
105
- // 获取内容的高度
106
- async getContentHeight() {
107
- // 延时一定时间再获取节点
108
- await uni.$u.sleep(30)
109
- return new Promise(resolve => {
110
- // #ifndef APP-NVUE
111
- this.$uGetRect('.' + this.elId).then(res => {
112
- resolve(res.height)
113
- })
114
- // #endif
115
-
116
- // #ifdef APP-NVUE
117
- const ref = this.$refs['u-read-more__content__inner']
118
- dom.getComponentRect(ref, (res) => {
119
- resolve(res.size.height)
120
- })
121
- // #endif
122
- })
123
- },
124
- // 展开或者收起
125
- toggleReadMore() {
126
- this.status = this.status === 'close' ? 'open' : 'close'
127
- // 如果toggle为false,隐藏"收起"部分的内容
128
- if (this.toggle == false) this.isLongContent = false
129
- // 发出打开或者收齐的事件
130
- this.$emit(this.status, this.name)
131
- }
132
- }
133
- }
134
- </script>
135
-
136
- <style lang="scss" scoped>
137
- @import "../../libs/css/components.scss";
138
-
139
- .u-read-more {
140
-
141
- &__content {
142
- overflow: hidden;
143
- color: $u-content-color;
144
- font-size: 15px;
145
- text-align: left;
146
- }
147
-
148
- &__toggle {
149
- @include flex;
150
- justify-content: center;
151
-
152
- &__text {
153
- @include flex;
154
- align-items: center;
155
- justify-content: center;
156
- margin-top: 5px;
157
- }
158
- }
159
- }
160
- </style>
1
+ <template>
2
+ <view class="u-read-more">
3
+ <view
4
+ class="u-read-more__content"
5
+ :style="{
6
+ height: isLongContent && status === 'close' ? $u.addUnit(showHeight) : $u.addUnit(contentHeight),
7
+ textIndent: textIndent
8
+ }"
9
+ >
10
+ <view
11
+ class="u-read-more__content__inner"
12
+ ref="u-read-more__content__inner"
13
+ :class="[elId]"
14
+ >
15
+ <slot></slot>
16
+ </view>
17
+ </view>
18
+ <view
19
+ class="u-read-more__toggle"
20
+ :style="[innerShadowStyle]"
21
+ v-if="isLongContent"
22
+ >
23
+ <slot name="toggle">
24
+ <view
25
+ class="u-read-more__toggle__text"
26
+ @tap="toggleReadMore"
27
+ >
28
+ <up-text
29
+ :text="status === 'close' ? closeText : openText"
30
+ :color="color"
31
+ :size="fontSize"
32
+ :lineHeight="fontSize"
33
+ margin="0 5px 0 0"
34
+ ></up-text>
35
+ <view class="u-read-more__toggle__icon">
36
+ <u-icon
37
+ :color="color"
38
+ :size="fontSize + 2"
39
+ :name="status === 'close' ? 'arrow-down' : 'arrow-up'"
40
+ ></u-icon>
41
+ </view>
42
+ </view>
43
+ </slot>
44
+ </view>
45
+ </view>
46
+ </template>
47
+
48
+ <script>
49
+ // #ifdef APP-NVUE
50
+ const dom = uni.requireNativePlugin('dom')
51
+ // #endif
52
+ import props from './props.js';
53
+ import mpMixin from '../../libs/mixin/mpMixin.js';
54
+ import mixin from '../../libs/mixin/mixin.js';
55
+ /**
56
+ * readMore 阅读更多
57
+ * @description 该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。
58
+ * @tutorial https://ijry.github.io/uview-plus/components/readMore.html
59
+ * @property {String | Number} showHeight 内容超出此高度才会显示展开全文按钮,单位px(默认 400 )
60
+ * @property {Boolean} toggle 展开后是否显示收起按钮(默认 false )
61
+ * @property {String} closeText 关闭时的提示文字(默认 '展开阅读全文' )
62
+ * @property {String} openText 展开时的提示文字(默认 '收起' )
63
+ * @property {String} color 提示文字的颜色(默认 '#2979ff' )
64
+ * @property {String | Number} fontSize 提示文字的大小,单位px (默认 14 )
65
+ * @property {Object} shadowStyle 显示阴影的样式
66
+ * @property {String} textIndent 段落首行缩进的字符个数 (默认 '2em' )
67
+ * @property {String | Number} name 用于在 open 和 close 事件中当作回调参数返回
68
+ * @event {Function} open 内容被展开时触发
69
+ * @event {Function} close 内容被收起时触发
70
+ * @example <u-read-more><rich-text :nodes="content"></rich-text></u-read-more>
71
+ */
72
+ export default {
73
+ name: 'u-read-more',
74
+ mixins: [mpMixin, mixin, props],
75
+ data() {
76
+ return {
77
+ isLongContent: false, // 是否需要隐藏一部分内容
78
+ status: 'close', // 当前隐藏与显示的状态,close-收起状态,open-展开状态
79
+ elId: uni.$u.guid(), // 生成唯一class
80
+ contentHeight: 100, // 内容高度
81
+ }
82
+ },
83
+ computed: {
84
+ // 展开后无需阴影,收起时才需要阴影样式
85
+ innerShadowStyle() {
86
+ if (this.status === 'open') return {}
87
+ else return this.shadowStyle
88
+ }
89
+ },
90
+ mounted() {
91
+ this.init()
92
+ },
93
+ emits: ["open", "close"],
94
+ methods: {
95
+ async init() {
96
+ this.getContentHeight().then(height => {
97
+ this.contentHeight = height
98
+ // 判断高度,如果真实内容高度大于占位高度,则显示收起与展开的控制按钮
99
+ if (height > uni.$u.getPx(this.showHeight)) {
100
+ this.isLongContent = true
101
+ this.status = 'close'
102
+ } else {
103
+ // https://github.com/ijry/uview-plus/issues/270
104
+ this.isLongContent = false
105
+ this.status = 'close'
106
+ }
107
+ })
108
+ },
109
+ // 获取内容的高度
110
+ async getContentHeight() {
111
+ // 延时一定时间再获取节点
112
+ await uni.$u.sleep(30)
113
+ return new Promise(resolve => {
114
+ // #ifndef APP-NVUE
115
+ this.$uGetRect('.' + this.elId).then(res => {
116
+ resolve(res.height)
117
+ })
118
+ // #endif
119
+
120
+ // #ifdef APP-NVUE
121
+ const ref = this.$refs['u-read-more__content__inner']
122
+ dom.getComponentRect(ref, (res) => {
123
+ resolve(res.size.height)
124
+ })
125
+ // #endif
126
+ })
127
+ },
128
+ // 展开或者收起
129
+ toggleReadMore() {
130
+ this.status = this.status === 'close' ? 'open' : 'close'
131
+ // 如果toggle为false,隐藏"收起"部分的内容
132
+ if (this.toggle == false) this.isLongContent = false
133
+ // 发出打开或者收齐的事件
134
+ this.$emit(this.status, this.name)
135
+ }
136
+ }
137
+ }
138
+ </script>
139
+
140
+ <style lang="scss" scoped>
141
+ @import "../../libs/css/components.scss";
142
+
143
+ .u-read-more {
144
+
145
+ &__content {
146
+ overflow: hidden;
147
+ color: $u-content-color;
148
+ font-size: 15px;
149
+ text-align: left;
150
+ }
151
+
152
+ &__toggle {
153
+ @include flex;
154
+ justify-content: center;
155
+
156
+ &__text {
157
+ @include flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ margin-top: 5px;
161
+ }
162
+ }
163
+ }
164
+ </style>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <view
3
3
  class="u-slider"
4
- :style="[$u.addStyle(customStyle)]"
4
+ :style="[addStyle(customStyle)]"
5
5
  >
6
6
  <slider
7
7
  :min="min"
@@ -10,7 +10,7 @@
10
10
  :value="modelValue"
11
11
  :activeColor="activeColor"
12
12
  :backgroundColor="inactiveColor"
13
- :blockSize="$u.getPx(blockSize)"
13
+ :blockSize="getPx(blockSize)"
14
14
  :blockColor="blockColor"
15
15
  :showValue="showValue"
16
16
  :disabled="disabled"
@@ -20,15 +20,15 @@
20
20
  </view>
21
21
  </template>
22
22
 
23
- <script>
23
+ <script>
24
24
  import props from './props.js';
25
25
  import mpMixin from '../../libs/mixin/mpMixin.js';
26
- import mixin from '../../libs/mixin/mixin.js';
26
+ import mixin from '../../libs/mixin/mixin.js';
27
27
  export default {
28
- name: 'u--slider',
28
+ name: 'up-slider',
29
29
  mixins: [mpMixin, mixin, props],
30
30
  emits: ["changing", "change", "update:modelValue"],
31
- methods: {
31
+ methods: {
32
32
  // 拖动过程中触发
33
33
  changingHandler(e) {
34
34
  const {