@varlet/ui 2.11.6 → 2.11.8
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/popup/Popup.mjs +31 -29
- package/es/popup/provide.mjs +26 -0
- package/es/progress/progress.css +1 -1
- package/es/style.css +1 -1
- package/es/swipe/Swipe.mjs +25 -0
- package/es/themes/dark/index.mjs +2 -1
- package/es/themes/dark/progress.mjs +3 -0
- package/es/varlet.esm.js +4706 -4668
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +84 -27
- package/package.json +6 -6
- package/umd/varlet.js +5 -5
package/es/swipe/Swipe.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { props } from './props.mjs';
|
|
|
9
9
|
import { clamp, isNumber, toNumber } from '@varlet/shared';
|
|
10
10
|
import { call, createNamespace } from '../utils/components.mjs';
|
|
11
11
|
import { onSmartUnmounted, onWindowResize } from '@varlet/use';
|
|
12
|
+
import { usePopup } from '../popup/provide.mjs';
|
|
12
13
|
var SWIPE_DELAY = 250;
|
|
13
14
|
var SWIPE_DISTANCE = 20;
|
|
14
15
|
var {
|
|
@@ -87,6 +88,10 @@ var __sfc__ = defineComponent({
|
|
|
87
88
|
bindSwipeItems,
|
|
88
89
|
length
|
|
89
90
|
} = useSwipeItems();
|
|
91
|
+
var {
|
|
92
|
+
popup,
|
|
93
|
+
bindPopup
|
|
94
|
+
} = usePopup();
|
|
90
95
|
var initializedIndex = false;
|
|
91
96
|
var touching = false;
|
|
92
97
|
var timer = -1;
|
|
@@ -411,12 +416,32 @@ var __sfc__ = defineComponent({
|
|
|
411
416
|
vertical
|
|
412
417
|
};
|
|
413
418
|
bindSwipeItems(swipeProvider);
|
|
419
|
+
call(bindPopup, null);
|
|
414
420
|
watch(() => length.value, /*#__PURE__*/_asyncToGenerator(function* () {
|
|
415
421
|
// In nuxt, the size of the swipe cannot got when the route is change, need double raf
|
|
416
422
|
yield doubleRaf();
|
|
417
423
|
initialIndex();
|
|
418
424
|
resize();
|
|
419
425
|
}));
|
|
426
|
+
|
|
427
|
+
if (popup) {
|
|
428
|
+
// watch popup show again
|
|
429
|
+
watch(() => popup.show.value, /*#__PURE__*/function () {
|
|
430
|
+
var _ref3 = _asyncToGenerator(function* (show) {
|
|
431
|
+
if (show) {
|
|
432
|
+
yield doubleRaf();
|
|
433
|
+
resize();
|
|
434
|
+
} else {
|
|
435
|
+
stopAutoplay();
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
return function (_x) {
|
|
440
|
+
return _ref3.apply(this, arguments);
|
|
441
|
+
};
|
|
442
|
+
}());
|
|
443
|
+
}
|
|
444
|
+
|
|
420
445
|
onActivated(resize);
|
|
421
446
|
onSmartUnmounted(stopAutoplay);
|
|
422
447
|
onWindowResize(resize);
|
package/es/themes/dark/index.mjs
CHANGED
|
@@ -35,6 +35,7 @@ import breadcrumb from './breadcrumb.mjs';
|
|
|
35
35
|
import paper from './paper.mjs';
|
|
36
36
|
import avatar from './avatar.mjs';
|
|
37
37
|
import link from './link.mjs';
|
|
38
|
+
import progress from './progress.mjs';
|
|
38
39
|
export default _extends({
|
|
39
40
|
// common
|
|
40
41
|
'--color-body': '#1e1e1e',
|
|
@@ -46,4 +47,4 @@ export default _extends({
|
|
|
46
47
|
'--color-danger': '#ef5350',
|
|
47
48
|
'--color-disabled': '#404040',
|
|
48
49
|
'--color-text-disabled': '#757575'
|
|
49
|
-
}, button, cell, card, timePicker, datePicker, skeleton, tabs, tab, popup, dialog, actionSheet, chip, badge, uploader, collapse, pullRefresh, switchThemes, steps, pagination, table, fieldDecorator, select, radio, checkbox, divider, picker, appBar, bottomNavigation, bottomNavigationItem, menu, result, breadcrumb, paper, avatar, link);
|
|
50
|
+
}, button, cell, card, timePicker, datePicker, skeleton, tabs, tab, popup, dialog, actionSheet, chip, badge, uploader, collapse, pullRefresh, switchThemes, steps, pagination, table, fieldDecorator, select, radio, checkbox, divider, picker, appBar, bottomNavigation, bottomNavigationItem, menu, result, breadcrumb, paper, avatar, link, progress);
|