@varlet/ui 2.20.5 → 2.20.7
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/es/field-decorator/FieldDecorator.mjs +9 -8
- package/es/icon/icon.css +1 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/input/Input.mjs +3 -0
- package/es/picker/Picker.mjs +18 -3
- package/es/select/Select.mjs +3 -0
- package/es/snackbar/core.mjs +4 -3
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +3 -6
- package/es/themes/dark/bottomNavigationItem.mjs +2 -1
- package/es/varlet.esm.js +1430 -1415
- package/highlight/web-types.en-US.json +9 -1
- package/highlight/web-types.zh-CN.json +9 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +41 -20
- package/package.json +9 -9
- package/types/input.d.ts +1 -0
- package/types/select.d.ts +1 -0
- package/umd/varlet.js +5 -5
package/es/swipe/Swipe.mjs
CHANGED
|
@@ -348,10 +348,6 @@ const __sfc__ = defineComponent({
|
|
|
348
348
|
function stopAutoplay() {
|
|
349
349
|
timer && clearTimeout(timer);
|
|
350
350
|
}
|
|
351
|
-
function setTrackTranslate(value) {
|
|
352
|
-
trackTranslate.value = value;
|
|
353
|
-
dispatchSwipeItems();
|
|
354
|
-
}
|
|
355
351
|
function handleTouchstart(event) {
|
|
356
352
|
return __async(this, null, function* () {
|
|
357
353
|
if (length.value <= 1 || !props2.touchable) {
|
|
@@ -373,7 +369,8 @@ const __sfc__ = defineComponent({
|
|
|
373
369
|
return;
|
|
374
370
|
}
|
|
375
371
|
preventDefault(event);
|
|
376
|
-
|
|
372
|
+
trackTranslate.value += vertical2 ? moveY.value : moveX.value;
|
|
373
|
+
dispatchSwipeItems();
|
|
377
374
|
}
|
|
378
375
|
function handleTouchend() {
|
|
379
376
|
if (!touching.value) {
|
|
@@ -389,7 +386,7 @@ const __sfc__ = defineComponent({
|
|
|
389
386
|
const quickSwiping = performance.now() - startTime.value <= SWIPE_DELAY && offset >= SWIPE_OFFSET;
|
|
390
387
|
const swipeIndex = quickSwiping ? positive ? getSwipeIndex(index.value + 1) : getSwipeIndex(index.value - 1) : getSwipeIndex();
|
|
391
388
|
lockDuration.value = false;
|
|
392
|
-
|
|
389
|
+
trackTranslate.value = swipeIndex * -size.value;
|
|
393
390
|
const prevIndex = index.value;
|
|
394
391
|
index.value = swipeIndexToIndex(swipeIndex);
|
|
395
392
|
startAutoplay();
|