vant 4.8.6 → 4.8.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/README.md +1 -1
- package/es/action-bar/index.d.ts +1 -1
- package/es/action-bar-button/index.d.ts +3 -3
- package/es/action-bar-icon/index.d.ts +3 -3
- package/es/action-sheet/ActionSheet.d.ts +3 -3
- package/es/action-sheet/index.d.ts +3 -3
- package/es/address-edit/index.d.ts +5 -5
- package/es/address-list/AddressList.mjs +3 -1
- package/es/address-list/AddressListItem.mjs +3 -3
- package/es/address-list/index.d.ts +1 -1
- package/es/area/Area.d.ts +3 -3
- package/es/area/index.d.ts +2 -2
- package/es/back-top/index.d.ts +1 -1
- package/es/badge/index.d.ts +3 -3
- package/es/barrage/Barrage.d.ts +1 -1
- package/es/barrage/index.d.ts +2 -2
- package/es/button/index.d.ts +3 -3
- package/es/calendar/index.d.ts +6 -6
- package/es/calendar/utils.d.ts +1 -1
- package/es/card/index.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/cell/index.d.ts +1 -1
- package/es/cell-group/index.d.ts +1 -1
- package/es/checkbox/index.d.ts +5 -5
- package/es/checkbox-group/index.d.ts +8 -8
- package/es/circle/index.d.ts +1 -1
- package/es/col/index.d.ts +1 -1
- package/es/collapse/index.d.ts +4 -4
- package/es/collapse-item/index.d.ts +5 -5
- package/es/config-provider/index.d.ts +1 -1
- package/es/contact-card/index.d.ts +1 -1
- package/es/contact-edit/index.d.ts +3 -3
- package/es/contact-list/index.d.ts +1 -1
- package/es/count-down/index.d.ts +1 -1
- package/es/coupon/index.d.ts +1 -1
- package/es/coupon-cell/index.d.ts +4 -4
- package/es/coupon-list/index.d.ts +7 -7
- package/es/date-picker/DatePicker.d.ts +10 -10
- package/es/date-picker/index.d.ts +8 -8
- package/es/dialog/Dialog.d.ts +3 -3
- package/es/dialog/index.d.ts +3 -3
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/index.d.ts +1 -1
- package/es/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/es/dropdown-menu/index.d.ts +2 -2
- package/es/empty/index.d.ts +3 -3
- package/es/field/index.d.ts +5 -5
- package/es/floating-bubble/FloatingBubble.mjs +3 -1
- package/es/floating-bubble/index.d.ts +1 -1
- package/es/floating-panel/FloatingPanel.d.ts +1 -1
- package/es/floating-panel/index.d.ts +2 -2
- package/es/form/index.d.ts +10 -10
- package/es/grid/index.d.ts +1 -1
- package/es/grid-item/index.d.ts +3 -3
- package/es/highlight/index.d.ts +1 -1
- package/es/icon/index.d.ts +3 -3
- package/es/image/index.d.ts +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +3 -1
- package/es/image-preview/index.d.ts +8 -8
- package/es/index-anchor/index.d.ts +1 -1
- package/es/index-bar/index.d.ts +4 -4
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/list/index.d.ts +1 -1
- package/es/loading/index.d.ts +1 -1
- package/es/nav-bar/index.d.ts +1 -1
- package/es/notice-bar/index.d.ts +1 -1
- package/es/notify/Notify.d.ts +3 -3
- package/es/notify/index.d.ts +3 -3
- package/es/number-keyboard/index.d.ts +1 -1
- package/es/overlay/index.d.ts +1 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/index.d.ts +2 -2
- package/es/password-input/index.d.ts +1 -1
- package/es/picker/index.d.ts +4 -4
- package/es/picker/utils.d.ts +1 -1
- package/es/picker-group/PickerGroup.mjs +11 -3
- package/es/picker-group/index.d.ts +1 -1
- package/es/popover/index.d.ts +1 -1
- package/es/popup/Popup.d.ts +3 -3
- package/es/popup/index.d.ts +3 -3
- package/es/progress/index.d.ts +3 -3
- package/es/pull-refresh/index.d.ts +1 -1
- package/es/radio/index.d.ts +3 -3
- package/es/radio-group/index.d.ts +5 -5
- package/es/rate/index.d.ts +1 -1
- package/es/rolling-text/index.d.ts +1 -1
- package/es/row/index.d.ts +1 -1
- package/es/search/Search.d.ts +17 -17
- package/es/search/index.d.ts +13 -13
- package/es/share-sheet/ShareSheet.d.ts +3 -3
- package/es/share-sheet/index.d.ts +3 -3
- package/es/sidebar/index.d.ts +1 -1
- package/es/sidebar-item/index.d.ts +3 -3
- package/es/signature/index.d.ts +1 -1
- package/es/skeleton/index.d.ts +9 -9
- package/es/skeleton-avatar/index.d.ts +1 -1
- package/es/skeleton-image/index.d.ts +1 -1
- package/es/skeleton-paragraph/index.d.ts +1 -1
- package/es/skeleton-title/index.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/space/index.d.ts +1 -1
- package/es/step/index.d.ts +1 -1
- package/es/stepper/index.d.ts +3 -3
- package/es/steps/index.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/submit-bar/index.d.ts +6 -6
- package/es/swipe/Swipe.d.ts +1 -1
- package/es/swipe/index.d.ts +2 -2
- package/es/swipe-cell/index.d.ts +3 -3
- package/es/swipe-item/index.d.ts +1 -1
- package/es/switch/index.d.ts +1 -1
- package/es/tab/index.d.ts +1 -1
- package/es/tabbar/index.d.ts +3 -3
- package/es/tabbar-item/index.d.ts +3 -3
- package/es/tabs/Tabs.d.ts +1 -1
- package/es/tabs/index.d.ts +4 -4
- package/es/tag/index.d.ts +1 -1
- package/es/text-ellipsis/TextEllipsis.mjs +30 -21
- package/es/text-ellipsis/index.d.ts +1 -1
- package/es/time-picker/TimePicker.d.ts +13 -13
- package/es/time-picker/index.d.ts +10 -10
- package/es/toast/Toast.d.ts +1 -1
- package/es/toast/index.d.ts +4 -4
- package/es/tree-select/index.d.ts +4 -4
- package/es/uploader/index.d.ts +7 -7
- package/es/uploader/utils.d.ts +1 -1
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/basic.mjs +2 -0
- package/es/watermark/index.d.ts +1 -1
- package/lib/action-bar/index.d.ts +1 -1
- package/lib/action-bar-button/index.d.ts +3 -3
- package/lib/action-bar-icon/index.d.ts +3 -3
- package/lib/action-sheet/ActionSheet.d.ts +3 -3
- package/lib/action-sheet/index.d.ts +3 -3
- package/lib/address-edit/index.d.ts +5 -5
- package/lib/address-list/AddressList.js +3 -1
- package/lib/address-list/AddressListItem.js +3 -3
- package/lib/address-list/index.d.ts +1 -1
- package/lib/area/Area.d.ts +3 -3
- package/lib/area/index.d.ts +2 -2
- package/lib/back-top/index.d.ts +1 -1
- package/lib/badge/index.d.ts +3 -3
- package/lib/barrage/Barrage.d.ts +1 -1
- package/lib/barrage/index.d.ts +2 -2
- package/lib/button/index.d.ts +3 -3
- package/lib/calendar/index.d.ts +6 -6
- package/lib/calendar/utils.d.ts +1 -1
- package/lib/card/index.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/cell/index.d.ts +1 -1
- package/lib/cell-group/index.d.ts +1 -1
- package/lib/checkbox/index.d.ts +5 -5
- package/lib/checkbox-group/index.d.ts +8 -8
- package/lib/circle/index.d.ts +1 -1
- package/lib/col/index.d.ts +1 -1
- package/lib/collapse/index.d.ts +4 -4
- package/lib/collapse-item/index.d.ts +5 -5
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/contact-card/index.d.ts +1 -1
- package/lib/contact-edit/index.d.ts +3 -3
- package/lib/contact-list/index.d.ts +1 -1
- package/lib/count-down/index.d.ts +1 -1
- package/lib/coupon/index.d.ts +1 -1
- package/lib/coupon-cell/index.d.ts +4 -4
- package/lib/coupon-list/index.d.ts +7 -7
- package/lib/date-picker/DatePicker.d.ts +10 -10
- package/lib/date-picker/index.d.ts +8 -8
- package/lib/dialog/Dialog.d.ts +3 -3
- package/lib/dialog/index.d.ts +3 -3
- package/lib/divider/index.d.ts +1 -1
- package/lib/dropdown-item/index.d.ts +1 -1
- package/lib/dropdown-menu/DropdownMenu.d.ts +1 -1
- package/lib/dropdown-menu/index.d.ts +2 -2
- package/lib/empty/index.d.ts +3 -3
- package/lib/field/index.d.ts +5 -5
- package/lib/floating-bubble/FloatingBubble.js +3 -1
- package/lib/floating-bubble/index.d.ts +1 -1
- package/lib/floating-panel/FloatingPanel.d.ts +1 -1
- package/lib/floating-panel/index.d.ts +2 -2
- package/lib/form/index.d.ts +10 -10
- package/lib/grid/index.d.ts +1 -1
- package/lib/grid-item/index.d.ts +3 -3
- package/lib/highlight/index.d.ts +1 -1
- package/lib/icon/index.d.ts +3 -3
- package/lib/image/index.d.ts +1 -1
- package/lib/image-preview/ImagePreviewItem.js +3 -1
- package/lib/image-preview/index.d.ts +8 -8
- package/lib/index-anchor/index.d.ts +1 -1
- package/lib/index-bar/index.d.ts +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/loading/index.d.ts +1 -1
- package/lib/nav-bar/index.d.ts +1 -1
- package/lib/notice-bar/index.d.ts +1 -1
- package/lib/notify/Notify.d.ts +3 -3
- package/lib/notify/index.d.ts +3 -3
- package/lib/number-keyboard/index.d.ts +1 -1
- package/lib/overlay/index.d.ts +1 -1
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/index.d.ts +2 -2
- package/lib/password-input/index.d.ts +1 -1
- package/lib/picker/index.d.ts +4 -4
- package/lib/picker/utils.d.ts +1 -1
- package/lib/picker-group/PickerGroup.js +9 -1
- package/lib/picker-group/index.d.ts +1 -1
- package/lib/popover/index.d.ts +1 -1
- package/lib/popup/Popup.d.ts +3 -3
- package/lib/popup/index.d.ts +3 -3
- package/lib/progress/index.d.ts +3 -3
- package/lib/pull-refresh/index.d.ts +1 -1
- package/lib/radio/index.d.ts +3 -3
- package/lib/radio-group/index.d.ts +5 -5
- package/lib/rate/index.d.ts +1 -1
- package/lib/rolling-text/index.d.ts +1 -1
- package/lib/row/index.d.ts +1 -1
- package/lib/search/Search.d.ts +17 -17
- package/lib/search/index.d.ts +13 -13
- package/lib/share-sheet/ShareSheet.d.ts +3 -3
- package/lib/share-sheet/index.d.ts +3 -3
- package/lib/sidebar/index.d.ts +1 -1
- package/lib/sidebar-item/index.d.ts +3 -3
- package/lib/signature/index.d.ts +1 -1
- package/lib/skeleton/index.d.ts +9 -9
- package/lib/skeleton-avatar/index.d.ts +1 -1
- package/lib/skeleton-image/index.d.ts +1 -1
- package/lib/skeleton-paragraph/index.d.ts +1 -1
- package/lib/skeleton-title/index.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/space/index.d.ts +1 -1
- package/lib/step/index.d.ts +1 -1
- package/lib/stepper/index.d.ts +3 -3
- package/lib/steps/index.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/submit-bar/index.d.ts +6 -6
- package/lib/swipe/Swipe.d.ts +1 -1
- package/lib/swipe/index.d.ts +2 -2
- package/lib/swipe-cell/index.d.ts +3 -3
- package/lib/swipe-item/index.d.ts +1 -1
- package/lib/switch/index.d.ts +1 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tabbar/index.d.ts +3 -3
- package/lib/tabbar-item/index.d.ts +3 -3
- package/lib/tabs/Tabs.d.ts +1 -1
- package/lib/tabs/index.d.ts +4 -4
- package/lib/tag/index.d.ts +1 -1
- package/lib/text-ellipsis/TextEllipsis.js +29 -20
- package/lib/text-ellipsis/index.d.ts +1 -1
- package/lib/time-picker/TimePicker.d.ts +13 -13
- package/lib/time-picker/index.d.ts +10 -10
- package/lib/toast/Toast.d.ts +1 -1
- package/lib/toast/index.d.ts +4 -4
- package/lib/tree-select/index.d.ts +4 -4
- package/lib/uploader/index.d.ts +7 -7
- package/lib/uploader/utils.d.ts +1 -1
- package/lib/utils/basic.d.ts +1 -0
- package/lib/utils/basic.js +2 -0
- package/lib/vant.cjs.js +52 -28
- package/lib/vant.es.js +52 -28
- package/lib/vant.js +53 -29
- package/lib/vant.min.js +2 -2
- package/lib/watermark/index.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +4 -4
package/lib/vant.es.js
CHANGED
@@ -39,6 +39,7 @@ function pick(obj, keys, ignoreUndefined) {
|
|
39
39
|
}
|
40
40
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
41
41
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
42
|
+
const flat = (arr) => arr.reduce((acc, val) => acc.concat(val), []);
|
42
43
|
const unknownProp = null;
|
43
44
|
const numericProp = [Number, String];
|
44
45
|
const truthProp = {
|
@@ -3296,7 +3297,15 @@ var stdin_default$1A = defineComponent({
|
|
3296
3297
|
const onCancel = () => emit("cancel");
|
3297
3298
|
return () => {
|
3298
3299
|
var _a, _b;
|
3299
|
-
|
3300
|
+
let childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== Comment).map((node) => {
|
3301
|
+
if (node.type === Fragment) {
|
3302
|
+
return node.children;
|
3303
|
+
}
|
3304
|
+
return node;
|
3305
|
+
});
|
3306
|
+
if (childNodes) {
|
3307
|
+
childNodes = flat(childNodes);
|
3308
|
+
}
|
3300
3309
|
const confirmButtonText = showNextButton() ? props2.nextStepText : props2.confirmButtonText;
|
3301
3310
|
return createVNode("div", {
|
3302
3311
|
"class": bem$1l()
|
@@ -5575,11 +5584,11 @@ var stdin_default$1m = defineComponent({
|
|
5575
5584
|
slots,
|
5576
5585
|
emit
|
5577
5586
|
}) {
|
5578
|
-
const onClick = () => {
|
5587
|
+
const onClick = (event) => {
|
5579
5588
|
if (props2.switchable) {
|
5580
5589
|
emit("select");
|
5581
5590
|
}
|
5582
|
-
emit("click");
|
5591
|
+
emit("click", event);
|
5583
5592
|
};
|
5584
5593
|
const renderRightIcon = () => createVNode(Icon, {
|
5585
5594
|
"name": props2.rightIcon,
|
@@ -5587,7 +5596,7 @@ var stdin_default$1m = defineComponent({
|
|
5587
5596
|
"onClick": (event) => {
|
5588
5597
|
event.stopPropagation();
|
5589
5598
|
emit("edit");
|
5590
|
-
emit("click");
|
5599
|
+
emit("click", event);
|
5591
5600
|
}
|
5592
5601
|
}, null);
|
5593
5602
|
const renderTag = () => {
|
@@ -5669,7 +5678,9 @@ var stdin_default$1l = defineComponent({
|
|
5669
5678
|
}) {
|
5670
5679
|
const renderItem = (item, index, disabled) => {
|
5671
5680
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
5672
|
-
const onClick = () => emit("clickItem", item, index
|
5681
|
+
const onClick = (event) => emit("clickItem", item, index, {
|
5682
|
+
event
|
5683
|
+
});
|
5673
5684
|
const onSelect = () => {
|
5674
5685
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
5675
5686
|
if (!disabled) {
|
@@ -10032,7 +10043,9 @@ var stdin_default$S = defineComponent({
|
|
10032
10043
|
initialized = true;
|
10033
10044
|
});
|
10034
10045
|
});
|
10035
|
-
watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState
|
10046
|
+
watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
|
10047
|
+
deep: true
|
10048
|
+
});
|
10036
10049
|
const show = ref(true);
|
10037
10050
|
onActivated(() => {
|
10038
10051
|
show.value = true;
|
@@ -10785,7 +10798,9 @@ var stdin_default$N = defineComponent({
|
|
10785
10798
|
default: () => [slots.image ? createVNode("div", {
|
10786
10799
|
"class": bem$E("image-wrap")
|
10787
10800
|
}, [slots.image({
|
10788
|
-
src: props2.src
|
10801
|
+
src: props2.src,
|
10802
|
+
onLoad,
|
10803
|
+
style: imageStyle.value
|
10789
10804
|
})]) : createVNode(Image$1, {
|
10790
10805
|
"ref": imageRef,
|
10791
10806
|
"src": props2.src,
|
@@ -15011,6 +15026,7 @@ var stdin_default$9 = defineComponent({
|
|
15011
15026
|
const expanded = ref(false);
|
15012
15027
|
const hasAction = ref(false);
|
15013
15028
|
const root = ref();
|
15029
|
+
let needRecalculate = false;
|
15014
15030
|
const actionText = computed(() => expanded.value ? props2.collapseText : props2.expandText);
|
15015
15031
|
const pxToNum = (value) => {
|
15016
15032
|
if (!value)
|
@@ -15018,26 +15034,26 @@ var stdin_default$9 = defineComponent({
|
|
15018
15034
|
const match = value.match(/^\d*(\.\d*)?/);
|
15019
15035
|
return match ? Number(match[0]) : 0;
|
15020
15036
|
};
|
15037
|
+
const cloneContainer = () => {
|
15038
|
+
if (!root.value || !root.value.isConnected)
|
15039
|
+
return;
|
15040
|
+
const originStyle = window.getComputedStyle(root.value);
|
15041
|
+
const container = document.createElement("div");
|
15042
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
15043
|
+
styleNames.forEach((name2) => {
|
15044
|
+
container.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
15045
|
+
});
|
15046
|
+
container.style.position = "fixed";
|
15047
|
+
container.style.zIndex = "-9999";
|
15048
|
+
container.style.top = "-9999px";
|
15049
|
+
container.style.height = "auto";
|
15050
|
+
container.style.minHeight = "auto";
|
15051
|
+
container.style.maxHeight = "auto";
|
15052
|
+
container.innerText = props2.content;
|
15053
|
+
document.body.appendChild(container);
|
15054
|
+
return container;
|
15055
|
+
};
|
15021
15056
|
const calcEllipsised = () => {
|
15022
|
-
const cloneContainer = () => {
|
15023
|
-
if (!root.value)
|
15024
|
-
return;
|
15025
|
-
const originStyle = window.getComputedStyle(root.value);
|
15026
|
-
const container2 = document.createElement("div");
|
15027
|
-
const styleNames = Array.prototype.slice.apply(originStyle);
|
15028
|
-
styleNames.forEach((name2) => {
|
15029
|
-
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
15030
|
-
});
|
15031
|
-
container2.style.position = "fixed";
|
15032
|
-
container2.style.zIndex = "-9999";
|
15033
|
-
container2.style.top = "-9999px";
|
15034
|
-
container2.style.height = "auto";
|
15035
|
-
container2.style.minHeight = "auto";
|
15036
|
-
container2.style.maxHeight = "auto";
|
15037
|
-
container2.innerText = props2.content;
|
15038
|
-
document.body.appendChild(container2);
|
15039
|
-
return container2;
|
15040
|
-
};
|
15041
15057
|
const calcEllipsisText = (container2, maxHeight2) => {
|
15042
15058
|
const {
|
15043
15059
|
content,
|
@@ -15089,8 +15105,10 @@ var stdin_default$9 = defineComponent({
|
|
15089
15105
|
return container2.innerText;
|
15090
15106
|
};
|
15091
15107
|
const container = cloneContainer();
|
15092
|
-
if (!container)
|
15108
|
+
if (!container) {
|
15109
|
+
needRecalculate = true;
|
15093
15110
|
return;
|
15111
|
+
}
|
15094
15112
|
const {
|
15095
15113
|
paddingBottom,
|
15096
15114
|
paddingTop,
|
@@ -15123,6 +15141,12 @@ var stdin_default$9 = defineComponent({
|
|
15123
15141
|
}, [action]);
|
15124
15142
|
};
|
15125
15143
|
onMounted(calcEllipsised);
|
15144
|
+
onActivated(() => {
|
15145
|
+
if (needRecalculate) {
|
15146
|
+
needRecalculate = false;
|
15147
|
+
calcEllipsised();
|
15148
|
+
}
|
15149
|
+
});
|
15126
15150
|
watch([windowWidth, () => [props2.content, props2.rows, props2.position]], calcEllipsised);
|
15127
15151
|
useExpose({
|
15128
15152
|
toggle
|
@@ -16793,7 +16817,7 @@ const Lazyload = {
|
|
16793
16817
|
});
|
16794
16818
|
}
|
16795
16819
|
};
|
16796
|
-
const version = "4.8.
|
16820
|
+
const version = "4.8.8";
|
16797
16821
|
function install(app) {
|
16798
16822
|
const components = [
|
16799
16823
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
}
|
40
40
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
41
41
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
42
|
+
const flat = (arr) => arr.reduce((acc, val) => acc.concat(val), []);
|
42
43
|
const unknownProp = null;
|
43
44
|
const numericProp = [Number, String];
|
44
45
|
const truthProp = {
|
@@ -2368,7 +2369,7 @@
|
|
2368
2369
|
return propRef;
|
2369
2370
|
};
|
2370
2371
|
/**
|
2371
|
-
* @vue/shared v3.4.
|
2372
|
+
* @vue/shared v3.4.15
|
2372
2373
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
2373
2374
|
* @license MIT
|
2374
2375
|
**/
|
@@ -3760,7 +3761,15 @@
|
|
3760
3761
|
const onCancel = () => emit("cancel");
|
3761
3762
|
return () => {
|
3762
3763
|
var _a, _b;
|
3763
|
-
|
3764
|
+
let childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== vue.Comment).map((node) => {
|
3765
|
+
if (node.type === vue.Fragment) {
|
3766
|
+
return node.children;
|
3767
|
+
}
|
3768
|
+
return node;
|
3769
|
+
});
|
3770
|
+
if (childNodes) {
|
3771
|
+
childNodes = flat(childNodes);
|
3772
|
+
}
|
3764
3773
|
const confirmButtonText = showNextButton() ? props2.nextStepText : props2.confirmButtonText;
|
3765
3774
|
return vue.createVNode("div", {
|
3766
3775
|
"class": bem$1l()
|
@@ -6039,11 +6048,11 @@
|
|
6039
6048
|
slots,
|
6040
6049
|
emit
|
6041
6050
|
}) {
|
6042
|
-
const onClick = () => {
|
6051
|
+
const onClick = (event) => {
|
6043
6052
|
if (props2.switchable) {
|
6044
6053
|
emit("select");
|
6045
6054
|
}
|
6046
|
-
emit("click");
|
6055
|
+
emit("click", event);
|
6047
6056
|
};
|
6048
6057
|
const renderRightIcon = () => vue.createVNode(Icon, {
|
6049
6058
|
"name": props2.rightIcon,
|
@@ -6051,7 +6060,7 @@
|
|
6051
6060
|
"onClick": (event) => {
|
6052
6061
|
event.stopPropagation();
|
6053
6062
|
emit("edit");
|
6054
|
-
emit("click");
|
6063
|
+
emit("click", event);
|
6055
6064
|
}
|
6056
6065
|
}, null);
|
6057
6066
|
const renderTag = () => {
|
@@ -6133,7 +6142,9 @@
|
|
6133
6142
|
}) {
|
6134
6143
|
const renderItem = (item, index, disabled) => {
|
6135
6144
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
6136
|
-
const onClick = () => emit("clickItem", item, index
|
6145
|
+
const onClick = (event) => emit("clickItem", item, index, {
|
6146
|
+
event
|
6147
|
+
});
|
6137
6148
|
const onSelect = () => {
|
6138
6149
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
6139
6150
|
if (!disabled) {
|
@@ -10470,7 +10481,9 @@
|
|
10470
10481
|
initialized = true;
|
10471
10482
|
});
|
10472
10483
|
});
|
10473
|
-
vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState
|
10484
|
+
vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
|
10485
|
+
deep: true
|
10486
|
+
});
|
10474
10487
|
const show = vue.ref(true);
|
10475
10488
|
vue.onActivated(() => {
|
10476
10489
|
show.value = true;
|
@@ -11220,7 +11233,9 @@
|
|
11220
11233
|
default: () => [slots.image ? vue.createVNode("div", {
|
11221
11234
|
"class": bem$E("image-wrap")
|
11222
11235
|
}, [slots.image({
|
11223
|
-
src: props2.src
|
11236
|
+
src: props2.src,
|
11237
|
+
onLoad,
|
11238
|
+
style: imageStyle.value
|
11224
11239
|
})]) : vue.createVNode(Image$1, {
|
11225
11240
|
"ref": imageRef,
|
11226
11241
|
"src": props2.src,
|
@@ -16246,6 +16261,7 @@
|
|
16246
16261
|
const expanded = vue.ref(false);
|
16247
16262
|
const hasAction = vue.ref(false);
|
16248
16263
|
const root = vue.ref();
|
16264
|
+
let needRecalculate = false;
|
16249
16265
|
const actionText = vue.computed(() => expanded.value ? props2.collapseText : props2.expandText);
|
16250
16266
|
const pxToNum = (value) => {
|
16251
16267
|
if (!value)
|
@@ -16253,26 +16269,26 @@
|
|
16253
16269
|
const match = value.match(/^\d*(\.\d*)?/);
|
16254
16270
|
return match ? Number(match[0]) : 0;
|
16255
16271
|
};
|
16272
|
+
const cloneContainer = () => {
|
16273
|
+
if (!root.value || !root.value.isConnected)
|
16274
|
+
return;
|
16275
|
+
const originStyle = window.getComputedStyle(root.value);
|
16276
|
+
const container = document.createElement("div");
|
16277
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
16278
|
+
styleNames.forEach((name2) => {
|
16279
|
+
container.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
16280
|
+
});
|
16281
|
+
container.style.position = "fixed";
|
16282
|
+
container.style.zIndex = "-9999";
|
16283
|
+
container.style.top = "-9999px";
|
16284
|
+
container.style.height = "auto";
|
16285
|
+
container.style.minHeight = "auto";
|
16286
|
+
container.style.maxHeight = "auto";
|
16287
|
+
container.innerText = props2.content;
|
16288
|
+
document.body.appendChild(container);
|
16289
|
+
return container;
|
16290
|
+
};
|
16256
16291
|
const calcEllipsised = () => {
|
16257
|
-
const cloneContainer = () => {
|
16258
|
-
if (!root.value)
|
16259
|
-
return;
|
16260
|
-
const originStyle = window.getComputedStyle(root.value);
|
16261
|
-
const container2 = document.createElement("div");
|
16262
|
-
const styleNames = Array.prototype.slice.apply(originStyle);
|
16263
|
-
styleNames.forEach((name2) => {
|
16264
|
-
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
16265
|
-
});
|
16266
|
-
container2.style.position = "fixed";
|
16267
|
-
container2.style.zIndex = "-9999";
|
16268
|
-
container2.style.top = "-9999px";
|
16269
|
-
container2.style.height = "auto";
|
16270
|
-
container2.style.minHeight = "auto";
|
16271
|
-
container2.style.maxHeight = "auto";
|
16272
|
-
container2.innerText = props2.content;
|
16273
|
-
document.body.appendChild(container2);
|
16274
|
-
return container2;
|
16275
|
-
};
|
16276
16292
|
const calcEllipsisText = (container2, maxHeight2) => {
|
16277
16293
|
const {
|
16278
16294
|
content,
|
@@ -16324,8 +16340,10 @@
|
|
16324
16340
|
return container2.innerText;
|
16325
16341
|
};
|
16326
16342
|
const container = cloneContainer();
|
16327
|
-
if (!container)
|
16343
|
+
if (!container) {
|
16344
|
+
needRecalculate = true;
|
16328
16345
|
return;
|
16346
|
+
}
|
16329
16347
|
const {
|
16330
16348
|
paddingBottom,
|
16331
16349
|
paddingTop,
|
@@ -16358,6 +16376,12 @@
|
|
16358
16376
|
}, [action]);
|
16359
16377
|
};
|
16360
16378
|
vue.onMounted(calcEllipsised);
|
16379
|
+
vue.onActivated(() => {
|
16380
|
+
if (needRecalculate) {
|
16381
|
+
needRecalculate = false;
|
16382
|
+
calcEllipsised();
|
16383
|
+
}
|
16384
|
+
});
|
16361
16385
|
vue.watch([windowWidth, () => [props2.content, props2.rows, props2.position]], calcEllipsised);
|
16362
16386
|
useExpose({
|
16363
16387
|
toggle
|
@@ -18008,7 +18032,7 @@
|
|
18008
18032
|
});
|
18009
18033
|
}
|
18010
18034
|
};
|
18011
|
-
const version = "4.8.
|
18035
|
+
const version = "4.8.8";
|
18012
18036
|
function install(app) {
|
18013
18037
|
const components = [
|
18014
18038
|
ActionBar,
|