@varlet/ui 2.10.0 → 2.10.1-alpha.1682608027166
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/date-picker/src/day-picker-panel.mjs +2 -2
- package/es/date-picker/src/month-picker-panel.mjs +2 -2
- package/es/index.bundle.mjs +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/slider/Slider.mjs +67 -33
- package/es/slider/props.mjs +4 -0
- package/es/slider/slider.css +1 -1
- package/es/snackbar/style/index.mjs +1 -1
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +8 -3
- package/es/varlet.esm.js +7310 -7374
- package/highlight/web-types.en-US.json +10 -1
- package/highlight/web-types.zh-CN.json +10 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +658 -707
- package/package.json +6 -6
- package/types/slider.d.ts +4 -1
- package/umd/varlet.js +5 -5
package/es/swipe/Swipe.mjs
CHANGED
|
@@ -87,6 +87,7 @@ var __sfc__ = defineComponent({
|
|
|
87
87
|
bindSwipeItems,
|
|
88
88
|
length
|
|
89
89
|
} = useSwipeItems();
|
|
90
|
+
var isCalledPrevOrNext = false;
|
|
90
91
|
var touching = false;
|
|
91
92
|
var timer = -1;
|
|
92
93
|
var startX;
|
|
@@ -325,6 +326,7 @@ var __sfc__ = defineComponent({
|
|
|
325
326
|
return;
|
|
326
327
|
}
|
|
327
328
|
|
|
329
|
+
isCalledPrevOrNext = true;
|
|
328
330
|
var {
|
|
329
331
|
loop,
|
|
330
332
|
onChange
|
|
@@ -355,6 +357,7 @@ var __sfc__ = defineComponent({
|
|
|
355
357
|
return;
|
|
356
358
|
}
|
|
357
359
|
|
|
360
|
+
isCalledPrevOrNext = true;
|
|
358
361
|
var {
|
|
359
362
|
loop,
|
|
360
363
|
onChange
|
|
@@ -404,9 +407,11 @@ var __sfc__ = defineComponent({
|
|
|
404
407
|
};
|
|
405
408
|
bindSwipeItems(swipeProvider);
|
|
406
409
|
watch(() => length.value, /*#__PURE__*/_asyncToGenerator(function* () {
|
|
407
|
-
// In nuxt, the size of the swipe cannot got when the route is change, need double raf
|
|
408
|
-
|
|
409
|
-
|
|
410
|
+
isCalledPrevOrNext = false; // In nuxt, the size of the swipe cannot got when the route is change, need double raf
|
|
411
|
+
|
|
412
|
+
yield doubleRaf(); // When double raf prev or next is called will block initialIndex
|
|
413
|
+
|
|
414
|
+
!isCalledPrevOrNext && initialIndex();
|
|
410
415
|
resize();
|
|
411
416
|
}));
|
|
412
417
|
onActivated(resize);
|