vft 0.0.133 → 0.0.136
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/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +8 -8
- package/es/components/backtop/backtop.vue2.js +3 -2
- package/es/components/card/card.vue.d.ts +2 -2
- package/es/components/card/index.d.ts +4 -4
- package/es/components/carousel/carousel.vue.d.ts +12 -12
- package/es/components/carousel/index.d.ts +21 -21
- package/es/components/checkbox/checkbox.vue.d.ts +8 -8
- package/es/components/checkbox/index.d.ts +19 -19
- package/es/components/context-menu/context-menu.vue2.js +3 -2
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +2 -2
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/drawer/index.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +9 -9
- package/es/components/dropdown/index.d.ts +15 -15
- package/es/components/footer-layout/footer-layout.vue2.js +3 -2
- package/es/components/header-layout/header-layout.vue2.js +3 -2
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +10 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +79 -75
- package/es/components/horizontal-menu/index.d.ts +8 -0
- package/es/components/image/index.d.ts +1 -1
- package/es/components/image-viewer/index.d.ts +2 -2
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +164 -162
- package/es/components/infinite-scroll/index.d.ts +26 -0
- package/es/components/infinite-scroll/index.js +10 -0
- package/es/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/es/components/infinite-scroll/infinite-scroll.js +92 -0
- package/es/components/infinite-scroll/style/css.d.ts +0 -0
- package/es/components/infinite-scroll/style/css.js +2 -0
- package/es/components/infinite-scroll/style/index.d.ts +0 -0
- package/es/components/infinite-scroll/style/index.js +2 -0
- package/es/components/input/index.d.ts +6 -6
- package/es/components/input/input.vue.d.ts +1 -1
- package/es/components/md-container/md-container.vue2.js +3 -2
- package/es/components/menu/index.d.ts +2 -0
- package/es/components/menu/menu-item.vue2.js +21 -20
- package/es/components/menu/menu.vue.d.ts +2 -0
- package/es/components/menu/menu.vue2.js +58 -58
- package/es/components/menu/sub-menu.vue2.js +3 -2
- package/es/components/modal/modal-footer-action.vue2.js +3 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +3 -2
- package/es/components/popconfirm/index.d.ts +9 -9
- package/es/components/popconfirm/popconfirm.vue.d.ts +5 -5
- package/es/components/popover/index.d.ts +1 -1
- package/es/components/progress/index.d.ts +4 -4
- package/es/components/progress/progress.vue.d.ts +2 -2
- package/es/components/radio/index.d.ts +2 -2
- package/es/components/result/result.vue2.js +3 -2
- package/es/components/search/index.d.ts +4 -4
- package/es/components/search/search.vue.d.ts +1 -1
- package/es/components/select/defaults.d.ts +1 -1
- package/es/components/select/index.d.ts +14 -14
- package/es/components/select/select.vue.d.ts +7 -7
- package/es/components/select/useSelect.d.ts +1 -1
- package/es/components/side-menu/side-menu.vue2.js +3 -2
- package/es/components/slider/composables/use-slide.d.ts +2 -2
- package/es/components/super-form/component-map.js +11 -10
- package/es/components/super-form/super-form-action.vue2.js +3 -2
- package/es/components/super-form/super-form-item.vue2.js +35 -34
- package/es/components/super-form/super-form.vue2.js +14 -13
- package/es/components/table/field.js +19 -18
- package/es/components/table/index.d.ts +10 -10
- package/es/components/table/table.vue.d.ts +6 -6
- package/es/components/table/use/use-data-source.js +54 -52
- package/es/components/tabs/tab-nav.vue2.js +3 -2
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/time-select/time-select.vue.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +1 -1
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +9 -9
- package/es/components/upload/upload.vue.d.ts +9 -9
- package/es/index.js +279 -277
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +8 -8
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/card/card.vue.d.ts +2 -2
- package/lib/components/card/index.d.ts +4 -4
- package/lib/components/carousel/carousel.vue.d.ts +12 -12
- package/lib/components/carousel/index.d.ts +21 -21
- package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
- package/lib/components/checkbox/index.d.ts +19 -19
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +2 -2
- package/lib/components/dialog/index.d.ts +1 -1
- package/lib/components/drawer/index.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +9 -9
- package/lib/components/dropdown/index.d.ts +15 -15
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +10 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/index.d.ts +8 -0
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image-viewer/index.d.ts +2 -2
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/infinite-scroll/index.cjs +1 -0
- package/lib/components/infinite-scroll/index.d.ts +26 -0
- package/lib/components/infinite-scroll/infinite-scroll.cjs +1 -0
- package/lib/components/infinite-scroll/infinite-scroll.d.ts +20 -0
- package/lib/components/infinite-scroll/style/css.cjs +1 -0
- package/lib/components/infinite-scroll/style/css.d.ts +0 -0
- package/lib/components/infinite-scroll/style/index.cjs +1 -0
- package/lib/components/infinite-scroll/style/index.d.ts +0 -0
- package/lib/components/input/index.d.ts +6 -6
- package/lib/components/input/input.vue.d.ts +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +2 -0
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue.d.ts +2 -0
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +9 -9
- package/lib/components/popconfirm/popconfirm.vue.d.ts +5 -5
- package/lib/components/popover/index.d.ts +1 -1
- package/lib/components/progress/index.d.ts +4 -4
- package/lib/components/progress/progress.vue.d.ts +2 -2
- package/lib/components/radio/index.d.ts +2 -2
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/search/index.d.ts +4 -4
- package/lib/components/search/search.vue.d.ts +1 -1
- package/lib/components/select/defaults.d.ts +1 -1
- package/lib/components/select/index.d.ts +14 -14
- package/lib/components/select/select.vue.d.ts +7 -7
- package/lib/components/select/useSelect.d.ts +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/slider/composables/use-slide.d.ts +2 -2
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +10 -10
- package/lib/components/table/table.vue.d.ts +6 -6
- package/lib/components/table/use/use-data-source.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/time-select/time-select.vue.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +9 -9
- package/lib/components/upload/upload.vue.d.ts +9 -9
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +1 -1
- package/theme-style/src/image.scss +0 -4
- package/theme-style/src/table.scss +6 -0
- package/theme-style/vft-image.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -70,15 +70,13 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
70
70
|
readonly disabled?: boolean | undefined;
|
|
71
71
|
onEnter?: (() => any) | undefined;
|
|
72
72
|
readonly autocomplete?: string | undefined;
|
|
73
|
-
readonly validateEvent?: boolean | undefined;
|
|
74
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
75
|
-
readonly readonly?: boolean | undefined;
|
|
76
73
|
readonly autosize?: boolean | {
|
|
77
74
|
minRows?: number | undefined;
|
|
78
75
|
maxRows?: number | undefined;
|
|
79
76
|
} | undefined;
|
|
80
77
|
readonly formatter?: Function | undefined;
|
|
81
78
|
readonly parser?: Function | undefined;
|
|
79
|
+
readonly readonly?: boolean | undefined;
|
|
82
80
|
readonly clearable?: boolean | undefined;
|
|
83
81
|
readonly showPassword?: boolean | undefined;
|
|
84
82
|
readonly showWordLimit?: boolean | undefined;
|
|
@@ -86,8 +84,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
86
84
|
readonly prefixIcon?: string | import("..").IconProps | undefined;
|
|
87
85
|
readonly clearIcon?: string | import("..").IconProps | undefined;
|
|
88
86
|
readonly containerRole?: string | undefined;
|
|
87
|
+
readonly validateEvent?: boolean | undefined;
|
|
89
88
|
readonly inputStyle?: import("vue").StyleValue | undefined;
|
|
90
89
|
onClear?: (() => any) | undefined;
|
|
90
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
91
91
|
onSuffixClick?: ((value: any) => any) | undefined;
|
|
92
92
|
onPrefixClick?: ((value: any) => any) | undefined;
|
|
93
93
|
};
|
|
@@ -192,8 +192,8 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
192
192
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
193
193
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
194
194
|
onEnter?: (() => any) | undefined;
|
|
195
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
196
195
|
onClear?: (() => any) | undefined;
|
|
196
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
197
197
|
onSuffixClick?: ((value: any) => any) | undefined;
|
|
198
198
|
onPrefixClick?: ((value: any) => any) | undefined;
|
|
199
199
|
}, {
|
|
@@ -334,8 +334,8 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
334
334
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
335
335
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
336
336
|
onEnter?: (() => any) | undefined;
|
|
337
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
338
337
|
onClear?: (() => any) | undefined;
|
|
338
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
339
339
|
onSuffixClick?: ((value: any) => any) | undefined;
|
|
340
340
|
onPrefixClick?: ((value: any) => any) | undefined;
|
|
341
341
|
} & import("vue").ShallowUnwrapRef<{
|
|
@@ -444,8 +444,8 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
444
444
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
445
445
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
446
446
|
onEnter?: (() => any) | undefined;
|
|
447
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
448
447
|
onClear?: (() => any) | undefined;
|
|
448
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
449
449
|
onSuffixClick?: ((value: any) => any) | undefined;
|
|
450
450
|
onPrefixClick?: ((value: any) => any) | undefined;
|
|
451
451
|
}, {
|
|
@@ -233,8 +233,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
233
233
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
234
234
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
235
235
|
onEnter?: (() => any) | undefined;
|
|
236
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
237
236
|
onClear?: (() => any) | undefined;
|
|
237
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
238
238
|
onSuffixClick?: ((value: any) => any) | undefined;
|
|
239
239
|
onPrefixClick?: ((value: any) => any) | undefined;
|
|
240
240
|
}, {}, {}>, {
|
|
@@ -93,6 +93,7 @@ import { useNamespace as tt } from "../../hooks/use-namespace/index.js";
|
|
|
93
93
|
import "@popperjs/core";
|
|
94
94
|
import "../../hooks/use-z-index/index.js";
|
|
95
95
|
import "../message/index.js";
|
|
96
|
+
import "../infinite-scroll/index.js";
|
|
96
97
|
import ot from "./toc.js";
|
|
97
98
|
import { useCopyCode as et } from "./use/useCopyCode.js";
|
|
98
99
|
import { useActiveHeaderLinks as it } from "./use/useActiveHeaderLinks.js";
|
|
@@ -108,7 +109,7 @@ const mt = { class: "info-container" }, pt = {
|
|
|
108
109
|
tt("md-container")
|
|
109
110
|
), ct = D({
|
|
110
111
|
name: "vft-md-container"
|
|
111
|
-
}),
|
|
112
|
+
}), pe = /* @__PURE__ */ D({
|
|
112
113
|
...ct,
|
|
113
114
|
setup(lt, { expose: w }) {
|
|
114
115
|
const u = $(), { initPhotoSwipe: E } = J(`.${p.e("content")} img`);
|
|
@@ -207,5 +208,5 @@ const mt = { class: "info-container" }, pt = {
|
|
|
207
208
|
}
|
|
208
209
|
});
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
pe as default
|
|
211
212
|
};
|
|
@@ -34,6 +34,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
34
34
|
inSubMenu: import("vue").Ref<boolean>;
|
|
35
35
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
36
|
"update:collapse": (val: boolean) => void;
|
|
37
|
+
"sub-menu-click": (val: any) => void;
|
|
37
38
|
select: (menuItem: import("./types").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => void;
|
|
38
39
|
close: (val: {
|
|
39
40
|
index: string;
|
|
@@ -86,6 +87,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
86
87
|
event?: Event | undefined;
|
|
87
88
|
}) => any) | undefined;
|
|
88
89
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
90
|
+
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
89
91
|
}, {}, {}>> & {
|
|
90
92
|
MenuItem: {
|
|
91
93
|
new (...args: any[]): {
|
|
@@ -92,15 +92,16 @@ import { useNamespace as U } from "../../hooks/use-namespace/index.js";
|
|
|
92
92
|
import "@popperjs/core";
|
|
93
93
|
import "../../hooks/use-z-index/index.js";
|
|
94
94
|
import "../message/index.js";
|
|
95
|
+
import "../infinite-scroll/index.js";
|
|
95
96
|
import _ from "./use-menu.js";
|
|
96
|
-
const
|
|
97
|
+
const tt = ["title"], g = (
|
|
97
98
|
/* hoist-static*/
|
|
98
99
|
U("menu-item")
|
|
99
|
-
),
|
|
100
|
+
), et = Y({
|
|
100
101
|
name: "vft-menu-item",
|
|
101
102
|
inheritAttrs: !1
|
|
102
|
-
}),
|
|
103
|
-
...
|
|
103
|
+
}), He = /* @__PURE__ */ Y({
|
|
104
|
+
...et,
|
|
104
105
|
props: {
|
|
105
106
|
index: {},
|
|
106
107
|
route: {},
|
|
@@ -113,27 +114,27 @@ const ee = ["title"], g = (
|
|
|
113
114
|
reverse: { type: Boolean }
|
|
114
115
|
},
|
|
115
116
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
116
|
-
setup(
|
|
117
|
-
const B = G(), D = H(), F = U("menu"), f = U("menu-item"),
|
|
118
|
-
!
|
|
119
|
-
const { parentMenu: C, indexPath: N } = _(B, u(() =>
|
|
120
|
-
!m && !
|
|
121
|
-
const $ = u(() =>
|
|
122
|
-
index:
|
|
117
|
+
setup(e, { emit: c }) {
|
|
118
|
+
const B = G(), D = H(), F = U("menu"), f = U("menu-item"), t = e.isAloneUse ? null : P("rootMenu");
|
|
119
|
+
!t && !e.isAloneUse && z(g.b(), "can not inject root menu");
|
|
120
|
+
const { parentMenu: C, indexPath: N } = _(B, u(() => e.index)), m = e.isAloneUse ? null : P(`subMenu:${C.value.uid}`);
|
|
121
|
+
!m && !e.isAloneUse && z(g.b(), "can not inject sub menu");
|
|
122
|
+
const $ = u(() => e.index === (t == null ? void 0 : t.activeIndex)), n = J({
|
|
123
|
+
index: e.index,
|
|
123
124
|
indexPath: N,
|
|
124
125
|
active: $
|
|
125
126
|
}), O = () => {
|
|
126
|
-
|
|
127
|
+
e.disabled || (t == null || t.handleMenuItemClick({
|
|
127
128
|
...D,
|
|
128
|
-
index:
|
|
129
|
+
index: e.index,
|
|
129
130
|
indexPath: N.value,
|
|
130
|
-
route:
|
|
131
|
+
route: e.route
|
|
131
132
|
}), c("click", n));
|
|
132
|
-
}, l = u(() => R(
|
|
133
|
+
}, l = u(() => R(e.icon, "icon")), q = u(() => W(B, "title"));
|
|
133
134
|
return K(() => {
|
|
134
|
-
|
|
135
|
+
e.isAloneUse || (m == null || m.addSubMenu(n), t == null || t.addMenuItem(n));
|
|
135
136
|
}), L(() => {
|
|
136
|
-
|
|
137
|
+
e.isAloneUse || (m == null || m.removeSubMenu(n), t == null || t.removeMenuItem(n));
|
|
137
138
|
}), (i, s) => {
|
|
138
139
|
var I, V, h, j, M;
|
|
139
140
|
return r(), v(k, null, [
|
|
@@ -154,7 +155,7 @@ const ee = ["title"], g = (
|
|
|
154
155
|
tabindex: "-1",
|
|
155
156
|
onClick: O
|
|
156
157
|
}, [
|
|
157
|
-
((V = (I = o(C)) == null ? void 0 : I.type) == null ? void 0 : V.name) === "vft-menu" && ((h = o(
|
|
158
|
+
((V = (I = o(C)) == null ? void 0 : I.type) == null ? void 0 : V.name) === "vft-menu" && ((h = o(t)) != null && h.props.collapse) && i.$slots.title ? (r(), p(o(Z), {
|
|
158
159
|
key: 0,
|
|
159
160
|
placement: "right",
|
|
160
161
|
"fallback-placements": ["left"],
|
|
@@ -183,7 +184,7 @@ const ee = ["title"], g = (
|
|
|
183
184
|
title: i.title
|
|
184
185
|
}, [
|
|
185
186
|
Q(o(X), { content: q.value }, null, 8, ["content"])
|
|
186
|
-
], 10,
|
|
187
|
+
], 10, tt)
|
|
187
188
|
], 64))
|
|
188
189
|
], 64))
|
|
189
190
|
], 34),
|
|
@@ -196,5 +197,5 @@ const ee = ["title"], g = (
|
|
|
196
197
|
}
|
|
197
198
|
});
|
|
198
199
|
export {
|
|
199
|
-
|
|
200
|
+
He as default
|
|
200
201
|
};
|
|
@@ -56,6 +56,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
inSubMenu: import("vue").Ref<boolean>;
|
|
57
57
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
58
58
|
"update:collapse": (val: boolean) => void;
|
|
59
|
+
"sub-menu-click": (val: any) => void;
|
|
59
60
|
select: (menuItem: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => void;
|
|
60
61
|
close: (val: {
|
|
61
62
|
index: string;
|
|
@@ -108,5 +109,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
108
109
|
event?: Event | undefined;
|
|
109
110
|
}) => any) | undefined;
|
|
110
111
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
112
|
+
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
111
113
|
}, {}, {}>;
|
|
112
114
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isNullOrUndefined as
|
|
1
|
+
import { defineComponent as P, useSlots as X, getCurrentInstance as Y, ref as s, computed as Z, watch as T, watchEffect as _, provide as B, reactive as ee, onMounted as te, h as x, nextTick as ne } from "vue";
|
|
2
|
+
import { isNullOrUndefined as E, isMobile as le } from "@vft/utils";
|
|
3
3
|
import { VftIcon as oe } from "../icon/index.js";
|
|
4
4
|
import { useResizeObserver as ue } from "@vueuse/core";
|
|
5
5
|
import "../../utils/ns-cover.js";
|
|
@@ -8,16 +8,16 @@ import { flattedChildren as ae } from "../../utils/vue/vnode.js";
|
|
|
8
8
|
import { useNamespace as W } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import se from "./menu-collapse-transition.vue.js";
|
|
12
|
+
import ie from "./sub-menu.vue2.js";
|
|
13
13
|
import { useMenuCssVar as ce } from "./use-menu-css-var.js";
|
|
14
14
|
import re from "./utils/menu-bar.js";
|
|
15
15
|
const I = (
|
|
16
16
|
/* hoist-static*/
|
|
17
17
|
W("menu")
|
|
18
|
-
), de =
|
|
18
|
+
), de = P({
|
|
19
19
|
name: "vft-menu"
|
|
20
|
-
}),
|
|
20
|
+
}), ke = /* @__PURE__ */ P({
|
|
21
21
|
...de,
|
|
22
22
|
props: {
|
|
23
23
|
mode: { default: "vertical" },
|
|
@@ -30,34 +30,34 @@ const I = (
|
|
|
30
30
|
collapseTransition: { type: Boolean, default: !0 },
|
|
31
31
|
ellipsis: { type: Boolean, default: !0 }
|
|
32
32
|
},
|
|
33
|
-
emits: ["update:collapse", "select", "close", "open"],
|
|
34
|
-
setup(n, { expose: V, emit:
|
|
35
|
-
const y = X(),
|
|
33
|
+
emits: ["update:collapse", "sub-menu-click", "select", "close", "open"],
|
|
34
|
+
setup(n, { expose: V, emit: v }) {
|
|
35
|
+
const y = X(), h = Y(), O = h.appContext.config.globalProperties.$router, i = s(), k = W("sub-menu"), f = s(-1), u = s(
|
|
36
36
|
n.defaultOpeneds && !n.collapse ? n.defaultOpeneds.slice(0) : []
|
|
37
|
-
), a =
|
|
37
|
+
), a = s(n.defaultActive), r = s({}), p = s({}), $ = Z(() => n.mode === "horizontal" || n.mode === "vertical" && n.collapse), q = () => {
|
|
38
38
|
const e = a.value && r.value[a.value];
|
|
39
39
|
if (!e || n.mode === "horizontal" || n.collapse)
|
|
40
40
|
return;
|
|
41
41
|
e.indexPath.forEach((l) => {
|
|
42
|
-
const o =
|
|
42
|
+
const o = p.value[l];
|
|
43
43
|
o && b(l, o.indexPath);
|
|
44
44
|
});
|
|
45
45
|
}, b = (e, t, l) => {
|
|
46
|
-
u.value.includes(e) || (n.uniqueOpened && (u.value = u.value.filter((o) => t.includes(o))), u.value.push(e),
|
|
46
|
+
u.value.includes(e) || (n.uniqueOpened && (u.value = u.value.filter((o) => t.includes(o))), u.value.push(e), v("open", { index: e, indexPath: t, e: l }));
|
|
47
47
|
}, C = (e, t, l) => {
|
|
48
48
|
const o = u.value.indexOf(e);
|
|
49
|
-
o !== -1 && u.value.splice(o, 1),
|
|
49
|
+
o !== -1 && u.value.splice(o, 1), v("close", { index: e, indexPath: t, e: l });
|
|
50
50
|
}, D = ({ e, index: t, indexPath: l }) => {
|
|
51
|
-
u.value.includes(t) ? C(t, l, e) : b(t, l, e);
|
|
51
|
+
u.value.includes(t) ? C(t, l, e) : b(t, l, e), v("sub-menu-click", { e, index: t, indexPath: l });
|
|
52
52
|
}, L = (e) => {
|
|
53
53
|
(n.mode === "horizontal" || n.collapse) && (u.value = []);
|
|
54
54
|
const { index: t, indexPath: l } = e;
|
|
55
|
-
if (!(
|
|
55
|
+
if (!(E(t) || E(l))) {
|
|
56
56
|
if (n.router && O) {
|
|
57
57
|
const o = e.route || t, m = O.push(o).then((c) => (c || (a.value = t), c));
|
|
58
|
-
|
|
58
|
+
v("select", e, m);
|
|
59
59
|
} else
|
|
60
|
-
a.value = t,
|
|
60
|
+
a.value = t, v("select", e);
|
|
61
61
|
le() && setTimeout(() => {
|
|
62
62
|
u.value = [];
|
|
63
63
|
}, 100);
|
|
@@ -67,15 +67,15 @@ const I = (
|
|
|
67
67
|
l ? a.value = l.index : a.value = e;
|
|
68
68
|
}, U = () => {
|
|
69
69
|
var d;
|
|
70
|
-
if (!
|
|
70
|
+
if (!i.value)
|
|
71
71
|
return -1;
|
|
72
|
-
const e = Array.from(((d =
|
|
73
|
-
(
|
|
74
|
-
), t = 64, l = Number.parseInt(getComputedStyle(
|
|
75
|
-
let c = 0,
|
|
76
|
-
return e.forEach((
|
|
77
|
-
c +=
|
|
78
|
-
}),
|
|
72
|
+
const e = Array.from(((d = i.value) == null ? void 0 : d.childNodes) ?? []).filter(
|
|
73
|
+
(S) => S.nodeName !== "#text" || S.nodeValue
|
|
74
|
+
), t = 64, l = Number.parseInt(getComputedStyle(i.value).paddingLeft, 10), o = Number.parseInt(getComputedStyle(i.value).paddingRight, 10), m = i.value.clientWidth - l - o;
|
|
75
|
+
let c = 0, M = 0;
|
|
76
|
+
return e.forEach((S, Q) => {
|
|
77
|
+
c += S.offsetWidth || 0, c <= m - t && (M = Q + 1);
|
|
78
|
+
}), M === e.length ? -1 : M;
|
|
79
79
|
}, j = (e, t = 33.34) => {
|
|
80
80
|
let l;
|
|
81
81
|
return () => {
|
|
@@ -84,14 +84,14 @@ const I = (
|
|
|
84
84
|
}, t);
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
-
let
|
|
88
|
-
const
|
|
87
|
+
let z = !0;
|
|
88
|
+
const N = () => {
|
|
89
89
|
const e = () => {
|
|
90
90
|
f.value = -1, ne(() => {
|
|
91
91
|
f.value = U();
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
z ? e() : j(e)(), z = !1;
|
|
95
95
|
};
|
|
96
96
|
T(
|
|
97
97
|
() => n.defaultActive,
|
|
@@ -106,77 +106,77 @@ const I = (
|
|
|
106
106
|
), T(r.value, q);
|
|
107
107
|
let g;
|
|
108
108
|
_(() => {
|
|
109
|
-
n.mode === "horizontal" && n.ellipsis ? g = ue(
|
|
109
|
+
n.mode === "horizontal" && n.ellipsis ? g = ue(i, N).stop : g == null || g();
|
|
110
110
|
});
|
|
111
111
|
const R = (e) => {
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
delete
|
|
112
|
+
p.value[e.index] = e;
|
|
113
|
+
}, w = (e) => {
|
|
114
|
+
delete p.value[e.index];
|
|
115
115
|
}, G = (e) => {
|
|
116
116
|
r.value[e.index] = e;
|
|
117
117
|
}, H = (e) => {
|
|
118
118
|
delete r.value[e.index];
|
|
119
|
-
},
|
|
120
|
-
return
|
|
119
|
+
}, A = s(!1), J = s(), K = s();
|
|
120
|
+
return B(
|
|
121
121
|
"rootMenu",
|
|
122
122
|
ee({
|
|
123
|
-
props:
|
|
123
|
+
props: h.props,
|
|
124
124
|
openedMenus: u,
|
|
125
125
|
items: r,
|
|
126
|
-
subMenus:
|
|
126
|
+
subMenus: p,
|
|
127
127
|
activeIndex: a,
|
|
128
128
|
isMenuPopup: $,
|
|
129
|
-
inSubMenu:
|
|
129
|
+
inSubMenu: A,
|
|
130
130
|
inSubMenuMouseEnterTimer: J,
|
|
131
131
|
inSubMenuMouseleaveTimer: K,
|
|
132
132
|
addMenuItem: G,
|
|
133
133
|
removeMenuItem: H,
|
|
134
134
|
addSubMenu: R,
|
|
135
|
-
removeSubMenu:
|
|
135
|
+
removeSubMenu: w,
|
|
136
136
|
openMenu: b,
|
|
137
137
|
closeMenu: C,
|
|
138
138
|
handleMenuItemClick: L,
|
|
139
139
|
handleSubMenuClick: D
|
|
140
140
|
})
|
|
141
|
-
),
|
|
141
|
+
), B(`subMenu:${h.uid}`, {
|
|
142
142
|
addSubMenu: R,
|
|
143
|
-
removeSubMenu:
|
|
144
|
-
mouseInChild:
|
|
143
|
+
removeSubMenu: w,
|
|
144
|
+
mouseInChild: s(!1),
|
|
145
145
|
// 表示当前是第一级的 sub-menu
|
|
146
146
|
level: 0
|
|
147
147
|
}), te(() => {
|
|
148
|
-
n.mode === "horizontal" && new re(
|
|
148
|
+
n.mode === "horizontal" && new re(h.vnode.el, I.namespace.value);
|
|
149
149
|
}), V({
|
|
150
150
|
open: (e) => {
|
|
151
|
-
const { indexPath: t } =
|
|
151
|
+
const { indexPath: t } = p.value[e];
|
|
152
152
|
t.forEach((l) => b(l, t));
|
|
153
153
|
},
|
|
154
154
|
close: C,
|
|
155
|
-
handleResize:
|
|
156
|
-
menu:
|
|
157
|
-
inSubMenu:
|
|
155
|
+
handleResize: N,
|
|
156
|
+
menu: i,
|
|
157
|
+
inSubMenu: A
|
|
158
158
|
}), () => {
|
|
159
159
|
var m;
|
|
160
160
|
let e = ((m = y.default) == null ? void 0 : m.call(y)) ?? [];
|
|
161
161
|
const t = [];
|
|
162
|
-
if (n.mode === "horizontal" &&
|
|
163
|
-
const c = ae(e),
|
|
162
|
+
if (n.mode === "horizontal" && i.value) {
|
|
163
|
+
const c = ae(e), M = f.value === -1 ? c : c.slice(
|
|
164
164
|
0,
|
|
165
165
|
f.value
|
|
166
166
|
), d = f.value === -1 ? [] : c.slice(f.value);
|
|
167
|
-
d != null && d.length && n.ellipsis && (e =
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
d != null && d.length && n.ellipsis && (e = M, t.push(
|
|
168
|
+
x(
|
|
169
|
+
ie,
|
|
170
170
|
{
|
|
171
171
|
index: "sub-menu-more",
|
|
172
|
-
class:
|
|
172
|
+
class: k.e("hide-arrow")
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
title: () =>
|
|
175
|
+
title: () => x(
|
|
176
176
|
oe,
|
|
177
177
|
{
|
|
178
178
|
icon: "icon-menu-line",
|
|
179
|
-
class:
|
|
179
|
+
class: k.e("icon-more")
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
182
|
default: () => d
|
|
@@ -184,12 +184,12 @@ const I = (
|
|
|
184
184
|
)
|
|
185
185
|
));
|
|
186
186
|
}
|
|
187
|
-
const l = ce(
|
|
187
|
+
const l = ce(h.props, 0), o = x(
|
|
188
188
|
"ul",
|
|
189
189
|
{
|
|
190
190
|
key: String(n.collapse),
|
|
191
191
|
role: "menubar",
|
|
192
|
-
ref:
|
|
192
|
+
ref: i,
|
|
193
193
|
style: l.value,
|
|
194
194
|
class: {
|
|
195
195
|
[I.b()]: !0,
|
|
@@ -199,10 +199,10 @@ const I = (
|
|
|
199
199
|
},
|
|
200
200
|
[...e, ...t]
|
|
201
201
|
);
|
|
202
|
-
return n.collapseTransition && n.mode === "vertical" ?
|
|
202
|
+
return n.collapseTransition && n.mode === "vertical" ? x(se, () => o) : o;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
});
|
|
206
206
|
export {
|
|
207
|
-
|
|
207
|
+
ke as default
|
|
208
208
|
};
|
|
@@ -92,6 +92,7 @@ import { useNamespace as k } from "../../hooks/use-namespace/index.js";
|
|
|
92
92
|
import "@popperjs/core";
|
|
93
93
|
import "../../hooks/use-z-index/index.js";
|
|
94
94
|
import "../message/index.js";
|
|
95
|
+
import "../infinite-scroll/index.js";
|
|
95
96
|
import he from "./use-menu.js";
|
|
96
97
|
import { useMenuCssVar as Te } from "./use-menu-css-var.js";
|
|
97
98
|
const q = (
|
|
@@ -100,7 +101,7 @@ const q = (
|
|
|
100
101
|
), Ce = G({
|
|
101
102
|
name: "vft-sub-menu",
|
|
102
103
|
inheritAttrs: !1
|
|
103
|
-
}),
|
|
104
|
+
}), mt = /* @__PURE__ */ G({
|
|
104
105
|
...Ce,
|
|
105
106
|
props: {
|
|
106
107
|
index: {},
|
|
@@ -315,5 +316,5 @@ const q = (
|
|
|
315
316
|
}
|
|
316
317
|
});
|
|
317
318
|
export {
|
|
318
|
-
|
|
319
|
+
mt as default
|
|
319
320
|
};
|
|
@@ -91,7 +91,8 @@ import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
|
91
91
|
import "@popperjs/core";
|
|
92
92
|
import "../../hooks/use-z-index/index.js";
|
|
93
93
|
import "../message/index.js";
|
|
94
|
-
|
|
94
|
+
import "../infinite-scroll/index.js";
|
|
95
|
+
const ao = /* @__PURE__ */ O({
|
|
95
96
|
__name: "modal-footer-action",
|
|
96
97
|
props: {
|
|
97
98
|
showSubmitButton: { type: Boolean },
|
|
@@ -133,5 +134,5 @@ const so = /* @__PURE__ */ O({
|
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
136
|
export {
|
|
136
|
-
|
|
137
|
+
ao as default
|
|
137
138
|
};
|
|
@@ -94,6 +94,7 @@ import { useNamespace as Q } from "../../hooks/use-namespace/index.js";
|
|
|
94
94
|
import "@popperjs/core";
|
|
95
95
|
import "../../hooks/use-z-index/index.js";
|
|
96
96
|
import "../message/index.js";
|
|
97
|
+
import "../infinite-scroll/index.js";
|
|
97
98
|
import X from "hotkeys-js";
|
|
98
99
|
import { onBeforeRouteLeave as Y } from "vue-router";
|
|
99
100
|
import Z from "./tab-content.vue2.js";
|
|
@@ -103,7 +104,7 @@ const ot = (
|
|
|
103
104
|
Q("multiple-tabs")
|
|
104
105
|
), rt = P({
|
|
105
106
|
name: "vft-multiple-tabs"
|
|
106
|
-
}),
|
|
107
|
+
}), Ye = /* @__PURE__ */ P({
|
|
107
108
|
...rt,
|
|
108
109
|
props: {
|
|
109
110
|
tabsStyle: {},
|
|
@@ -224,5 +225,5 @@ const ot = (
|
|
|
224
225
|
}
|
|
225
226
|
});
|
|
226
227
|
export {
|
|
227
|
-
|
|
228
|
+
Ye as default
|
|
228
229
|
};
|
|
@@ -6,8 +6,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
6
6
|
width?: string | number | undefined;
|
|
7
7
|
hideAfter?: number | undefined;
|
|
8
8
|
icon?: string | import("..").IconProps | undefined;
|
|
9
|
-
teleported?: boolean | undefined;
|
|
10
9
|
persistent?: boolean | undefined;
|
|
10
|
+
teleported?: boolean | undefined;
|
|
11
11
|
confirmButtonType?: import("..").ButtonType | undefined;
|
|
12
12
|
iconColor?: string | undefined;
|
|
13
13
|
hideIcon?: boolean | undefined;
|
|
@@ -91,11 +91,11 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
91
91
|
type: import("vue").PropType<string | import("..").IconProps>;
|
|
92
92
|
default: string;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
persistent: {
|
|
95
95
|
type: import("vue").PropType<boolean>;
|
|
96
96
|
default: boolean;
|
|
97
97
|
};
|
|
98
|
-
|
|
98
|
+
teleported: {
|
|
99
99
|
type: import("vue").PropType<boolean>;
|
|
100
100
|
default: boolean;
|
|
101
101
|
};
|
|
@@ -130,8 +130,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
130
130
|
width: string | number;
|
|
131
131
|
hideAfter: number;
|
|
132
132
|
icon: string | import("..").IconProps;
|
|
133
|
-
teleported: boolean;
|
|
134
133
|
persistent: boolean;
|
|
134
|
+
teleported: boolean;
|
|
135
135
|
confirmButtonType: import("..").ButtonType;
|
|
136
136
|
iconColor: string;
|
|
137
137
|
hideIcon: boolean;
|
|
@@ -171,11 +171,11 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
171
171
|
type: import("vue").PropType<string | import("..").IconProps>;
|
|
172
172
|
default: string;
|
|
173
173
|
};
|
|
174
|
-
|
|
174
|
+
persistent: {
|
|
175
175
|
type: import("vue").PropType<boolean>;
|
|
176
176
|
default: boolean;
|
|
177
177
|
};
|
|
178
|
-
|
|
178
|
+
teleported: {
|
|
179
179
|
type: import("vue").PropType<boolean>;
|
|
180
180
|
default: boolean;
|
|
181
181
|
};
|
|
@@ -223,11 +223,11 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
223
223
|
type: import("vue").PropType<string | import("..").IconProps>;
|
|
224
224
|
default: string;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
persistent: {
|
|
227
227
|
type: import("vue").PropType<boolean>;
|
|
228
228
|
default: boolean;
|
|
229
229
|
};
|
|
230
|
-
|
|
230
|
+
teleported: {
|
|
231
231
|
type: import("vue").PropType<boolean>;
|
|
232
232
|
default: boolean;
|
|
233
233
|
};
|
|
@@ -262,8 +262,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
262
262
|
width: string | number;
|
|
263
263
|
hideAfter: number;
|
|
264
264
|
icon: string | import("..").IconProps;
|
|
265
|
-
teleported: boolean;
|
|
266
265
|
persistent: boolean;
|
|
266
|
+
teleported: boolean;
|
|
267
267
|
confirmButtonType: import("..").ButtonType;
|
|
268
268
|
iconColor: string;
|
|
269
269
|
hideIcon: boolean;
|
|
@@ -16,11 +16,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
16
16
|
type: import("vue").PropType<string | IconProps>;
|
|
17
17
|
default: string;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
persistent: {
|
|
20
20
|
type: import("vue").PropType<boolean>;
|
|
21
21
|
default: boolean;
|
|
22
22
|
};
|
|
23
|
-
|
|
23
|
+
teleported: {
|
|
24
24
|
type: import("vue").PropType<boolean>;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
@@ -64,11 +64,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
64
64
|
type: import("vue").PropType<string | IconProps>;
|
|
65
65
|
default: string;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
persistent: {
|
|
68
68
|
type: import("vue").PropType<boolean>;
|
|
69
69
|
default: boolean;
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
teleported: {
|
|
72
72
|
type: import("vue").PropType<boolean>;
|
|
73
73
|
default: boolean;
|
|
74
74
|
};
|
|
@@ -100,8 +100,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
100
100
|
width: string | number;
|
|
101
101
|
hideAfter: number;
|
|
102
102
|
icon: string | IconProps;
|
|
103
|
-
teleported: boolean;
|
|
104
103
|
persistent: boolean;
|
|
104
|
+
teleported: boolean;
|
|
105
105
|
confirmButtonType: ButtonType;
|
|
106
106
|
iconColor: string;
|
|
107
107
|
hideIcon: boolean;
|
|
@@ -60,12 +60,12 @@ export declare const VftPopover: import("vft/es/utils").SFCWithInstall<{
|
|
|
60
60
|
readonly disabled?: boolean | undefined;
|
|
61
61
|
readonly trigger?: import("..").TooltipTriggerType | undefined;
|
|
62
62
|
readonly visible?: boolean | undefined;
|
|
63
|
-
readonly teleported?: boolean | undefined;
|
|
64
63
|
readonly popperOptions?: Partial<import("@popperjs/core").Options> | undefined;
|
|
65
64
|
readonly enterable?: boolean | undefined;
|
|
66
65
|
readonly popperClass?: ClassType | undefined;
|
|
67
66
|
readonly popperStyle?: import("vue").StyleValue | undefined;
|
|
68
67
|
readonly persistent?: boolean | undefined;
|
|
68
|
+
readonly teleported?: boolean | undefined;
|
|
69
69
|
readonly showArrow?: boolean | undefined;
|
|
70
70
|
readonly autoClose?: number | undefined;
|
|
71
71
|
"onBefore-leave"?: ((...args: any[]) => any) | undefined;
|