vant 4.8.7 → 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/address-list/AddressList.mjs +3 -1
- package/es/address-list/AddressListItem.mjs +3 -3
- package/es/floating-bubble/FloatingBubble.mjs +3 -1
- package/es/image-preview/ImagePreviewItem.mjs +3 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/picker-group/PickerGroup.mjs +11 -3
- package/es/text-ellipsis/TextEllipsis.mjs +30 -21
- package/es/utils/basic.d.ts +1 -0
- package/es/utils/basic.mjs +2 -0
- package/lib/address-list/AddressList.js +3 -1
- package/lib/address-list/AddressListItem.js +3 -3
- package/lib/floating-bubble/FloatingBubble.js +3 -1
- package/lib/image-preview/ImagePreviewItem.js +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/picker-group/PickerGroup.js +9 -1
- package/lib/text-ellipsis/TextEllipsis.js +29 -20
- 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/web-types.json +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
@@ -126,7 +126,7 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
|
|
126
126
|
| [vant-playground](https://github.com/LadyChatterleyLover/vant-playground) | Vant Playground |
|
127
127
|
| [sfc-playground-vant](https://github.com/zhixiaoqiang/sfc-playground-vant) | Vant Playground |
|
128
128
|
| [vue3-h5-template](https://github.com/yulimchen/vue3-h5-template) | Mobile project template based on Vant |
|
129
|
-
| [vue3-vant-mobile](https://github.com/
|
129
|
+
| [vue3-vant-mobile](https://github.com/easy-temps/vue3-vant-mobile) | Mobile project template based on Vant |
|
130
130
|
| [vscode-common-intellisense](https://github.com/Simon-He95/vscode-common-intellisense) | A VS Code extension that provides better intellisense to Vant developers |
|
131
131
|
|
132
132
|
## Links
|
@@ -26,7 +26,9 @@ var stdin_default = defineComponent({
|
|
26
26
|
}) {
|
27
27
|
const renderItem = (item, index, disabled) => {
|
28
28
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
29
|
-
const onClick = () => emit("clickItem", item, index
|
29
|
+
const onClick = (event) => emit("clickItem", item, index, {
|
30
|
+
event
|
31
|
+
});
|
30
32
|
const onSelect = () => {
|
31
33
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
32
34
|
if (!disabled) {
|
@@ -20,11 +20,11 @@ var stdin_default = defineComponent({
|
|
20
20
|
slots,
|
21
21
|
emit
|
22
22
|
}) {
|
23
|
-
const onClick = () => {
|
23
|
+
const onClick = (event) => {
|
24
24
|
if (props.switchable) {
|
25
25
|
emit("select");
|
26
26
|
}
|
27
|
-
emit("click");
|
27
|
+
emit("click", event);
|
28
28
|
};
|
29
29
|
const renderRightIcon = () => _createVNode(Icon, {
|
30
30
|
"name": props.rightIcon,
|
@@ -32,7 +32,7 @@ var stdin_default = defineComponent({
|
|
32
32
|
"onClick": (event) => {
|
33
33
|
event.stopPropagation();
|
34
34
|
emit("edit");
|
35
|
-
emit("click");
|
35
|
+
emit("click", event);
|
36
36
|
}
|
37
37
|
}, null);
|
38
38
|
const renderTag = () => {
|
@@ -144,7 +144,9 @@ var stdin_default = defineComponent({
|
|
144
144
|
initialized = true;
|
145
145
|
});
|
146
146
|
});
|
147
|
-
watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState
|
147
|
+
watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState, {
|
148
|
+
deep: true
|
149
|
+
});
|
148
150
|
const show = ref(true);
|
149
151
|
onActivated(() => {
|
150
152
|
show.value = true;
|
@@ -318,7 +318,9 @@ var stdin_default = defineComponent({
|
|
318
318
|
default: () => [slots.image ? _createVNode("div", {
|
319
319
|
"class": bem("image-wrap")
|
320
320
|
}, [slots.image({
|
321
|
-
src: props.src
|
321
|
+
src: props.src,
|
322
|
+
onLoad,
|
323
|
+
style: imageStyle.value
|
322
324
|
})]) : _createVNode(Image, {
|
323
325
|
"ref": imageRef,
|
324
326
|
"src": props.src,
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
|
|
99
99
|
import { TreeSelect } from "./tree-select/index.mjs";
|
100
100
|
import { Uploader } from "./uploader/index.mjs";
|
101
101
|
import { Watermark } from "./watermark/index.mjs";
|
102
|
-
const version = "4.8.
|
102
|
+
const version = "4.8.8";
|
103
103
|
function install(app) {
|
104
104
|
const components = [
|
105
105
|
ActionBar,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { defineComponent, Comment } from "vue";
|
3
|
-
import { pick, extend, makeArrayProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
2
|
+
import { defineComponent, Comment, Fragment } from "vue";
|
3
|
+
import { flat, pick, extend, makeArrayProp, makeNumericProp, createNamespace } from "../utils/index.mjs";
|
4
4
|
import { useChildren } from "@vant/use";
|
5
5
|
import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
|
6
6
|
import { Tab } from "../tab/index.mjs";
|
@@ -38,7 +38,15 @@ var stdin_default = defineComponent({
|
|
38
38
|
const onCancel = () => emit("cancel");
|
39
39
|
return () => {
|
40
40
|
var _a, _b;
|
41
|
-
|
41
|
+
let childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== Comment).map((node) => {
|
42
|
+
if (node.type === Fragment) {
|
43
|
+
return node.children;
|
44
|
+
}
|
45
|
+
return node;
|
46
|
+
});
|
47
|
+
if (childNodes) {
|
48
|
+
childNodes = flat(childNodes);
|
49
|
+
}
|
42
50
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
43
51
|
return _createVNode("div", {
|
44
52
|
"class": bem()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createVNode as _createVNode } from "vue";
|
2
|
-
import { ref, watch, computed, onMounted, defineComponent } from "vue";
|
2
|
+
import { ref, watch, computed, onActivated, onMounted, defineComponent } from "vue";
|
3
3
|
import { makeNumericProp, makeStringProp, createNamespace, windowWidth } from "../utils/index.mjs";
|
4
4
|
import { useExpose } from "../composables/use-expose.mjs";
|
5
5
|
const [name, bem] = createNamespace("text-ellipsis");
|
@@ -23,6 +23,7 @@ var stdin_default = defineComponent({
|
|
23
23
|
const expanded = ref(false);
|
24
24
|
const hasAction = ref(false);
|
25
25
|
const root = ref();
|
26
|
+
let needRecalculate = false;
|
26
27
|
const actionText = computed(() => expanded.value ? props.collapseText : props.expandText);
|
27
28
|
const pxToNum = (value) => {
|
28
29
|
if (!value)
|
@@ -30,26 +31,26 @@ var stdin_default = defineComponent({
|
|
30
31
|
const match = value.match(/^\d*(\.\d*)?/);
|
31
32
|
return match ? Number(match[0]) : 0;
|
32
33
|
};
|
34
|
+
const cloneContainer = () => {
|
35
|
+
if (!root.value || !root.value.isConnected)
|
36
|
+
return;
|
37
|
+
const originStyle = window.getComputedStyle(root.value);
|
38
|
+
const container = document.createElement("div");
|
39
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
40
|
+
styleNames.forEach((name2) => {
|
41
|
+
container.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
42
|
+
});
|
43
|
+
container.style.position = "fixed";
|
44
|
+
container.style.zIndex = "-9999";
|
45
|
+
container.style.top = "-9999px";
|
46
|
+
container.style.height = "auto";
|
47
|
+
container.style.minHeight = "auto";
|
48
|
+
container.style.maxHeight = "auto";
|
49
|
+
container.innerText = props.content;
|
50
|
+
document.body.appendChild(container);
|
51
|
+
return container;
|
52
|
+
};
|
33
53
|
const calcEllipsised = () => {
|
34
|
-
const cloneContainer = () => {
|
35
|
-
if (!root.value)
|
36
|
-
return;
|
37
|
-
const originStyle = window.getComputedStyle(root.value);
|
38
|
-
const container2 = document.createElement("div");
|
39
|
-
const styleNames = Array.prototype.slice.apply(originStyle);
|
40
|
-
styleNames.forEach((name2) => {
|
41
|
-
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
42
|
-
});
|
43
|
-
container2.style.position = "fixed";
|
44
|
-
container2.style.zIndex = "-9999";
|
45
|
-
container2.style.top = "-9999px";
|
46
|
-
container2.style.height = "auto";
|
47
|
-
container2.style.minHeight = "auto";
|
48
|
-
container2.style.maxHeight = "auto";
|
49
|
-
container2.innerText = props.content;
|
50
|
-
document.body.appendChild(container2);
|
51
|
-
return container2;
|
52
|
-
};
|
53
54
|
const calcEllipsisText = (container2, maxHeight2) => {
|
54
55
|
const {
|
55
56
|
content,
|
@@ -101,8 +102,10 @@ var stdin_default = defineComponent({
|
|
101
102
|
return container2.innerText;
|
102
103
|
};
|
103
104
|
const container = cloneContainer();
|
104
|
-
if (!container)
|
105
|
+
if (!container) {
|
106
|
+
needRecalculate = true;
|
105
107
|
return;
|
108
|
+
}
|
106
109
|
const {
|
107
110
|
paddingBottom,
|
108
111
|
paddingTop,
|
@@ -135,6 +138,12 @@ var stdin_default = defineComponent({
|
|
135
138
|
}, [action]);
|
136
139
|
};
|
137
140
|
onMounted(calcEllipsised);
|
141
|
+
onActivated(() => {
|
142
|
+
if (needRecalculate) {
|
143
|
+
needRecalculate = false;
|
144
|
+
calcEllipsised();
|
145
|
+
}
|
146
|
+
});
|
138
147
|
watch([windowWidth, () => [props.content, props.rows, props.position]], calcEllipsised);
|
139
148
|
useExpose({
|
140
149
|
toggle
|
package/es/utils/basic.d.ts
CHANGED
@@ -27,3 +27,4 @@ export type RequiredParams<T> = T extends (...args: infer P) => infer R ? (...ar
|
|
27
27
|
export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>, ignoreUndefined?: boolean): Writeable<Pick<T, U>>;
|
28
28
|
export declare const isSameValue: (newValue: unknown, oldValue: unknown) => boolean;
|
29
29
|
export declare const toArray: <T>(item: T | T[]) => T[];
|
30
|
+
export declare const flat: <T>(arr: (T | T[])[]) => T[];
|
package/es/utils/basic.mjs
CHANGED
@@ -35,8 +35,10 @@ function pick(obj, keys, ignoreUndefined) {
|
|
35
35
|
}
|
36
36
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
37
37
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
38
|
+
const flat = (arr) => arr.reduce((acc, val) => acc.concat(val), []);
|
38
39
|
export {
|
39
40
|
extend,
|
41
|
+
flat,
|
40
42
|
get,
|
41
43
|
inBrowser,
|
42
44
|
isDate,
|
@@ -59,7 +59,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
59
59
|
}) {
|
60
60
|
const renderItem = (item, index, disabled) => {
|
61
61
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
62
|
-
const onClick = () => emit("clickItem", item, index
|
62
|
+
const onClick = (event) => emit("clickItem", item, index, {
|
63
|
+
event
|
64
|
+
});
|
63
65
|
const onSelect = () => {
|
64
66
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
65
67
|
if (!disabled) {
|
@@ -42,11 +42,11 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
42
42
|
slots,
|
43
43
|
emit
|
44
44
|
}) {
|
45
|
-
const onClick = () => {
|
45
|
+
const onClick = (event) => {
|
46
46
|
if (props.switchable) {
|
47
47
|
emit("select");
|
48
48
|
}
|
49
|
-
emit("click");
|
49
|
+
emit("click", event);
|
50
50
|
};
|
51
51
|
const renderRightIcon = () => (0, import_vue.createVNode)(import_icon.Icon, {
|
52
52
|
"name": props.rightIcon,
|
@@ -54,7 +54,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
54
54
|
"onClick": (event) => {
|
55
55
|
event.stopPropagation();
|
56
56
|
emit("edit");
|
57
|
-
emit("click");
|
57
|
+
emit("click", event);
|
58
58
|
}
|
59
59
|
}, null);
|
60
60
|
const renderTag = () => {
|
@@ -177,7 +177,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
177
177
|
initialized = true;
|
178
178
|
});
|
179
179
|
});
|
180
|
-
(0, import_vue2.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], updateState
|
180
|
+
(0, import_vue2.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], updateState, {
|
181
|
+
deep: true
|
182
|
+
});
|
181
183
|
const show = (0, import_vue2.ref)(true);
|
182
184
|
(0, import_vue2.onActivated)(() => {
|
183
185
|
show.value = true;
|
@@ -340,7 +340,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
340
340
|
default: () => [slots.image ? (0, import_vue.createVNode)("div", {
|
341
341
|
"class": bem("image-wrap")
|
342
342
|
}, [slots.image({
|
343
|
-
src: props.src
|
343
|
+
src: props.src,
|
344
|
+
onLoad,
|
345
|
+
style: imageStyle.value
|
344
346
|
})]) : (0, import_vue.createVNode)(import_image.Image, {
|
345
347
|
"ref": imageRef,
|
346
348
|
"src": props.src,
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
229
|
-
const version = "4.8.
|
229
|
+
const version = "4.8.8";
|
230
230
|
function install(app) {
|
231
231
|
const components = [
|
232
232
|
import_action_bar.ActionBar,
|
@@ -72,7 +72,15 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
72
72
|
const onCancel = () => emit("cancel");
|
73
73
|
return () => {
|
74
74
|
var _a, _b;
|
75
|
-
|
75
|
+
let childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== import_vue2.Comment).map((node) => {
|
76
|
+
if (node.type === import_vue2.Fragment) {
|
77
|
+
return node.children;
|
78
|
+
}
|
79
|
+
return node;
|
80
|
+
});
|
81
|
+
if (childNodes) {
|
82
|
+
childNodes = (0, import_utils.flat)(childNodes);
|
83
|
+
}
|
76
84
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
77
85
|
return (0, import_vue.createVNode)("div", {
|
78
86
|
"class": bem()
|
@@ -46,6 +46,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
46
46
|
const expanded = (0, import_vue2.ref)(false);
|
47
47
|
const hasAction = (0, import_vue2.ref)(false);
|
48
48
|
const root = (0, import_vue2.ref)();
|
49
|
+
let needRecalculate = false;
|
49
50
|
const actionText = (0, import_vue2.computed)(() => expanded.value ? props.collapseText : props.expandText);
|
50
51
|
const pxToNum = (value) => {
|
51
52
|
if (!value)
|
@@ -53,26 +54,26 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
53
54
|
const match = value.match(/^\d*(\.\d*)?/);
|
54
55
|
return match ? Number(match[0]) : 0;
|
55
56
|
};
|
57
|
+
const cloneContainer = () => {
|
58
|
+
if (!root.value || !root.value.isConnected)
|
59
|
+
return;
|
60
|
+
const originStyle = window.getComputedStyle(root.value);
|
61
|
+
const container = document.createElement("div");
|
62
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
63
|
+
styleNames.forEach((name2) => {
|
64
|
+
container.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
65
|
+
});
|
66
|
+
container.style.position = "fixed";
|
67
|
+
container.style.zIndex = "-9999";
|
68
|
+
container.style.top = "-9999px";
|
69
|
+
container.style.height = "auto";
|
70
|
+
container.style.minHeight = "auto";
|
71
|
+
container.style.maxHeight = "auto";
|
72
|
+
container.innerText = props.content;
|
73
|
+
document.body.appendChild(container);
|
74
|
+
return container;
|
75
|
+
};
|
56
76
|
const calcEllipsised = () => {
|
57
|
-
const cloneContainer = () => {
|
58
|
-
if (!root.value)
|
59
|
-
return;
|
60
|
-
const originStyle = window.getComputedStyle(root.value);
|
61
|
-
const container2 = document.createElement("div");
|
62
|
-
const styleNames = Array.prototype.slice.apply(originStyle);
|
63
|
-
styleNames.forEach((name2) => {
|
64
|
-
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
65
|
-
});
|
66
|
-
container2.style.position = "fixed";
|
67
|
-
container2.style.zIndex = "-9999";
|
68
|
-
container2.style.top = "-9999px";
|
69
|
-
container2.style.height = "auto";
|
70
|
-
container2.style.minHeight = "auto";
|
71
|
-
container2.style.maxHeight = "auto";
|
72
|
-
container2.innerText = props.content;
|
73
|
-
document.body.appendChild(container2);
|
74
|
-
return container2;
|
75
|
-
};
|
76
77
|
const calcEllipsisText = (container2, maxHeight2) => {
|
77
78
|
const {
|
78
79
|
content,
|
@@ -124,8 +125,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
124
125
|
return container2.innerText;
|
125
126
|
};
|
126
127
|
const container = cloneContainer();
|
127
|
-
if (!container)
|
128
|
+
if (!container) {
|
129
|
+
needRecalculate = true;
|
128
130
|
return;
|
131
|
+
}
|
129
132
|
const {
|
130
133
|
paddingBottom,
|
131
134
|
paddingTop,
|
@@ -158,6 +161,12 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
158
161
|
}, [action]);
|
159
162
|
};
|
160
163
|
(0, import_vue2.onMounted)(calcEllipsised);
|
164
|
+
(0, import_vue2.onActivated)(() => {
|
165
|
+
if (needRecalculate) {
|
166
|
+
needRecalculate = false;
|
167
|
+
calcEllipsised();
|
168
|
+
}
|
169
|
+
});
|
161
170
|
(0, import_vue2.watch)([import_utils.windowWidth, () => [props.content, props.rows, props.position]], calcEllipsised);
|
162
171
|
(0, import_use_expose.useExpose)({
|
163
172
|
toggle
|
package/lib/utils/basic.d.ts
CHANGED
@@ -27,3 +27,4 @@ export type RequiredParams<T> = T extends (...args: infer P) => infer R ? (...ar
|
|
27
27
|
export declare function pick<T, U extends keyof T>(obj: T, keys: ReadonlyArray<U>, ignoreUndefined?: boolean): Writeable<Pick<T, U>>;
|
28
28
|
export declare const isSameValue: (newValue: unknown, oldValue: unknown) => boolean;
|
29
29
|
export declare const toArray: <T>(item: T | T[]) => T[];
|
30
|
+
export declare const flat: <T>(arr: (T | T[])[]) => T[];
|
package/lib/utils/basic.js
CHANGED
@@ -18,6 +18,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
18
18
|
var stdin_exports = {};
|
19
19
|
__export(stdin_exports, {
|
20
20
|
extend: () => extend,
|
21
|
+
flat: () => flat,
|
21
22
|
get: () => get,
|
22
23
|
inBrowser: () => inBrowser,
|
23
24
|
isDate: () => isDate,
|
@@ -71,3 +72,4 @@ function pick(obj, keys, ignoreUndefined) {
|
|
71
72
|
}
|
72
73
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
73
74
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
75
|
+
const flat = (arr) => arr.reduce((acc, val) => acc.concat(val), []);
|
package/lib/vant.cjs.js
CHANGED
@@ -41,6 +41,7 @@ function pick(obj, keys, ignoreUndefined) {
|
|
41
41
|
}
|
42
42
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
43
43
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
44
|
+
const flat = (arr) => arr.reduce((acc, val) => acc.concat(val), []);
|
44
45
|
const unknownProp = null;
|
45
46
|
const numericProp = [Number, String];
|
46
47
|
const truthProp = {
|
@@ -3298,7 +3299,15 @@ var stdin_default$1A = vue.defineComponent({
|
|
3298
3299
|
const onCancel = () => emit("cancel");
|
3299
3300
|
return () => {
|
3300
3301
|
var _a, _b;
|
3301
|
-
|
3302
|
+
let childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== vue.Comment).map((node) => {
|
3303
|
+
if (node.type === vue.Fragment) {
|
3304
|
+
return node.children;
|
3305
|
+
}
|
3306
|
+
return node;
|
3307
|
+
});
|
3308
|
+
if (childNodes) {
|
3309
|
+
childNodes = flat(childNodes);
|
3310
|
+
}
|
3302
3311
|
const confirmButtonText = showNextButton() ? props2.nextStepText : props2.confirmButtonText;
|
3303
3312
|
return vue.createVNode("div", {
|
3304
3313
|
"class": bem$1l()
|
@@ -5577,11 +5586,11 @@ var stdin_default$1m = vue.defineComponent({
|
|
5577
5586
|
slots,
|
5578
5587
|
emit
|
5579
5588
|
}) {
|
5580
|
-
const onClick = () => {
|
5589
|
+
const onClick = (event) => {
|
5581
5590
|
if (props2.switchable) {
|
5582
5591
|
emit("select");
|
5583
5592
|
}
|
5584
|
-
emit("click");
|
5593
|
+
emit("click", event);
|
5585
5594
|
};
|
5586
5595
|
const renderRightIcon = () => vue.createVNode(Icon, {
|
5587
5596
|
"name": props2.rightIcon,
|
@@ -5589,7 +5598,7 @@ var stdin_default$1m = vue.defineComponent({
|
|
5589
5598
|
"onClick": (event) => {
|
5590
5599
|
event.stopPropagation();
|
5591
5600
|
emit("edit");
|
5592
|
-
emit("click");
|
5601
|
+
emit("click", event);
|
5593
5602
|
}
|
5594
5603
|
}, null);
|
5595
5604
|
const renderTag = () => {
|
@@ -5671,7 +5680,9 @@ var stdin_default$1l = vue.defineComponent({
|
|
5671
5680
|
}) {
|
5672
5681
|
const renderItem = (item, index, disabled) => {
|
5673
5682
|
const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
|
5674
|
-
const onClick = () => emit("clickItem", item, index
|
5683
|
+
const onClick = (event) => emit("clickItem", item, index, {
|
5684
|
+
event
|
5685
|
+
});
|
5675
5686
|
const onSelect = () => {
|
5676
5687
|
emit(disabled ? "selectDisabled" : "select", item, index);
|
5677
5688
|
if (!disabled) {
|
@@ -10034,7 +10045,9 @@ var stdin_default$S = vue.defineComponent({
|
|
10034
10045
|
initialized = true;
|
10035
10046
|
});
|
10036
10047
|
});
|
10037
|
-
vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState
|
10048
|
+
vue.watch([windowWidth, windowHeight, () => props2.gap, () => props2.offset], updateState, {
|
10049
|
+
deep: true
|
10050
|
+
});
|
10038
10051
|
const show = vue.ref(true);
|
10039
10052
|
vue.onActivated(() => {
|
10040
10053
|
show.value = true;
|
@@ -10787,7 +10800,9 @@ var stdin_default$N = vue.defineComponent({
|
|
10787
10800
|
default: () => [slots.image ? vue.createVNode("div", {
|
10788
10801
|
"class": bem$E("image-wrap")
|
10789
10802
|
}, [slots.image({
|
10790
|
-
src: props2.src
|
10803
|
+
src: props2.src,
|
10804
|
+
onLoad,
|
10805
|
+
style: imageStyle.value
|
10791
10806
|
})]) : vue.createVNode(Image$1, {
|
10792
10807
|
"ref": imageRef,
|
10793
10808
|
"src": props2.src,
|
@@ -15013,6 +15028,7 @@ var stdin_default$9 = vue.defineComponent({
|
|
15013
15028
|
const expanded = vue.ref(false);
|
15014
15029
|
const hasAction = vue.ref(false);
|
15015
15030
|
const root = vue.ref();
|
15031
|
+
let needRecalculate = false;
|
15016
15032
|
const actionText = vue.computed(() => expanded.value ? props2.collapseText : props2.expandText);
|
15017
15033
|
const pxToNum = (value) => {
|
15018
15034
|
if (!value)
|
@@ -15020,26 +15036,26 @@ var stdin_default$9 = vue.defineComponent({
|
|
15020
15036
|
const match = value.match(/^\d*(\.\d*)?/);
|
15021
15037
|
return match ? Number(match[0]) : 0;
|
15022
15038
|
};
|
15039
|
+
const cloneContainer = () => {
|
15040
|
+
if (!root.value || !root.value.isConnected)
|
15041
|
+
return;
|
15042
|
+
const originStyle = window.getComputedStyle(root.value);
|
15043
|
+
const container = document.createElement("div");
|
15044
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
15045
|
+
styleNames.forEach((name2) => {
|
15046
|
+
container.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
15047
|
+
});
|
15048
|
+
container.style.position = "fixed";
|
15049
|
+
container.style.zIndex = "-9999";
|
15050
|
+
container.style.top = "-9999px";
|
15051
|
+
container.style.height = "auto";
|
15052
|
+
container.style.minHeight = "auto";
|
15053
|
+
container.style.maxHeight = "auto";
|
15054
|
+
container.innerText = props2.content;
|
15055
|
+
document.body.appendChild(container);
|
15056
|
+
return container;
|
15057
|
+
};
|
15023
15058
|
const calcEllipsised = () => {
|
15024
|
-
const cloneContainer = () => {
|
15025
|
-
if (!root.value)
|
15026
|
-
return;
|
15027
|
-
const originStyle = window.getComputedStyle(root.value);
|
15028
|
-
const container2 = document.createElement("div");
|
15029
|
-
const styleNames = Array.prototype.slice.apply(originStyle);
|
15030
|
-
styleNames.forEach((name2) => {
|
15031
|
-
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
15032
|
-
});
|
15033
|
-
container2.style.position = "fixed";
|
15034
|
-
container2.style.zIndex = "-9999";
|
15035
|
-
container2.style.top = "-9999px";
|
15036
|
-
container2.style.height = "auto";
|
15037
|
-
container2.style.minHeight = "auto";
|
15038
|
-
container2.style.maxHeight = "auto";
|
15039
|
-
container2.innerText = props2.content;
|
15040
|
-
document.body.appendChild(container2);
|
15041
|
-
return container2;
|
15042
|
-
};
|
15043
15059
|
const calcEllipsisText = (container2, maxHeight2) => {
|
15044
15060
|
const {
|
15045
15061
|
content,
|
@@ -15091,8 +15107,10 @@ var stdin_default$9 = vue.defineComponent({
|
|
15091
15107
|
return container2.innerText;
|
15092
15108
|
};
|
15093
15109
|
const container = cloneContainer();
|
15094
|
-
if (!container)
|
15110
|
+
if (!container) {
|
15111
|
+
needRecalculate = true;
|
15095
15112
|
return;
|
15113
|
+
}
|
15096
15114
|
const {
|
15097
15115
|
paddingBottom,
|
15098
15116
|
paddingTop,
|
@@ -15125,6 +15143,12 @@ var stdin_default$9 = vue.defineComponent({
|
|
15125
15143
|
}, [action]);
|
15126
15144
|
};
|
15127
15145
|
vue.onMounted(calcEllipsised);
|
15146
|
+
vue.onActivated(() => {
|
15147
|
+
if (needRecalculate) {
|
15148
|
+
needRecalculate = false;
|
15149
|
+
calcEllipsised();
|
15150
|
+
}
|
15151
|
+
});
|
15128
15152
|
vue.watch([windowWidth, () => [props2.content, props2.rows, props2.position]], calcEllipsised);
|
15129
15153
|
useExpose({
|
15130
15154
|
toggle
|
@@ -16795,7 +16819,7 @@ const Lazyload = {
|
|
16795
16819
|
});
|
16796
16820
|
}
|
16797
16821
|
};
|
16798
|
-
const version = "4.8.
|
16822
|
+
const version = "4.8.8";
|
16799
16823
|
function install(app) {
|
16800
16824
|
const components = [
|
16801
16825
|
ActionBar,
|