vant 4.0.11 → 4.1.1
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 +7 -3
- package/es/area/utils.mjs +2 -2
- package/es/back-top/BackTop.mjs +1 -1
- package/es/badge/Badge.mjs +1 -1
- package/es/button/Button.d.ts +1 -1
- package/es/button/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +2 -2
- package/es/calendar/utils.mjs +1 -1
- package/es/checkbox/Checkbox.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/dropdown-item/DropdownItem.mjs +1 -0
- package/es/dropdown-menu/DropdownMenu.mjs +2 -2
- package/es/dropdown-menu/types.d.ts +1 -0
- package/es/field/Field.mjs +2 -2
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/field/types.d.ts +2 -2
- package/es/grid-item/GridItem.mjs +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +3 -2
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/lazyload/vue-lazyload/index.mjs +5 -0
- package/es/lazyload/vue-lazyload/lazy-image.mjs +0 -1
- package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
- package/es/lazyload/vue-lazyload/listener.mjs +45 -0
- package/es/list/List.mjs +3 -2
- package/es/locale/lang/uk-UA.mjs +15 -15
- package/es/number-keyboard/NumberKeyboard.mjs +1 -1
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/picker/Picker.mjs +1 -0
- package/es/popup/shared.mjs +12 -0
- package/es/progress/Progress.mjs +1 -1
- package/es/search/Search.mjs +4 -4
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/stepper/Stepper.mjs +2 -2
- package/es/sticky/Sticky.mjs +2 -0
- package/es/swipe/Swipe.mjs +9 -4
- package/es/tabs/Tabs.mjs +1 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/text-ellipsis/TextEllipsis.d.ts +63 -0
- package/es/text-ellipsis/TextEllipsis.mjs +108 -0
- package/es/text-ellipsis/index.css +1 -0
- package/es/text-ellipsis/index.d.ts +51 -0
- package/es/text-ellipsis/index.mjs +10 -0
- package/es/text-ellipsis/style/index.d.ts +1 -0
- package/es/text-ellipsis/style/index.mjs +2 -0
- package/es/text-ellipsis/types.d.ts +3 -0
- package/es/text-ellipsis/types.mjs +0 -0
- package/es/tree-select/TreeSelect.mjs +4 -3
- package/es/uploader/Uploader.mjs +1 -1
- package/es/uploader/utils.mjs +2 -2
- package/lib/action-bar/index.js +4 -0
- package/lib/action-bar-button/index.js +4 -0
- package/lib/action-bar-icon/index.js +4 -0
- package/lib/action-sheet/index.js +4 -0
- package/lib/address-edit/AddressEdit.js +4 -0
- package/lib/address-edit/index.js +4 -0
- package/lib/address-list/AddressList.js +4 -0
- package/lib/address-list/index.js +4 -0
- package/lib/area/index.js +4 -0
- package/lib/area/utils.js +2 -2
- package/lib/back-top/BackTop.js +1 -1
- package/lib/back-top/index.js +4 -0
- package/lib/badge/Badge.js +1 -1
- package/lib/badge/index.js +4 -0
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +4 -0
- package/lib/calendar/Calendar.js +6 -2
- package/lib/calendar/CalendarMonth.js +4 -0
- package/lib/calendar/index.js +4 -0
- package/lib/calendar/utils.js +1 -1
- package/lib/card/index.js +4 -0
- package/lib/cascader/index.js +4 -0
- package/lib/cell/index.js +4 -0
- package/lib/cell-group/index.js +4 -0
- package/lib/checkbox/Checkbox.js +5 -1
- package/lib/checkbox/index.js +4 -0
- package/lib/checkbox-group/index.js +4 -0
- package/lib/circle/index.js +4 -0
- package/lib/col/index.js +4 -0
- package/lib/collapse/index.js +4 -0
- package/lib/collapse-item/index.js +4 -0
- package/lib/config-provider/index.js +4 -0
- package/lib/contact-card/index.js +4 -0
- package/lib/contact-edit/index.js +4 -0
- package/lib/contact-list/index.js +4 -0
- package/lib/count-down/index.js +4 -0
- package/lib/coupon/index.js +4 -0
- package/lib/coupon-cell/index.js +4 -0
- package/lib/coupon-list/index.js +4 -0
- package/lib/date-picker/DatePicker.js +1 -1
- package/lib/date-picker/index.js +4 -0
- package/lib/dialog/function-call.js +4 -0
- package/lib/dialog/index.js +4 -0
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -0
- package/lib/dropdown-item/DropdownItem.js +1 -0
- package/lib/dropdown-item/index.js +4 -0
- package/lib/dropdown-menu/DropdownMenu.js +2 -2
- package/lib/dropdown-menu/index.js +4 -0
- package/lib/dropdown-menu/types.d.ts +1 -0
- package/lib/empty/index.js +4 -0
- package/lib/field/Field.js +2 -2
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/field/index.js +4 -0
- package/lib/field/types.d.ts +2 -2
- package/lib/form/index.js +4 -0
- package/lib/grid/index.js +4 -0
- package/lib/grid-item/GridItem.js +1 -1
- package/lib/grid-item/index.js +4 -0
- package/lib/icon/index.js +4 -0
- package/lib/image/index.js +4 -0
- package/lib/image-preview/ImagePreview.js +4 -0
- package/lib/image-preview/ImagePreviewItem.js +3 -2
- package/lib/image-preview/function-call.js +4 -0
- package/lib/image-preview/index.js +4 -0
- package/lib/index-anchor/index.js +4 -0
- package/lib/index-bar/index.js +4 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/lazyload/vue-lazyload/index.js +9 -0
- package/lib/lazyload/vue-lazyload/lazy-image.js +0 -1
- package/lib/lazyload/vue-lazyload/lazy.js +85 -0
- package/lib/lazyload/vue-lazyload/listener.js +45 -0
- package/lib/list/List.js +3 -2
- package/lib/list/index.js +4 -0
- package/lib/loading/index.js +4 -0
- package/lib/locale/index.js +4 -0
- package/lib/locale/lang/uk-UA.js +15 -15
- package/lib/nav-bar/index.js +4 -0
- package/lib/notice-bar/index.js +4 -0
- package/lib/notify/function-call.js +4 -0
- package/lib/notify/index.js +4 -0
- package/lib/number-keyboard/NumberKeyboard.js +5 -1
- package/lib/number-keyboard/index.js +4 -0
- package/lib/overlay/index.js +4 -0
- package/lib/pagination/index.js +4 -0
- package/lib/password-input/PasswordInput.js +1 -1
- package/lib/password-input/index.js +4 -0
- package/lib/picker/Picker.js +5 -0
- package/lib/picker/index.js +4 -0
- package/lib/picker-group/PickerGroup.js +4 -0
- package/lib/picker-group/index.js +4 -0
- package/lib/popover/index.js +4 -0
- package/lib/popup/index.js +4 -0
- package/lib/popup/shared.js +12 -0
- package/lib/progress/Progress.js +1 -1
- package/lib/progress/index.js +4 -0
- package/lib/pull-refresh/index.js +4 -0
- package/lib/radio/Radio.js +4 -0
- package/lib/radio/index.js +4 -0
- package/lib/radio-group/index.js +4 -0
- package/lib/rate/index.js +4 -0
- package/lib/row/index.js +4 -0
- package/lib/search/Search.js +4 -4
- package/lib/search/index.js +4 -0
- package/lib/share-sheet/index.js +4 -0
- package/lib/sidebar/index.js +4 -0
- package/lib/sidebar-item/index.js +4 -0
- package/lib/skeleton/Skeleton.js +4 -0
- package/lib/skeleton/index.js +4 -0
- package/lib/skeleton-avatar/index.js +4 -0
- package/lib/skeleton-image/index.js +4 -0
- package/lib/skeleton-paragraph/index.js +4 -0
- package/lib/skeleton-title/index.js +4 -0
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +4 -0
- package/lib/space/index.js +4 -0
- package/lib/step/index.js +4 -0
- package/lib/stepper/Stepper.js +2 -2
- package/lib/stepper/index.js +4 -0
- package/lib/steps/index.js +4 -0
- package/lib/sticky/Sticky.js +2 -0
- package/lib/sticky/index.js +4 -0
- package/lib/submit-bar/index.js +4 -0
- package/lib/swipe/Swipe.js +9 -4
- package/lib/swipe/index.js +4 -0
- package/lib/swipe-cell/index.js +4 -0
- package/lib/swipe-item/index.js +4 -0
- package/lib/switch/index.js +4 -0
- package/lib/tab/index.js +4 -0
- package/lib/tabbar/index.js +4 -0
- package/lib/tabbar-item/index.js +4 -0
- package/lib/tabs/Tabs.js +5 -1
- package/lib/tabs/index.js +4 -0
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/index.js +4 -0
- package/lib/text-ellipsis/TextEllipsis.d.ts +63 -0
- package/lib/text-ellipsis/TextEllipsis.js +127 -0
- package/lib/text-ellipsis/index.css +1 -0
- package/lib/text-ellipsis/index.d.ts +51 -0
- package/lib/text-ellipsis/index.js +39 -0
- package/lib/text-ellipsis/style/index.d.ts +1 -0
- package/lib/text-ellipsis/style/index.js +2 -0
- package/lib/text-ellipsis/types.d.ts +3 -0
- package/lib/text-ellipsis/types.js +15 -0
- package/lib/time-picker/index.js +4 -0
- package/lib/toast/function-call.js +4 -0
- package/lib/toast/index.js +4 -0
- package/lib/tree-select/TreeSelect.js +4 -3
- package/lib/tree-select/index.js +4 -0
- package/lib/uploader/Uploader.js +5 -1
- package/lib/uploader/index.js +4 -0
- package/lib/uploader/utils.js +2 -2
- package/lib/utils/create.js +4 -0
- package/lib/vant.cjs.js +1130 -872
- package/lib/vant.es.js +1130 -872
- package/lib/vant.js +1167 -879
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +5 -5
package/lib/tag/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
2
|
+
export declare const textEllipsisProps: {
|
3
|
+
rows: {
|
4
|
+
type: (NumberConstructor | StringConstructor)[];
|
5
|
+
default: number;
|
6
|
+
};
|
7
|
+
content: {
|
8
|
+
type: import("vue").PropType<string>;
|
9
|
+
default: string;
|
10
|
+
};
|
11
|
+
expandText: {
|
12
|
+
type: import("vue").PropType<string>;
|
13
|
+
default: string;
|
14
|
+
};
|
15
|
+
collapseText: {
|
16
|
+
type: import("vue").PropType<string>;
|
17
|
+
default: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
export type TextEllipsisProps = ExtractPropTypes<typeof textEllipsisProps>;
|
21
|
+
declare const _default: import("vue").DefineComponent<{
|
22
|
+
rows: {
|
23
|
+
type: (NumberConstructor | StringConstructor)[];
|
24
|
+
default: number;
|
25
|
+
};
|
26
|
+
content: {
|
27
|
+
type: import("vue").PropType<string>;
|
28
|
+
default: string;
|
29
|
+
};
|
30
|
+
expandText: {
|
31
|
+
type: import("vue").PropType<string>;
|
32
|
+
default: string;
|
33
|
+
};
|
34
|
+
collapseText: {
|
35
|
+
type: import("vue").PropType<string>;
|
36
|
+
default: string;
|
37
|
+
};
|
38
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
39
|
+
rows: {
|
40
|
+
type: (NumberConstructor | StringConstructor)[];
|
41
|
+
default: number;
|
42
|
+
};
|
43
|
+
content: {
|
44
|
+
type: import("vue").PropType<string>;
|
45
|
+
default: string;
|
46
|
+
};
|
47
|
+
expandText: {
|
48
|
+
type: import("vue").PropType<string>;
|
49
|
+
default: string;
|
50
|
+
};
|
51
|
+
collapseText: {
|
52
|
+
type: import("vue").PropType<string>;
|
53
|
+
default: string;
|
54
|
+
};
|
55
|
+
}>> & {
|
56
|
+
onClickAction?: ((...args: any[]) => any) | undefined;
|
57
|
+
}, {
|
58
|
+
content: string;
|
59
|
+
rows: string | number;
|
60
|
+
expandText: string;
|
61
|
+
collapseText: string;
|
62
|
+
}>;
|
63
|
+
export default _default;
|
@@ -0,0 +1,127 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name2 in all)
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var stdin_exports = {};
|
19
|
+
__export(stdin_exports, {
|
20
|
+
default: () => stdin_default,
|
21
|
+
textEllipsisProps: () => textEllipsisProps
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(stdin_exports);
|
24
|
+
var import_vue = require("vue");
|
25
|
+
var import_vue2 = require("vue");
|
26
|
+
var import_use = require("@vant/use");
|
27
|
+
var import_utils = require("../utils");
|
28
|
+
const [name, bem] = (0, import_utils.createNamespace)("text-ellipsis");
|
29
|
+
const textEllipsisProps = {
|
30
|
+
rows: (0, import_utils.makeNumericProp)(1),
|
31
|
+
content: (0, import_utils.makeStringProp)(""),
|
32
|
+
expandText: (0, import_utils.makeStringProp)(""),
|
33
|
+
collapseText: (0, import_utils.makeStringProp)("")
|
34
|
+
};
|
35
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
36
|
+
name,
|
37
|
+
props: textEllipsisProps,
|
38
|
+
emits: ["clickAction"],
|
39
|
+
setup(props, {
|
40
|
+
emit
|
41
|
+
}) {
|
42
|
+
const text = (0, import_vue2.ref)("");
|
43
|
+
const expanded = (0, import_vue2.ref)(false);
|
44
|
+
const hasAction = (0, import_vue2.ref)(false);
|
45
|
+
const root = (0, import_vue2.ref)();
|
46
|
+
const pxToNum = (value) => {
|
47
|
+
if (!value)
|
48
|
+
return 0;
|
49
|
+
const match = value.match(/^\d*(\.\d*)?/);
|
50
|
+
return match ? Number(match[0]) : 0;
|
51
|
+
};
|
52
|
+
const calcEllipsised = () => {
|
53
|
+
const cloneContainer = () => {
|
54
|
+
if (!root.value)
|
55
|
+
return;
|
56
|
+
const originStyle = window.getComputedStyle(root.value);
|
57
|
+
const container2 = document.createElement("div");
|
58
|
+
const styleNames = Array.prototype.slice.apply(originStyle);
|
59
|
+
styleNames.forEach((name2) => {
|
60
|
+
container2.style.setProperty(name2, originStyle.getPropertyValue(name2));
|
61
|
+
});
|
62
|
+
container2.style.position = "fixed";
|
63
|
+
container2.style.zIndex = "-9999";
|
64
|
+
container2.style.top = "-9999px";
|
65
|
+
container2.style.height = "auto";
|
66
|
+
container2.style.minHeight = "auto";
|
67
|
+
container2.style.maxHeight = "auto";
|
68
|
+
container2.innerText = props.content;
|
69
|
+
document.body.appendChild(container2);
|
70
|
+
return container2;
|
71
|
+
};
|
72
|
+
const calcEllipsisText = (container2, maxHeight2) => {
|
73
|
+
const {
|
74
|
+
content,
|
75
|
+
expandText
|
76
|
+
} = props;
|
77
|
+
const dot = "...";
|
78
|
+
let left = 0;
|
79
|
+
let right = content.length;
|
80
|
+
let res = -1;
|
81
|
+
while (left <= right) {
|
82
|
+
const mid = Math.floor((left + right) / 2);
|
83
|
+
container2.innerText = content.slice(0, mid) + dot + expandText;
|
84
|
+
if (container2.offsetHeight <= maxHeight2) {
|
85
|
+
left = mid + 1;
|
86
|
+
res = mid;
|
87
|
+
} else {
|
88
|
+
right = mid - 1;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
return content.slice(0, res) + dot;
|
92
|
+
};
|
93
|
+
const container = cloneContainer();
|
94
|
+
if (!container)
|
95
|
+
return;
|
96
|
+
const {
|
97
|
+
paddingBottom,
|
98
|
+
paddingTop,
|
99
|
+
lineHeight
|
100
|
+
} = container.style;
|
101
|
+
const maxHeight = (Number(props.rows) + 0.5) * pxToNum(lineHeight) + pxToNum(paddingTop) + pxToNum(paddingBottom);
|
102
|
+
if (maxHeight < container.offsetHeight) {
|
103
|
+
hasAction.value = true;
|
104
|
+
text.value = calcEllipsisText(container, maxHeight);
|
105
|
+
} else {
|
106
|
+
hasAction.value = false;
|
107
|
+
text.value = props.content;
|
108
|
+
}
|
109
|
+
document.body.removeChild(container);
|
110
|
+
};
|
111
|
+
const onClickAction = (event) => {
|
112
|
+
expanded.value = !expanded.value;
|
113
|
+
emit("clickAction", event);
|
114
|
+
};
|
115
|
+
const renderAction = () => (0, import_vue.createVNode)("span", {
|
116
|
+
"class": bem("action"),
|
117
|
+
"onClick": onClickAction
|
118
|
+
}, [expanded.value ? props.collapseText : props.expandText]);
|
119
|
+
(0, import_vue2.onMounted)(calcEllipsised);
|
120
|
+
(0, import_vue2.watch)(() => [props.content, props.rows], calcEllipsised);
|
121
|
+
(0, import_use.useEventListener)("resize", calcEllipsised);
|
122
|
+
return () => (0, import_vue.createVNode)("div", {
|
123
|
+
"ref": root,
|
124
|
+
"class": bem()
|
125
|
+
}, [expanded.value ? props.content : text.value, hasAction.value ? renderAction() : null]);
|
126
|
+
}
|
127
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
:root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;word-break:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
export declare const TextEllipsis: import("../utils").WithInstall<import("vue").DefineComponent<{
|
2
|
+
rows: {
|
3
|
+
type: (NumberConstructor | StringConstructor)[];
|
4
|
+
default: number;
|
5
|
+
};
|
6
|
+
content: {
|
7
|
+
type: import("vue").PropType<string>;
|
8
|
+
default: string;
|
9
|
+
};
|
10
|
+
expandText: {
|
11
|
+
type: import("vue").PropType<string>;
|
12
|
+
default: string;
|
13
|
+
};
|
14
|
+
collapseText: {
|
15
|
+
type: import("vue").PropType<string>;
|
16
|
+
default: string;
|
17
|
+
};
|
18
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickAction"[], "clickAction", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
19
|
+
rows: {
|
20
|
+
type: (NumberConstructor | StringConstructor)[];
|
21
|
+
default: number;
|
22
|
+
};
|
23
|
+
content: {
|
24
|
+
type: import("vue").PropType<string>;
|
25
|
+
default: string;
|
26
|
+
};
|
27
|
+
expandText: {
|
28
|
+
type: import("vue").PropType<string>;
|
29
|
+
default: string;
|
30
|
+
};
|
31
|
+
collapseText: {
|
32
|
+
type: import("vue").PropType<string>;
|
33
|
+
default: string;
|
34
|
+
};
|
35
|
+
}>> & {
|
36
|
+
onClickAction?: ((...args: any[]) => any) | undefined;
|
37
|
+
}, {
|
38
|
+
content: string;
|
39
|
+
rows: string | number;
|
40
|
+
expandText: string;
|
41
|
+
collapseText: string;
|
42
|
+
}>>;
|
43
|
+
export default TextEllipsis;
|
44
|
+
export { textEllipsisProps } from './TextEllipsis';
|
45
|
+
export type { TextEllipsisProps } from './TextEllipsis';
|
46
|
+
export type { TextEllipsisThemeVars } from './types';
|
47
|
+
declare module 'vue' {
|
48
|
+
interface GlobalComponents {
|
49
|
+
VanTextEllipsis: typeof TextEllipsis;
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
var stdin_exports = {};
|
29
|
+
__export(stdin_exports, {
|
30
|
+
TextEllipsis: () => TextEllipsis,
|
31
|
+
default: () => stdin_default,
|
32
|
+
textEllipsisProps: () => import_TextEllipsis2.textEllipsisProps
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(stdin_exports);
|
35
|
+
var import_utils = require("../utils");
|
36
|
+
var import_TextEllipsis = __toESM(require("./TextEllipsis"));
|
37
|
+
var import_TextEllipsis2 = require("./TextEllipsis");
|
38
|
+
const TextEllipsis = (0, import_utils.withInstall)(import_TextEllipsis.default);
|
39
|
+
var stdin_default = TextEllipsis;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
+
}
|
11
|
+
return to;
|
12
|
+
};
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
14
|
+
var stdin_exports = {};
|
15
|
+
module.exports = __toCommonJS(stdin_exports);
|
package/lib/time-picker/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/toast/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -59,7 +59,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
59
59
|
const index = activeId.indexOf(item.id);
|
60
60
|
if (index !== -1) {
|
61
61
|
activeId.splice(index, 1);
|
62
|
-
} else if (activeId.length < props.max) {
|
62
|
+
} else if (activeId.length < +props.max) {
|
63
63
|
activeId.push(item.id);
|
64
64
|
}
|
65
65
|
} else {
|
@@ -87,12 +87,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
87
87
|
const renderSidebar = () => {
|
88
88
|
const Items = props.items.map((item) => (0, import_vue.createVNode)(import_sidebar_item.SidebarItem, {
|
89
89
|
"dot": item.dot,
|
90
|
-
"title": item.text,
|
91
90
|
"badge": item.badge,
|
92
91
|
"class": [bem("nav-item"), item.className],
|
93
92
|
"disabled": item.disabled,
|
94
93
|
"onClick": onClickSidebarItem
|
95
|
-
},
|
94
|
+
}, {
|
95
|
+
title: () => slots["nav-text"] ? slots["nav-text"](item) : item.text
|
96
|
+
}));
|
96
97
|
return (0, import_vue.createVNode)(import_sidebar.Sidebar, {
|
97
98
|
"class": bem("nav"),
|
98
99
|
"modelValue": props.mainActiveIndex,
|
package/lib/tree-select/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/uploader/Uploader.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -218,7 +222,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
218
222
|
};
|
219
223
|
const onClickUpload = (event) => emit("clickUpload", event);
|
220
224
|
const renderUpload = () => {
|
221
|
-
if (props.modelValue.length >= props.maxCount) {
|
225
|
+
if (props.modelValue.length >= +props.maxCount) {
|
222
226
|
return;
|
223
227
|
}
|
224
228
|
const Input = props.readonly ? null : (0, import_vue.createVNode)("input", {
|
package/lib/uploader/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/uploader/utils.js
CHANGED
@@ -52,7 +52,7 @@ function isOversize(items, maxSize) {
|
|
52
52
|
if ((0, import_utils.isFunction)(maxSize)) {
|
53
53
|
return maxSize(item.file);
|
54
54
|
}
|
55
|
-
return item.file.size > maxSize;
|
55
|
+
return item.file.size > +maxSize;
|
56
56
|
}
|
57
57
|
return false;
|
58
58
|
});
|
@@ -69,7 +69,7 @@ function filterFiles(items, maxSize) {
|
|
69
69
|
});
|
70
70
|
return { valid, invalid };
|
71
71
|
}
|
72
|
-
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
|
72
|
+
const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
|
73
73
|
const isImageUrl = (url) => IMAGE_REGEXP.test(url);
|
74
74
|
function isImageFile(item) {
|
75
75
|
if (item.isImage) {
|
package/lib/utils/create.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|