uview-plus 3.3.28 → 3.3.30

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 CHANGED
@@ -1,5 +1,11 @@
1
+ ## 3.3.30(2024-08-30)
2
+ fix: slider兼容step为字符串类型
3
+ ## 3.3.29(2024-08-30)
4
+ fix: 修复tabs组件current参数为字符串处理逻辑
5
+
1
6
  ## 3.3.28(2024-08-26)
2
7
  fix: list组件滑动偏移量不一样取绝对值导致iOS下拉偏移量计算错误
8
+
3
9
  ## 3.3.27(2024-08-22)
4
10
  fix: 修复up-datetime-picker组件toolbarRightSlot定义缺失
5
11
 
@@ -7,8 +13,10 @@ fix: 修复FormItem的rules更新错误的问题
7
13
 
8
14
  ## 3.3.26(2024-08-22)
9
15
  fix: 批量注册全局组件优化
16
+
10
17
  ## 3.3.25(2024-08-21)
11
18
  fix: 修复slider在app-vue下样式问题
19
+
12
20
  ## 3.3.24(2024-08-19)
13
21
  fix: 修复时间选择器hasInput模式小程序不生效
14
22
 
@@ -302,20 +302,21 @@
302
302
  },
303
303
  onTouchStart2(event, index = 1) {
304
304
  if (!this.isRange) {
305
- this.onChangeStart(event, index);
305
+ // this.onChangeStart(event, index);
306
306
  }
307
307
  },
308
308
  onTouchMove2(event, index = 1) {
309
309
  if (!this.isRange) {
310
- this.onTouchMove(event, index);
310
+ // this.onTouchMove(event, index);
311
311
  }
312
312
  },
313
313
  onTouchEnd2(event, index = 1) {
314
314
  if (!this.isRange) {
315
- this.onTouchEnd(event, index);
315
+ // this.onTouchEnd(event, index);
316
316
  }
317
317
  },
318
318
  onClick(event) {
319
+ // if (this.isRange) return;
319
320
  if (this.disabled) return;
320
321
  // 直接点击滑块的情况,计算方式与onTouchMove方法相同
321
322
  // console.log('click', event)
@@ -376,15 +377,15 @@
376
377
  switch (index) {
377
378
  case 0:
378
379
  return Math.round(
379
- Math.max(this.min, Math.min(value, this.rangeValue[1] - this.step,this.max))
380
- / this.step
381
- ) * this.step;
380
+ Math.max(this.min, Math.min(value, this.rangeValue[1] - parseInt(this.step),this.max))
381
+ / parseInt(this.step)
382
+ ) * parseInt(this.step);
382
383
  break;
383
384
  case 1:
384
385
  return Math.round(
385
- Math.max(this.min, this.rangeValue[0] + this.step, Math.min(value, this.max))
386
- / this.step
387
- ) * this.step;
386
+ Math.max(this.min, this.rangeValue[0] + parseInt(this.step), Math.min(value, this.max))
387
+ / parseInt(this.step)
388
+ ) * parseInt(this.step);
388
389
  break;
389
390
  default:
390
391
  break;
@@ -392,8 +393,8 @@
392
393
  } else {
393
394
  return Math.round(
394
395
  Math.max(this.min, Math.min(value, this.max))
395
- / this.step
396
- ) * this.step;
396
+ / parseInt(this.step)
397
+ ) * parseInt(this.step);
397
398
  }
398
399
  }
399
400
  }
@@ -128,7 +128,11 @@
128
128
  handler (newValue, oldValue) {
129
129
  // 内外部值不相等时,才尝试移动滑块
130
130
  if (newValue !== this.innerCurrent) {
131
- this.innerCurrent = newValue
131
+ if (typeof newValue == 'string') {
132
+ this.innerCurrent = parseInt(newValue)
133
+ } else {
134
+ this.innerCurrent = newValue
135
+ }
132
136
  this.$nextTick(() => {
133
137
  this.resize()
134
138
  })
@@ -147,7 +151,9 @@
147
151
  return index => {
148
152
  const style = {}
149
153
  // 取当期是否激活的样式
150
- const customeStyle = index === this.innerCurrent ? addStyle(this.activeStyle) : addStyle(this.inactiveStyle)
154
+ const customeStyle = (index == this.innerCurrent)
155
+ ? addStyle(this.activeStyle)
156
+ : addStyle(this.inactiveStyle)
151
157
  // 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
152
158
  if (this.list[index].disabled) {
153
159
  style.color = '#c8c9cc'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "uview-plus",
3
3
  "name": "uview-plus",
4
4
  "displayName": "零云®uview-plus3.0重磅发布,全面的Vue3移动组件库。",
5
- "version": "3.3.28",
5
+ "version": "3.3.30",
6
6
  "description": "零云®uview-plus已兼容vue3,全面的组件和便捷的工具会让您信手拈来,如鱼得水",
7
7
  "keywords": [
8
8
  "uview",