@varlet/ui 2.10.0 → 2.10.1-alpha.1682526037541
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/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/swipe/Swipe.mjs +8 -3
- package/es/varlet.esm.js +2567 -2565
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +6 -2
- package/package.json +6 -6
- package/umd/varlet.js +4 -4
package/es/index.bundle.mjs
CHANGED
|
@@ -241,7 +241,7 @@ import './time-picker/style/index.mjs'
|
|
|
241
241
|
import './tooltip/style/index.mjs'
|
|
242
242
|
import './uploader/style/index.mjs'
|
|
243
243
|
|
|
244
|
-
const version = '2.10.
|
|
244
|
+
const version = '2.10.1-alpha.1682526037541'
|
|
245
245
|
|
|
246
246
|
function install(app) {
|
|
247
247
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export * from './time-picker/index.mjs'
|
|
|
160
160
|
export * from './tooltip/index.mjs'
|
|
161
161
|
export * from './uploader/index.mjs'
|
|
162
162
|
|
|
163
|
-
const version = '2.10.
|
|
163
|
+
const version = '2.10.1-alpha.1682526037541'
|
|
164
164
|
|
|
165
165
|
function install(app) {
|
|
166
166
|
ActionSheet.install && app.use(ActionSheet)
|
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);
|