vant 3.6.1 → 3.6.2
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.generated.md +30 -43
- package/es/action-bar/ActionBar.d.ts +1 -1
- package/es/action-bar/index.d.ts +1 -1
- package/es/action-bar-button/ActionBarButton.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +1 -1
- package/es/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/es/action-bar-icon/index.d.ts +1 -1
- package/es/badge/Badge.d.ts +1 -1
- package/es/badge/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +4 -3
- package/es/cell/Cell.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell-group/CellGroup.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/col/Col.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse-item/CollapseItem.d.ts +1 -1
- package/es/collapse-item/index.d.ts +1 -1
- package/es/composables/use-lazy-render.mjs +9 -5
- package/es/composables/use-lock-scroll.mjs +4 -1
- package/es/composables/use-visibility-change.mjs +6 -3
- package/es/config-provider/ConfigProvider.d.ts +1 -1
- package/es/config-provider/index.d.ts +1 -1
- package/es/coupon/Coupon.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon/utils.mjs +3 -1
- package/es/coupon-cell/CouponCell.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +1 -1
- package/es/datetime-picker/DatetimePicker.d.ts +1 -1
- package/es/datetime-picker/index.d.ts +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.d.ts +2 -2
- package/es/dropdown-item/index.d.ts +2 -2
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +1 -1
- package/es/empty/index.d.ts +1 -1
- package/es/field/Field.mjs +10 -3
- package/es/grid/Grid.d.ts +1 -1
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/GridItem.d.ts +1 -1
- package/es/grid-item/index.d.ts +1 -1
- package/es/icon/Icon.d.ts +1 -1
- package/es/icon/index.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +10 -2
- package/es/index-anchor/IndexAnchor.d.ts +1 -1
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/IndexBar.mjs +7 -3
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/lazy-component.mjs +4 -1
- package/es/lazyload/vue-lazyload/lazy-container.mjs +11 -7
- package/es/lazyload/vue-lazyload/lazy-image.mjs +24 -14
- package/es/lazyload/vue-lazyload/lazy.mjs +11 -3
- package/es/lazyload/vue-lazyload/listener.mjs +45 -33
- package/es/lazyload/vue-lazyload/util.mjs +4 -1
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/Overlay.d.ts +1 -1
- package/es/overlay/Overlay.mjs +13 -6
- package/es/overlay/index.d.ts +1 -1
- package/es/picker/Picker.mjs +7 -3
- package/es/picker/PickerColumn.mjs +6 -2
- package/es/popup/Popup.d.ts +2 -2
- package/es/popup/index.d.ts +2 -2
- package/es/popup/shared.mjs +3 -1
- package/es/progress/Progress.d.ts +1 -1
- package/es/progress/index.d.ts +1 -1
- package/es/rate/Rate.mjs +5 -3
- package/es/row/Row.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +1 -1
- package/es/skeleton/index.d.ts +1 -1
- package/es/slider/Slider.mjs +6 -2
- package/es/space/Space.d.ts +1 -1
- package/es/space/index.d.ts +1 -1
- package/es/step/Step.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/swipe/Swipe.mjs +13 -6
- package/es/swipe-cell/SwipeCell.d.ts +2 -2
- package/es/swipe-cell/SwipeCell.mjs +4 -2
- package/es/swipe-cell/index.d.ts +2 -2
- package/es/swipe-item/SwipeItem.d.ts +1 -1
- package/es/swipe-item/index.d.ts +1 -1
- package/es/tab/Tab.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/TabsTitle.d.ts +1 -1
- package/es/tabs/index.d.ts +1 -1
- package/es/utils/create.mjs +8 -2
- package/es/utils/with-install.d.ts +2 -2
- package/es/utils/with-install.mjs +4 -2
- package/lib/action-bar/ActionBar.d.ts +1 -1
- package/lib/action-bar/index.d.ts +1 -1
- package/lib/action-bar/index.js +4 -1
- package/lib/action-bar-button/ActionBarButton.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +1 -1
- package/lib/action-bar-button/index.js +4 -1
- package/lib/action-bar-icon/ActionBarIcon.d.ts +1 -1
- package/lib/action-bar-icon/index.d.ts +1 -1
- package/lib/action-bar-icon/index.js +4 -1
- package/lib/action-sheet/index.js +4 -1
- package/lib/address-edit/AddressEdit.js +4 -1
- package/lib/address-edit/index.js +4 -1
- package/lib/address-list/AddressList.js +4 -1
- package/lib/address-list/index.js +4 -1
- package/lib/area/index.js +4 -1
- package/lib/badge/Badge.d.ts +1 -1
- package/lib/badge/index.d.ts +1 -1
- package/lib/badge/index.js +4 -1
- package/lib/button/index.js +4 -1
- package/lib/calendar/Calendar.js +8 -4
- package/lib/calendar/CalendarMonth.js +4 -1
- package/lib/calendar/index.js +4 -1
- package/lib/card/index.js +4 -1
- package/lib/cascader/index.js +4 -1
- package/lib/cell/Cell.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell/index.js +4 -1
- package/lib/cell-group/CellGroup.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/cell-group/index.js +4 -1
- package/lib/checkbox/Checkbox.js +4 -1
- package/lib/checkbox/index.js +4 -1
- package/lib/checkbox-group/index.js +4 -1
- package/lib/circle/index.js +4 -1
- package/lib/col/Col.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/col/index.js +4 -1
- package/lib/collapse/index.js +4 -1
- package/lib/collapse-item/CollapseItem.d.ts +1 -1
- package/lib/collapse-item/index.d.ts +1 -1
- package/lib/collapse-item/index.js +4 -1
- package/lib/composables/use-lazy-render.js +9 -5
- package/lib/composables/use-lock-scroll.js +4 -1
- package/lib/composables/use-visibility-change.js +6 -3
- package/lib/config-provider/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/config-provider/index.js +4 -1
- package/lib/contact-card/index.js +4 -1
- package/lib/contact-edit/index.js +4 -1
- package/lib/contact-list/index.js +4 -1
- package/lib/count-down/index.js +4 -1
- package/lib/coupon/Coupon.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon/index.js +4 -1
- package/lib/coupon/utils.js +3 -1
- package/lib/coupon-cell/CouponCell.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +1 -1
- package/lib/coupon-cell/index.js +4 -1
- package/lib/coupon-list/index.js +4 -1
- package/lib/datetime-picker/DatetimePicker.d.ts +1 -1
- package/lib/datetime-picker/DatetimePicker.js +4 -1
- package/lib/datetime-picker/index.d.ts +1 -1
- package/lib/datetime-picker/index.js +4 -1
- package/lib/dialog/function-call.js +4 -1
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -1
- package/lib/dropdown-item/DropdownItem.d.ts +2 -2
- package/lib/dropdown-item/index.d.ts +2 -2
- package/lib/dropdown-item/index.js +4 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +1 -1
- package/lib/dropdown-menu/index.js +4 -1
- package/lib/empty/Empty.d.ts +1 -1
- package/lib/empty/index.d.ts +1 -1
- package/lib/empty/index.js +4 -1
- package/lib/field/Field.js +9 -2
- package/lib/field/index.js +4 -1
- package/lib/form/index.js +4 -1
- package/lib/grid/Grid.d.ts +1 -1
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid/index.js +4 -1
- package/lib/grid-item/GridItem.d.ts +1 -1
- package/lib/grid-item/index.d.ts +1 -1
- package/lib/grid-item/index.js +4 -1
- package/lib/icon/Icon.d.ts +1 -1
- package/lib/icon/index.d.ts +1 -1
- package/lib/icon/index.js +4 -1
- package/lib/image/index.js +4 -1
- package/lib/image-preview/ImagePreview.js +4 -1
- package/lib/image-preview/ImagePreviewItem.js +9 -1
- package/lib/image-preview/function-call.js +4 -1
- package/lib/index-anchor/IndexAnchor.d.ts +1 -1
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-anchor/index.js +4 -1
- package/lib/index-bar/IndexBar.js +7 -3
- package/lib/index-bar/index.js +4 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-component.js +4 -1
- package/lib/lazyload/vue-lazyload/lazy-container.js +11 -7
- package/lib/lazyload/vue-lazyload/lazy-image.js +24 -14
- package/lib/lazyload/vue-lazyload/lazy.js +15 -4
- package/lib/lazyload/vue-lazyload/listener.js +45 -33
- package/lib/lazyload/vue-lazyload/util.js +4 -1
- package/lib/list/index.js +4 -1
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/loading/index.js +4 -1
- package/lib/locale/index.js +4 -1
- package/lib/nav-bar/index.js +4 -1
- package/lib/notice-bar/index.js +4 -1
- package/lib/notify/function-call.js +4 -1
- package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
- package/lib/number-keyboard/NumberKeyboard.js +4 -1
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/number-keyboard/index.js +4 -1
- package/lib/overlay/Overlay.d.ts +1 -1
- package/lib/overlay/Overlay.js +11 -4
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/index.js +4 -1
- package/lib/pagination/index.js +4 -1
- package/lib/password-input/index.js +4 -1
- package/lib/picker/Picker.js +10 -3
- package/lib/picker/PickerColumn.js +5 -1
- package/lib/picker/index.js +4 -1
- package/lib/popover/index.js +4 -1
- package/lib/popup/Popup.d.ts +2 -2
- package/lib/popup/index.d.ts +2 -2
- package/lib/popup/index.js +4 -1
- package/lib/popup/shared.js +3 -1
- package/lib/progress/Progress.d.ts +1 -1
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/index.js +4 -1
- package/lib/pull-refresh/index.js +4 -1
- package/lib/radio/Radio.js +4 -1
- package/lib/radio/index.js +4 -1
- package/lib/radio-group/index.js +4 -1
- package/lib/rate/Rate.js +4 -2
- package/lib/rate/index.js +4 -1
- package/lib/row/Row.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/row/index.js +4 -1
- package/lib/search/index.js +4 -1
- package/lib/share-sheet/index.js +4 -1
- package/lib/sidebar/index.js +4 -1
- package/lib/sidebar-item/index.js +4 -1
- package/lib/skeleton/Skeleton.d.ts +1 -1
- package/lib/skeleton/index.d.ts +1 -1
- package/lib/skeleton/index.js +4 -1
- package/lib/slider/Slider.js +5 -1
- package/lib/slider/index.js +4 -1
- package/lib/space/Space.d.ts +1 -1
- package/lib/space/index.d.ts +1 -1
- package/lib/space/index.js +4 -1
- package/lib/step/Step.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/step/index.js +4 -1
- package/lib/stepper/index.js +4 -1
- package/lib/steps/index.js +4 -1
- package/lib/sticky/index.js +4 -1
- package/lib/submit-bar/index.js +4 -1
- package/lib/swipe/Swipe.js +12 -5
- package/lib/swipe/index.js +4 -1
- package/lib/swipe-cell/SwipeCell.d.ts +2 -2
- package/lib/swipe-cell/SwipeCell.js +3 -1
- package/lib/swipe-cell/index.d.ts +2 -2
- package/lib/swipe-cell/index.js +4 -1
- package/lib/swipe-item/SwipeItem.d.ts +1 -1
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/swipe-item/index.js +4 -1
- package/lib/switch/index.js +4 -1
- package/lib/tab/Tab.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +4 -1
- package/lib/tabbar/index.js +4 -1
- package/lib/tabbar-item/index.js +4 -1
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/Tabs.js +4 -1
- package/lib/tabs/TabsTitle.d.ts +1 -1
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +4 -1
- package/lib/tag/index.js +4 -1
- package/lib/toast/function-call.js +4 -1
- package/lib/tree-select/index.js +4 -1
- package/lib/uploader/Uploader.js +4 -1
- package/lib/uploader/index.js +4 -1
- package/lib/utils/create.js +12 -3
- package/lib/utils/with-install.d.ts +2 -2
- package/lib/utils/with-install.js +4 -2
- package/lib/vant.cjs.js +211 -101
- package/lib/vant.es.js +211 -101
- package/lib/vant.js +253 -126
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1132 -1132
- package/package.json +7 -7
package/lib/vant.js
CHANGED
@@ -132,7 +132,9 @@
|
|
132
132
|
}
|
133
133
|
function sortChildren(parent, publicChildren, internalChildren) {
|
134
134
|
const vnodes = flattenVNodes(parent.subTree.children);
|
135
|
-
internalChildren.sort(
|
135
|
+
internalChildren.sort(
|
136
|
+
(a, b) => vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode)
|
137
|
+
);
|
136
138
|
const orderedPublicChildren = internalChildren.map((item) => item.proxy);
|
137
139
|
publicChildren.sort((a, b) => {
|
138
140
|
const indexA = orderedPublicChildren.indexOf(a);
|
@@ -157,12 +159,18 @@
|
|
157
159
|
publicChildren.splice(index, 1);
|
158
160
|
internalChildren.splice(index, 1);
|
159
161
|
};
|
160
|
-
vue.provide(
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
vue.provide(
|
163
|
+
key,
|
164
|
+
Object.assign(
|
165
|
+
{
|
166
|
+
link,
|
167
|
+
unlink,
|
168
|
+
children: publicChildren,
|
169
|
+
internalChildren
|
170
|
+
},
|
171
|
+
value
|
172
|
+
)
|
173
|
+
);
|
166
174
|
};
|
167
175
|
return {
|
168
176
|
children: publicChildren,
|
@@ -691,9 +699,15 @@
|
|
691
699
|
return ` ${name2}--${mods}`;
|
692
700
|
}
|
693
701
|
if (Array.isArray(mods)) {
|
694
|
-
return mods.reduce(
|
702
|
+
return mods.reduce(
|
703
|
+
(ret, item) => ret + genBem(name2, item),
|
704
|
+
""
|
705
|
+
);
|
695
706
|
}
|
696
|
-
return Object.keys(mods).reduce(
|
707
|
+
return Object.keys(mods).reduce(
|
708
|
+
(ret, key) => ret + (mods[key] ? genBem(name2, key) : ""),
|
709
|
+
""
|
710
|
+
);
|
697
711
|
}
|
698
712
|
function createBEM(name2) {
|
699
713
|
return (el, mods) => {
|
@@ -749,8 +763,10 @@
|
|
749
763
|
function withInstall(options) {
|
750
764
|
options.install = (app) => {
|
751
765
|
const { name: name2 } = options;
|
752
|
-
|
753
|
-
|
766
|
+
if (name2) {
|
767
|
+
app.component(name2, options);
|
768
|
+
app.component(camelize(`-${name2}`), options);
|
769
|
+
}
|
754
770
|
};
|
755
771
|
return options;
|
756
772
|
}
|
@@ -1379,7 +1395,9 @@
|
|
1379
1395
|
transitionAppear: Boolean,
|
1380
1396
|
closeOnClickOverlay: truthProp
|
1381
1397
|
};
|
1382
|
-
const popupSharedPropKeys = Object.keys(
|
1398
|
+
const popupSharedPropKeys = Object.keys(
|
1399
|
+
popupSharedProps
|
1400
|
+
);
|
1383
1401
|
function getDirection(x, y) {
|
1384
1402
|
if (x > y) {
|
1385
1403
|
return "horizontal";
|
@@ -1446,7 +1464,10 @@
|
|
1446
1464
|
const onTouchMove = (event) => {
|
1447
1465
|
touch.move(event);
|
1448
1466
|
const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
|
1449
|
-
const el = getScrollParent$1(
|
1467
|
+
const el = getScrollParent$1(
|
1468
|
+
event.target,
|
1469
|
+
rootRef.value
|
1470
|
+
);
|
1450
1471
|
const { scrollHeight, offsetHeight, scrollTop } = el;
|
1451
1472
|
let status = "11";
|
1452
1473
|
if (scrollTop === 0) {
|
@@ -1487,11 +1508,15 @@
|
|
1487
1508
|
}
|
1488
1509
|
function useLazyRender(show) {
|
1489
1510
|
const inited = vue.ref(false);
|
1490
|
-
vue.watch(
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1511
|
+
vue.watch(
|
1512
|
+
show,
|
1513
|
+
(value) => {
|
1514
|
+
if (value) {
|
1515
|
+
inited.value = value;
|
1516
|
+
}
|
1517
|
+
},
|
1518
|
+
{ immediate: true }
|
1519
|
+
);
|
1495
1520
|
return (render) => () => inited.value ? render() : null;
|
1496
1521
|
}
|
1497
1522
|
const [name$1n, bem$1j] = createNamespace("overlay");
|
@@ -1510,9 +1535,12 @@
|
|
1510
1535
|
setup(props, {
|
1511
1536
|
slots
|
1512
1537
|
}) {
|
1538
|
+
const root = vue.ref();
|
1513
1539
|
const lazyRender = useLazyRender(() => props.show || !props.lazyRender);
|
1514
|
-
const
|
1515
|
-
|
1540
|
+
const onTouchMove = (event) => {
|
1541
|
+
if (props.lockScroll) {
|
1542
|
+
preventDefault(event, true);
|
1543
|
+
}
|
1516
1544
|
};
|
1517
1545
|
const renderOverlay = lazyRender(() => {
|
1518
1546
|
var _a;
|
@@ -1521,11 +1549,14 @@
|
|
1521
1549
|
style.animationDuration = `${props.duration}s`;
|
1522
1550
|
}
|
1523
1551
|
return vue.withDirectives(vue.createVNode("div", {
|
1552
|
+
"ref": root,
|
1524
1553
|
"style": style,
|
1525
|
-
"class": [bem$1j(), props.className]
|
1526
|
-
"onTouchmove": props.lockScroll ? preventTouchMove : noop
|
1554
|
+
"class": [bem$1j(), props.className]
|
1527
1555
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), [[vue.vShow, props.show]]);
|
1528
1556
|
});
|
1557
|
+
useEventListener("touchmove", onTouchMove, {
|
1558
|
+
target: root
|
1559
|
+
});
|
1529
1560
|
return () => vue.createVNode(vue.Transition, {
|
1530
1561
|
"name": "van-fade",
|
1531
1562
|
"appear": true
|
@@ -1901,6 +1932,7 @@
|
|
1901
1932
|
let touchStartTime;
|
1902
1933
|
let momentumOffset;
|
1903
1934
|
let transitionEndTrigger;
|
1935
|
+
const root = vue.ref();
|
1904
1936
|
const wrapper = vue.ref();
|
1905
1937
|
const state = vue.reactive({
|
1906
1938
|
index: props.defaultIndex,
|
@@ -2076,10 +2108,13 @@
|
|
2076
2108
|
});
|
2077
2109
|
vue.watch(() => props.initialOptions, setOptions);
|
2078
2110
|
vue.watch(() => props.defaultIndex, (value) => setIndex(value));
|
2111
|
+
useEventListener("touchmove", onTouchMove, {
|
2112
|
+
target: root
|
2113
|
+
});
|
2079
2114
|
return () => vue.createVNode("div", {
|
2115
|
+
"ref": root,
|
2080
2116
|
"class": [bem$1g(), props.className],
|
2081
2117
|
"onTouchstartPassive": onTouchStart,
|
2082
|
-
"onTouchmove": onTouchMove,
|
2083
2118
|
"onTouchend": onTouchEnd,
|
2084
2119
|
"onTouchcancel": onTouchEnd
|
2085
2120
|
}, [vue.createVNode("ul", {
|
@@ -2123,6 +2158,7 @@
|
|
2123
2158
|
slots
|
2124
2159
|
}) {
|
2125
2160
|
const hasOptions = vue.ref(false);
|
2161
|
+
const columnsRef = vue.ref();
|
2126
2162
|
const formattedColumns = vue.ref([]);
|
2127
2163
|
const columnsFieldNames = vue.computed(() => {
|
2128
2164
|
const {
|
@@ -2359,14 +2395,17 @@
|
|
2359
2395
|
height: `${wrapHeight}px`
|
2360
2396
|
};
|
2361
2397
|
return vue.createVNode("div", {
|
2398
|
+
"ref": columnsRef,
|
2362
2399
|
"class": bem$1f("columns"),
|
2363
|
-
"style": columnsStyle
|
2364
|
-
"onTouchmove": preventDefault
|
2400
|
+
"style": columnsStyle
|
2365
2401
|
}, [renderColumnItems(), renderMask(wrapHeight)]);
|
2366
2402
|
};
|
2367
2403
|
vue.watch(() => props.columns, format2, {
|
2368
2404
|
immediate: true
|
2369
2405
|
});
|
2406
|
+
useEventListener("touchmove", preventDefault, {
|
2407
|
+
target: columnsRef
|
2408
|
+
});
|
2370
2409
|
useExpose({
|
2371
2410
|
confirm,
|
2372
2411
|
getValues,
|
@@ -3041,6 +3080,7 @@
|
|
3041
3080
|
validateMessage: ""
|
3042
3081
|
});
|
3043
3082
|
const inputRef = vue.ref();
|
3083
|
+
const clearIconRef = vue.ref();
|
3044
3084
|
const customValue = vue.ref();
|
3045
3085
|
const {
|
3046
3086
|
parent: form
|
@@ -3356,9 +3396,9 @@
|
|
3356
3396
|
const renderFieldBody = () => [vue.createVNode("div", {
|
3357
3397
|
"class": bem$1b("body")
|
3358
3398
|
}, [renderInput(), showClear.value && vue.createVNode(Icon, {
|
3399
|
+
"ref": clearIconRef,
|
3359
3400
|
"name": props.clearIcon,
|
3360
|
-
"class": bem$1b("clear")
|
3361
|
-
"onTouchstart": onClear
|
3401
|
+
"class": bem$1b("clear")
|
3362
3402
|
}, null), renderRightIcon(), slots.button && vue.createVNode("div", {
|
3363
3403
|
"class": bem$1b("button")
|
3364
3404
|
}, [slots.button()])]), renderWordLimit(), renderMessage()];
|
@@ -3385,6 +3425,12 @@
|
|
3385
3425
|
updateValue(getModelValue(), props.formatTrigger);
|
3386
3426
|
vue.nextTick(adjustTextareaSize);
|
3387
3427
|
});
|
3428
|
+
useEventListener("touchstart", onClear, {
|
3429
|
+
target: vue.computed(() => {
|
3430
|
+
var _a;
|
3431
|
+
return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
|
3432
|
+
})
|
3433
|
+
});
|
3388
3434
|
return () => {
|
3389
3435
|
const disabled = getProp("disabled");
|
3390
3436
|
const labelAlign = getProp("labelAlign");
|
@@ -5105,7 +5151,8 @@
|
|
5105
5151
|
const {
|
5106
5152
|
type,
|
5107
5153
|
minDate,
|
5108
|
-
maxDate
|
5154
|
+
maxDate,
|
5155
|
+
allowSameDay
|
5109
5156
|
} = props;
|
5110
5157
|
if (defaultDate === null) {
|
5111
5158
|
return defaultDate;
|
@@ -5115,8 +5162,8 @@
|
|
5115
5162
|
if (!Array.isArray(defaultDate)) {
|
5116
5163
|
defaultDate = [];
|
5117
5164
|
}
|
5118
|
-
const start2 = limitDateRange(defaultDate[0] || now, minDate, getPrevDay(maxDate));
|
5119
|
-
const end2 = limitDateRange(defaultDate[1] || now, getNextDay(minDate));
|
5165
|
+
const start2 = limitDateRange(defaultDate[0] || now, minDate, allowSameDay ? maxDate : getPrevDay(maxDate));
|
5166
|
+
const end2 = limitDateRange(defaultDate[1] || now, allowSameDay ? minDate : getNextDay(minDate));
|
5120
5167
|
return [start2, end2];
|
5121
5168
|
}
|
5122
5169
|
if (type === "multiple") {
|
@@ -5725,9 +5772,12 @@
|
|
5725
5772
|
if (!inBrowser$1 || !window.IntersectionObserver) {
|
5726
5773
|
return;
|
5727
5774
|
}
|
5728
|
-
const observer = new IntersectionObserver(
|
5729
|
-
|
5730
|
-
|
5775
|
+
const observer = new IntersectionObserver(
|
5776
|
+
(entries) => {
|
5777
|
+
onChange(entries[0].intersectionRatio > 0);
|
5778
|
+
},
|
5779
|
+
{ root: document.body }
|
5780
|
+
);
|
5731
5781
|
const observe = () => {
|
5732
5782
|
if (target.value) {
|
5733
5783
|
observer.observe(target.value);
|
@@ -5963,6 +6013,7 @@
|
|
5963
6013
|
slots
|
5964
6014
|
}) {
|
5965
6015
|
const root = vue.ref();
|
6016
|
+
const track = vue.ref();
|
5966
6017
|
const state = vue.reactive({
|
5967
6018
|
rect: null,
|
5968
6019
|
width: 0,
|
@@ -6149,10 +6200,13 @@
|
|
6149
6200
|
if (props.touchable && state.swiping) {
|
6150
6201
|
touch.move(event);
|
6151
6202
|
if (isCorrectDirection.value) {
|
6152
|
-
|
6153
|
-
|
6154
|
-
|
6155
|
-
|
6203
|
+
const isEdgeTouch = !props.loop && (state.active === 0 && delta.value > 0 || state.active === count.value - 1 && delta.value < 0);
|
6204
|
+
if (!isEdgeTouch) {
|
6205
|
+
preventDefault(event, props.stopPropagation);
|
6206
|
+
move({
|
6207
|
+
offset: delta.value
|
6208
|
+
});
|
6209
|
+
}
|
6156
6210
|
}
|
6157
6211
|
}
|
6158
6212
|
};
|
@@ -6262,18 +6316,21 @@
|
|
6262
6316
|
onPopupReopen(() => initialize(state.active));
|
6263
6317
|
vue.onDeactivated(stopAutoplay);
|
6264
6318
|
vue.onBeforeUnmount(stopAutoplay);
|
6319
|
+
useEventListener("touchmove", onTouchMove, {
|
6320
|
+
target: track
|
6321
|
+
});
|
6265
6322
|
return () => {
|
6266
6323
|
var _a;
|
6267
6324
|
return vue.createVNode("div", {
|
6268
6325
|
"ref": root,
|
6269
6326
|
"class": bem$Y()
|
6270
6327
|
}, [vue.createVNode("div", {
|
6328
|
+
"ref": track,
|
6271
6329
|
"style": trackStyle.value,
|
6272
6330
|
"class": bem$Y("track", {
|
6273
6331
|
vertical: props.vertical
|
6274
6332
|
}),
|
6275
6333
|
"onTouchstartPassive": onTouchStart,
|
6276
|
-
"onTouchmove": onTouchMove,
|
6277
6334
|
"onTouchend": onTouchEnd,
|
6278
6335
|
"onTouchcancel": onTouchEnd
|
6279
6336
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots)]), renderIndicator()]);
|
@@ -8053,7 +8110,9 @@
|
|
8053
8110
|
const CountDown = withInstall(stdin_default$O);
|
8054
8111
|
function getDate(timeStamp) {
|
8055
8112
|
const date = new Date(timeStamp * 1e3);
|
8056
|
-
return `${date.getFullYear()}.${padZero(date.getMonth() + 1)}.${padZero(
|
8113
|
+
return `${date.getFullYear()}.${padZero(date.getMonth() + 1)}.${padZero(
|
8114
|
+
date.getDate()
|
8115
|
+
)}`;
|
8057
8116
|
}
|
8058
8117
|
const formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
|
8059
8118
|
const formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
|
@@ -9852,6 +9911,7 @@
|
|
9852
9911
|
displayHeight: 0
|
9853
9912
|
});
|
9854
9913
|
const touch = useTouch();
|
9914
|
+
const swipeItem = vue.ref();
|
9855
9915
|
const vertical = vue.computed(() => {
|
9856
9916
|
const {
|
9857
9917
|
rootWidth,
|
@@ -10037,6 +10097,12 @@
|
|
10037
10097
|
resetScale();
|
10038
10098
|
}
|
10039
10099
|
});
|
10100
|
+
useEventListener("touchmove", onTouchMove, {
|
10101
|
+
target: vue.computed(() => {
|
10102
|
+
var _a;
|
10103
|
+
return (_a = swipeItem.value) == null ? void 0 : _a.$el;
|
10104
|
+
})
|
10105
|
+
});
|
10040
10106
|
return () => {
|
10041
10107
|
const imageSlots = {
|
10042
10108
|
loading: () => vue.createVNode(Loading, {
|
@@ -10044,9 +10110,9 @@
|
|
10044
10110
|
}, null)
|
10045
10111
|
};
|
10046
10112
|
return vue.createVNode(SwipeItem, {
|
10113
|
+
"ref": swipeItem,
|
10047
10114
|
"class": bem$v("swipe-item"),
|
10048
10115
|
"onTouchstartPassive": onTouchStart,
|
10049
|
-
"onTouchmove": onTouchMove,
|
10050
10116
|
"onTouchend": onTouchEnd,
|
10051
10117
|
"onTouchcancel": onTouchEnd
|
10052
10118
|
}, {
|
@@ -10300,6 +10366,7 @@
|
|
10300
10366
|
slots
|
10301
10367
|
}) {
|
10302
10368
|
const root = vue.ref();
|
10369
|
+
const sidebar = vue.ref();
|
10303
10370
|
const activeAnchor = vue.ref("");
|
10304
10371
|
const touch = useTouch();
|
10305
10372
|
const scrollParent = useScrollParent(root);
|
@@ -10419,11 +10486,11 @@
|
|
10419
10486
|
const {
|
10420
10487
|
offsetHeight
|
10421
10488
|
} = document.documentElement;
|
10489
|
+
match.$el.scrollIntoView();
|
10422
10490
|
if (scrollTop === offsetHeight - scrollParentRect.height) {
|
10423
10491
|
onScroll();
|
10424
10492
|
return;
|
10425
10493
|
}
|
10426
|
-
match.$el.scrollIntoView();
|
10427
10494
|
if (props.sticky && props.stickyOffsetTop) {
|
10428
10495
|
setRootScrollTop(getRootScrollTop() - props.stickyOffsetTop);
|
10429
10496
|
}
|
@@ -10463,15 +10530,18 @@
|
|
10463
10530
|
}
|
10464
10531
|
};
|
10465
10532
|
const renderSidebar = () => vue.createVNode("div", {
|
10533
|
+
"ref": sidebar,
|
10466
10534
|
"class": bem$t("sidebar"),
|
10467
10535
|
"style": sidebarStyle.value,
|
10468
10536
|
"onClick": onClickSidebar,
|
10469
|
-
"onTouchstartPassive": touch.start
|
10470
|
-
"onTouchmove": onTouchMove
|
10537
|
+
"onTouchstartPassive": touch.start
|
10471
10538
|
}, [renderIndexes()]);
|
10472
10539
|
useExpose({
|
10473
10540
|
scrollTo
|
10474
10541
|
});
|
10542
|
+
useEventListener("touchmove", onTouchMove, {
|
10543
|
+
target: sidebar
|
10544
|
+
});
|
10475
10545
|
return () => {
|
10476
10546
|
var _a;
|
10477
10547
|
return vue.createVNode("div", {
|
@@ -11576,32 +11646,47 @@
|
|
11576
11646
|
return node instanceof OwnElement || node instanceof ShadowRoot;
|
11577
11647
|
}
|
11578
11648
|
var round = Math.round;
|
11579
|
-
function
|
11649
|
+
function getUAString() {
|
11650
|
+
var uaData = navigator.userAgentData;
|
11651
|
+
if (uaData != null && uaData.brands) {
|
11652
|
+
return uaData.brands.map(function(item) {
|
11653
|
+
return item.brand + "/" + item.version;
|
11654
|
+
}).join(" ");
|
11655
|
+
}
|
11656
|
+
return navigator.userAgent;
|
11657
|
+
}
|
11658
|
+
function isLayoutViewport() {
|
11659
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
11660
|
+
}
|
11661
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
11580
11662
|
if (includeScale === void 0) {
|
11581
11663
|
includeScale = false;
|
11582
11664
|
}
|
11583
|
-
|
11665
|
+
if (isFixedStrategy === void 0) {
|
11666
|
+
isFixedStrategy = false;
|
11667
|
+
}
|
11668
|
+
var clientRect = element.getBoundingClientRect();
|
11584
11669
|
var scaleX = 1;
|
11585
11670
|
var scaleY = 1;
|
11586
|
-
if (isHTMLElement(element)
|
11587
|
-
|
11588
|
-
|
11589
|
-
|
11590
|
-
|
11591
|
-
|
11592
|
-
|
11593
|
-
|
11594
|
-
|
11595
|
-
|
11671
|
+
if (includeScale && isHTMLElement(element)) {
|
11672
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
11673
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
11674
|
+
}
|
11675
|
+
var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
|
11676
|
+
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
11677
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
11678
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
11679
|
+
var width2 = clientRect.width / scaleX;
|
11680
|
+
var height2 = clientRect.height / scaleY;
|
11596
11681
|
return {
|
11597
|
-
width:
|
11598
|
-
height:
|
11599
|
-
top:
|
11600
|
-
right:
|
11601
|
-
bottom:
|
11602
|
-
left:
|
11603
|
-
x
|
11604
|
-
y
|
11682
|
+
width: width2,
|
11683
|
+
height: height2,
|
11684
|
+
top: y,
|
11685
|
+
right: x + width2,
|
11686
|
+
bottom: y + height2,
|
11687
|
+
left: x,
|
11688
|
+
x,
|
11689
|
+
y
|
11605
11690
|
};
|
11606
11691
|
}
|
11607
11692
|
function getWindowScroll(node) {
|
@@ -11655,7 +11740,7 @@
|
|
11655
11740
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
11656
11741
|
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
11657
11742
|
var documentElement = getDocumentElement(offsetParent);
|
11658
|
-
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
11743
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
11659
11744
|
var scroll = {
|
11660
11745
|
scrollLeft: 0,
|
11661
11746
|
scrollTop: 0
|
@@ -11737,8 +11822,8 @@
|
|
11737
11822
|
return element.offsetParent;
|
11738
11823
|
}
|
11739
11824
|
function getContainingBlock(element) {
|
11740
|
-
var isFirefox =
|
11741
|
-
var isIE =
|
11825
|
+
var isFirefox = /firefox/i.test(getUAString());
|
11826
|
+
var isIE = /Trident/i.test(getUAString());
|
11742
11827
|
if (isIE && isHTMLElement(element)) {
|
11743
11828
|
var elementCss = getComputedStyle(element);
|
11744
11829
|
if (elementCss.position === "fixed") {
|
@@ -13061,6 +13146,9 @@
|
|
13061
13146
|
}, null)]);
|
13062
13147
|
};
|
13063
13148
|
useCustomFieldValue(() => props.modelValue);
|
13149
|
+
useEventListener("touchmove", onTouchMove, {
|
13150
|
+
target: groupRef
|
13151
|
+
});
|
13064
13152
|
return () => vue.createVNode("div", {
|
13065
13153
|
"ref": groupRef,
|
13066
13154
|
"role": "radiogroup",
|
@@ -13071,8 +13159,7 @@
|
|
13071
13159
|
"tabindex": props.disabled ? void 0 : 0,
|
13072
13160
|
"aria-disabled": props.disabled,
|
13073
13161
|
"aria-readonly": props.readonly,
|
13074
|
-
"onTouchstartPassive": onTouchStart
|
13075
|
-
"onTouchmove": onTouchMove
|
13162
|
+
"onTouchstartPassive": onTouchStart
|
13076
13163
|
}, [list.value.map(renderStar)]);
|
13077
13164
|
}
|
13078
13165
|
});
|
@@ -13508,6 +13595,7 @@
|
|
13508
13595
|
let current2;
|
13509
13596
|
let startValue;
|
13510
13597
|
const root = vue.ref();
|
13598
|
+
const slider = vue.ref();
|
13511
13599
|
const dragStatus = vue.ref();
|
13512
13600
|
const touch = useTouch();
|
13513
13601
|
const scope = vue.computed(() => Number(props.max) - Number(props.min));
|
@@ -13700,6 +13788,7 @@
|
|
13700
13788
|
const renderButton = (index) => {
|
13701
13789
|
const current22 = typeof index === "number" ? props.modelValue[index] : props.modelValue;
|
13702
13790
|
return vue.createVNode("div", {
|
13791
|
+
"ref": slider,
|
13703
13792
|
"role": "slider",
|
13704
13793
|
"class": getButtonClassName(index),
|
13705
13794
|
"tabindex": props.disabled ? void 0 : 0,
|
@@ -13715,7 +13804,6 @@
|
|
13715
13804
|
}
|
13716
13805
|
onTouchStart(event);
|
13717
13806
|
},
|
13718
|
-
"onTouchmove": onTouchMove,
|
13719
13807
|
"onTouchend": onTouchEnd,
|
13720
13808
|
"onTouchcancel": onTouchEnd,
|
13721
13809
|
"onClick": stopPropagation
|
@@ -13723,6 +13811,9 @@
|
|
13723
13811
|
};
|
13724
13812
|
updateValue(props.modelValue);
|
13725
13813
|
useCustomFieldValue(() => props.modelValue);
|
13814
|
+
useEventListener("touchmove", onTouchMove, {
|
13815
|
+
target: slider
|
13816
|
+
});
|
13726
13817
|
return () => vue.createVNode("div", {
|
13727
13818
|
"ref": root,
|
13728
13819
|
"style": wrapperStyle.value,
|
@@ -14444,6 +14535,9 @@
|
|
14444
14535
|
useClickAway(root, () => onClick("outside"), {
|
14445
14536
|
eventName: "touchstart"
|
14446
14537
|
});
|
14538
|
+
useEventListener("touchmove", onTouchMove, {
|
14539
|
+
target: root
|
14540
|
+
});
|
14447
14541
|
return () => {
|
14448
14542
|
var _a;
|
14449
14543
|
const wrapperStyle = {
|
@@ -14455,7 +14549,6 @@
|
|
14455
14549
|
"class": bem$4(),
|
14456
14550
|
"onClick": getClickHandler("cell", lockClick2),
|
14457
14551
|
"onTouchstartPassive": onTouchStart,
|
14458
|
-
"onTouchmove": onTouchMove,
|
14459
14552
|
"onTouchend": onTouchEnd,
|
14460
14553
|
"onTouchcancel": onTouchEnd
|
14461
14554
|
}, [vue.createVNode("div", {
|
@@ -15186,7 +15279,10 @@
|
|
15186
15279
|
tmpWidth = 999998;
|
15187
15280
|
} else {
|
15188
15281
|
tmpSrc = item.substr(0, spaceIndex);
|
15189
|
-
tmpWidth = parseInt(
|
15282
|
+
tmpWidth = parseInt(
|
15283
|
+
item.substr(spaceIndex + 1, item.length - spaceIndex - 2),
|
15284
|
+
10
|
15285
|
+
);
|
15190
15286
|
}
|
15191
15287
|
return [tmpWidth, tmpSrc];
|
15192
15288
|
});
|
@@ -15377,17 +15473,21 @@
|
|
15377
15473
|
}
|
15378
15474
|
renderLoading(cb) {
|
15379
15475
|
this.state.loading = true;
|
15380
|
-
loadImageAsync(
|
15381
|
-
|
15382
|
-
|
15383
|
-
|
15384
|
-
|
15385
|
-
|
15386
|
-
|
15387
|
-
|
15388
|
-
|
15389
|
-
|
15390
|
-
|
15476
|
+
loadImageAsync(
|
15477
|
+
{
|
15478
|
+
src: this.loading,
|
15479
|
+
cors: this.cors
|
15480
|
+
},
|
15481
|
+
() => {
|
15482
|
+
this.render("loading", false);
|
15483
|
+
this.state.loading = false;
|
15484
|
+
cb();
|
15485
|
+
},
|
15486
|
+
() => {
|
15487
|
+
cb();
|
15488
|
+
this.state.loading = false;
|
15489
|
+
}
|
15490
|
+
);
|
15391
15491
|
}
|
15392
15492
|
load(onFinish = noop) {
|
15393
15493
|
if (this.attempt > this.options.attempt - 1 && this.state.error) {
|
@@ -15407,25 +15507,29 @@
|
|
15407
15507
|
this.attempt++;
|
15408
15508
|
(_b = (_a = this.options.adapter).beforeLoad) == null ? void 0 : _b.call(_a, this, this.options);
|
15409
15509
|
this.record("loadStart");
|
15410
|
-
loadImageAsync(
|
15411
|
-
|
15412
|
-
|
15413
|
-
|
15414
|
-
|
15415
|
-
|
15416
|
-
|
15417
|
-
|
15418
|
-
|
15419
|
-
|
15420
|
-
|
15421
|
-
|
15422
|
-
|
15423
|
-
|
15424
|
-
|
15425
|
-
|
15426
|
-
|
15427
|
-
|
15428
|
-
|
15510
|
+
loadImageAsync(
|
15511
|
+
{
|
15512
|
+
src: this.src,
|
15513
|
+
cors: this.cors
|
15514
|
+
},
|
15515
|
+
(data) => {
|
15516
|
+
this.naturalHeight = data.naturalHeight;
|
15517
|
+
this.naturalWidth = data.naturalWidth;
|
15518
|
+
this.state.loaded = true;
|
15519
|
+
this.state.error = false;
|
15520
|
+
this.record("loadEnd");
|
15521
|
+
this.render("loaded", false);
|
15522
|
+
this.state.rendered = true;
|
15523
|
+
this.imageCache.add(this.src);
|
15524
|
+
onFinish();
|
15525
|
+
},
|
15526
|
+
(err) => {
|
15527
|
+
!this.options.silent && console.error(err);
|
15528
|
+
this.state.error = true;
|
15529
|
+
this.state.loaded = false;
|
15530
|
+
this.render("error", false);
|
15531
|
+
}
|
15532
|
+
);
|
15429
15533
|
});
|
15430
15534
|
}
|
15431
15535
|
render(state, cache) {
|
@@ -15510,7 +15614,10 @@
|
|
15510
15614
|
};
|
15511
15615
|
this.initEvent();
|
15512
15616
|
this.imageCache = new ImageCache({ max: 200 });
|
15513
|
-
this.lazyLoadHandler = throttle(
|
15617
|
+
this.lazyLoadHandler = throttle(
|
15618
|
+
this.lazyLoadHandler.bind(this),
|
15619
|
+
this.options.throttleWait
|
15620
|
+
);
|
15514
15621
|
this.setMode(this.options.observer ? modeType.observer : modeType.event);
|
15515
15622
|
}
|
15516
15623
|
config(options = {}) {
|
@@ -15665,7 +15772,9 @@
|
|
15665
15772
|
});
|
15666
15773
|
}
|
15667
15774
|
initListen(el, start2) {
|
15668
|
-
this.options.ListenEvents.forEach(
|
15775
|
+
this.options.ListenEvents.forEach(
|
15776
|
+
(evt) => (start2 ? on : off)(el, evt, this.lazyLoadHandler)
|
15777
|
+
);
|
15669
15778
|
}
|
15670
15779
|
initEvent() {
|
15671
15780
|
this.Event = {
|
@@ -15722,7 +15831,10 @@
|
|
15722
15831
|
if (!hasIntersectionObserver) {
|
15723
15832
|
return;
|
15724
15833
|
}
|
15725
|
-
this.observer = new IntersectionObserver(
|
15834
|
+
this.observer = new IntersectionObserver(
|
15835
|
+
this.observerHandler.bind(this),
|
15836
|
+
this.options.observerOptions
|
15837
|
+
);
|
15726
15838
|
if (this.listeners.length) {
|
15727
15839
|
this.listeners.forEach((listener) => {
|
15728
15840
|
this.observer.observe(listener.el);
|
@@ -15798,7 +15910,10 @@
|
|
15798
15910
|
},
|
15799
15911
|
emits: ["show"],
|
15800
15912
|
render() {
|
15801
|
-
return vue.h(
|
15913
|
+
return vue.h(
|
15914
|
+
this.tag,
|
15915
|
+
this.show && this.$slots.default ? this.$slots.default() : null
|
15916
|
+
);
|
15802
15917
|
},
|
15803
15918
|
data() {
|
15804
15919
|
return {
|
@@ -15850,13 +15965,17 @@
|
|
15850
15965
|
this.options = Object.assign({}, defaultOptions, binding.value);
|
15851
15966
|
const imgs = this.getImgs();
|
15852
15967
|
imgs.forEach((el2) => {
|
15853
|
-
this.lazy.add(
|
15854
|
-
|
15855
|
-
|
15856
|
-
|
15857
|
-
|
15858
|
-
|
15859
|
-
|
15968
|
+
this.lazy.add(
|
15969
|
+
el2,
|
15970
|
+
Object.assign({}, this.binding, {
|
15971
|
+
value: {
|
15972
|
+
src: "dataset" in el2 ? el2.dataset.src : el2.getAttribute("data-src"),
|
15973
|
+
error: ("dataset" in el2 ? el2.dataset.error : el2.getAttribute("data-error")) || this.options.error,
|
15974
|
+
loading: ("dataset" in el2 ? el2.dataset.loading : el2.getAttribute("data-loading")) || this.options.loading
|
15975
|
+
}
|
15976
|
+
}),
|
15977
|
+
this.vnode
|
15978
|
+
);
|
15860
15979
|
});
|
15861
15980
|
}
|
15862
15981
|
getImgs() {
|
@@ -15907,11 +16026,15 @@
|
|
15907
16026
|
}
|
15908
16027
|
},
|
15909
16028
|
render(h) {
|
15910
|
-
return h(
|
15911
|
-
|
15912
|
-
|
15913
|
-
|
15914
|
-
|
16029
|
+
return h(
|
16030
|
+
this.tag,
|
16031
|
+
{
|
16032
|
+
attrs: {
|
16033
|
+
src: this.renderSrc
|
16034
|
+
}
|
16035
|
+
},
|
16036
|
+
this.$slots.default
|
16037
|
+
);
|
15915
16038
|
},
|
15916
16039
|
data() {
|
15917
16040
|
return {
|
@@ -15968,14 +16091,18 @@
|
|
15968
16091
|
return;
|
15969
16092
|
}
|
15970
16093
|
const { src } = this.options;
|
15971
|
-
loadImageAsync(
|
15972
|
-
|
15973
|
-
|
15974
|
-
|
15975
|
-
|
15976
|
-
|
15977
|
-
|
15978
|
-
|
16094
|
+
loadImageAsync(
|
16095
|
+
{ src },
|
16096
|
+
({ src: src2 }) => {
|
16097
|
+
this.renderSrc = src2;
|
16098
|
+
this.state.loaded = true;
|
16099
|
+
},
|
16100
|
+
() => {
|
16101
|
+
this.state.attempt++;
|
16102
|
+
this.renderSrc = this.options.error;
|
16103
|
+
this.state.error = true;
|
16104
|
+
}
|
16105
|
+
);
|
15979
16106
|
}
|
15980
16107
|
}
|
15981
16108
|
});
|
@@ -16003,7 +16130,7 @@
|
|
16003
16130
|
});
|
16004
16131
|
}
|
16005
16132
|
};
|
16006
|
-
const version = "3.6.
|
16133
|
+
const version = "3.6.2";
|
16007
16134
|
function install(app) {
|
16008
16135
|
const components = [
|
16009
16136
|
ActionBar,
|