uview-plus 3.3.29 → 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 +2 -0
- package/components/u-slider/u-slider.vue +12 -11
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -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
|
}
|