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
|
@@ -62,9 +62,9 @@ export declare const VftDialog: import("vft/es/utils").SFCWithInstall<{
|
|
|
62
62
|
readonly customClass?: string | undefined;
|
|
63
63
|
onClose?: (() => any) | undefined;
|
|
64
64
|
readonly showClose?: boolean | undefined;
|
|
65
|
-
readonly closeOnPressEscape?: boolean | undefined;
|
|
66
65
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
67
66
|
onOpen?: (() => any) | undefined;
|
|
67
|
+
readonly closeOnPressEscape?: boolean | undefined;
|
|
68
68
|
readonly alignCenter?: boolean | undefined;
|
|
69
69
|
readonly closeIcon?: string | undefined;
|
|
70
70
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -60,9 +60,9 @@ export declare const VftDrawer: import("vft/es/utils").SFCWithInstall<{
|
|
|
60
60
|
readonly customClass?: string | undefined;
|
|
61
61
|
onClose?: (() => any) | undefined;
|
|
62
62
|
readonly showClose?: boolean | undefined;
|
|
63
|
-
readonly closeOnPressEscape?: boolean | undefined;
|
|
64
63
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
65
64
|
onOpen?: (() => any) | undefined;
|
|
65
|
+
readonly closeOnPressEscape?: boolean | undefined;
|
|
66
66
|
readonly alignCenter?: boolean | undefined;
|
|
67
67
|
readonly closeIcon?: string | undefined;
|
|
68
68
|
readonly fullscreen?: boolean | undefined;
|
|
@@ -62,10 +62,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
62
62
|
type: import("vue").PropType<TooltipTriggerType>;
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
|
-
teleported: {
|
|
66
|
-
type: import("vue").PropType<boolean>;
|
|
67
|
-
default: boolean;
|
|
68
|
-
};
|
|
69
65
|
loop: {
|
|
70
66
|
type: import("vue").PropType<boolean>;
|
|
71
67
|
default: boolean;
|
|
@@ -77,6 +73,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
77
73
|
type: import("vue").PropType<string>;
|
|
78
74
|
default: string;
|
|
79
75
|
};
|
|
76
|
+
teleported: {
|
|
77
|
+
type: import("vue").PropType<boolean>;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
80
80
|
splitButton: {
|
|
81
81
|
type: import("vue").PropType<boolean>;
|
|
82
82
|
};
|
|
@@ -141,10 +141,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
141
141
|
type: import("vue").PropType<TooltipTriggerType>;
|
|
142
142
|
default: string;
|
|
143
143
|
};
|
|
144
|
-
teleported: {
|
|
145
|
-
type: import("vue").PropType<boolean>;
|
|
146
|
-
default: boolean;
|
|
147
|
-
};
|
|
148
144
|
loop: {
|
|
149
145
|
type: import("vue").PropType<boolean>;
|
|
150
146
|
default: boolean;
|
|
@@ -156,6 +152,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
156
152
|
type: import("vue").PropType<string>;
|
|
157
153
|
default: string;
|
|
158
154
|
};
|
|
155
|
+
teleported: {
|
|
156
|
+
type: import("vue").PropType<boolean>;
|
|
157
|
+
default: boolean;
|
|
158
|
+
};
|
|
159
159
|
splitButton: {
|
|
160
160
|
type: import("vue").PropType<boolean>;
|
|
161
161
|
};
|
|
@@ -186,9 +186,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
186
186
|
role: string;
|
|
187
187
|
disabled: boolean;
|
|
188
188
|
trigger: TooltipTriggerType;
|
|
189
|
-
teleported: boolean;
|
|
190
189
|
loop: boolean;
|
|
191
190
|
popperClass: string;
|
|
191
|
+
teleported: boolean;
|
|
192
192
|
hideOnClick: boolean;
|
|
193
193
|
showTimeout: number;
|
|
194
194
|
hideTimeout: number;
|
|
@@ -10,9 +10,9 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
10
10
|
role?: string | undefined;
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
12
|
trigger?: import("..").TooltipTriggerType | undefined;
|
|
13
|
-
teleported?: boolean | undefined;
|
|
14
13
|
loop?: boolean | undefined;
|
|
15
14
|
popperClass?: string | undefined;
|
|
15
|
+
teleported?: boolean | undefined;
|
|
16
16
|
hideOnClick?: boolean | undefined;
|
|
17
17
|
showTimeout?: number | undefined;
|
|
18
18
|
hideTimeout?: number | undefined;
|
|
@@ -121,10 +121,6 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
121
121
|
type: import("vue").PropType<import("..").TooltipTriggerType>;
|
|
122
122
|
default: string;
|
|
123
123
|
};
|
|
124
|
-
teleported: {
|
|
125
|
-
type: import("vue").PropType<boolean>;
|
|
126
|
-
default: boolean;
|
|
127
|
-
};
|
|
128
124
|
loop: {
|
|
129
125
|
type: import("vue").PropType<boolean>;
|
|
130
126
|
default: boolean;
|
|
@@ -136,6 +132,10 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
136
132
|
type: import("vue").PropType<string>;
|
|
137
133
|
default: string;
|
|
138
134
|
};
|
|
135
|
+
teleported: {
|
|
136
|
+
type: import("vue").PropType<boolean>;
|
|
137
|
+
default: boolean;
|
|
138
|
+
};
|
|
139
139
|
splitButton: {
|
|
140
140
|
type: import("vue").PropType<boolean>;
|
|
141
141
|
};
|
|
@@ -174,9 +174,9 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
174
174
|
role: string;
|
|
175
175
|
disabled: boolean;
|
|
176
176
|
trigger: import("..").TooltipTriggerType;
|
|
177
|
-
teleported: boolean;
|
|
178
177
|
loop: boolean;
|
|
179
178
|
popperClass: string;
|
|
179
|
+
teleported: boolean;
|
|
180
180
|
hideOnClick: boolean;
|
|
181
181
|
showTimeout: number;
|
|
182
182
|
hideTimeout: number;
|
|
@@ -238,10 +238,6 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
238
238
|
type: import("vue").PropType<import("..").TooltipTriggerType>;
|
|
239
239
|
default: string;
|
|
240
240
|
};
|
|
241
|
-
teleported: {
|
|
242
|
-
type: import("vue").PropType<boolean>;
|
|
243
|
-
default: boolean;
|
|
244
|
-
};
|
|
245
241
|
loop: {
|
|
246
242
|
type: import("vue").PropType<boolean>;
|
|
247
243
|
default: boolean;
|
|
@@ -253,6 +249,10 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
253
249
|
type: import("vue").PropType<string>;
|
|
254
250
|
default: string;
|
|
255
251
|
};
|
|
252
|
+
teleported: {
|
|
253
|
+
type: import("vue").PropType<boolean>;
|
|
254
|
+
default: boolean;
|
|
255
|
+
};
|
|
256
256
|
splitButton: {
|
|
257
257
|
type: import("vue").PropType<boolean>;
|
|
258
258
|
};
|
|
@@ -321,10 +321,6 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
321
321
|
type: import("vue").PropType<import("..").TooltipTriggerType>;
|
|
322
322
|
default: string;
|
|
323
323
|
};
|
|
324
|
-
teleported: {
|
|
325
|
-
type: import("vue").PropType<boolean>;
|
|
326
|
-
default: boolean;
|
|
327
|
-
};
|
|
328
324
|
loop: {
|
|
329
325
|
type: import("vue").PropType<boolean>;
|
|
330
326
|
default: boolean;
|
|
@@ -336,6 +332,10 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
336
332
|
type: import("vue").PropType<string>;
|
|
337
333
|
default: string;
|
|
338
334
|
};
|
|
335
|
+
teleported: {
|
|
336
|
+
type: import("vue").PropType<boolean>;
|
|
337
|
+
default: boolean;
|
|
338
|
+
};
|
|
339
339
|
splitButton: {
|
|
340
340
|
type: import("vue").PropType<boolean>;
|
|
341
341
|
};
|
|
@@ -374,9 +374,9 @@ export declare const VftDropdown: import("vft/es/utils").SFCWithInstall<{
|
|
|
374
374
|
role: string;
|
|
375
375
|
disabled: boolean;
|
|
376
376
|
trigger: import("..").TooltipTriggerType;
|
|
377
|
-
teleported: boolean;
|
|
378
377
|
loop: boolean;
|
|
379
378
|
popperClass: string;
|
|
379
|
+
teleported: boolean;
|
|
380
380
|
hideOnClick: boolean;
|
|
381
381
|
showTimeout: number;
|
|
382
382
|
hideTimeout: number;
|
|
@@ -91,12 +91,13 @@ import { useNamespace as f } 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
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
const r = (
|
|
95
96
|
/* hoist-static*/
|
|
96
97
|
f("footer-layout")
|
|
97
98
|
), c = e({
|
|
98
99
|
name: "vft-footer-layout"
|
|
99
|
-
}),
|
|
100
|
+
}), oo = /* @__PURE__ */ e({
|
|
100
101
|
...c,
|
|
101
102
|
setup(u) {
|
|
102
103
|
return (i, d) => (s(), l(t(n), {
|
|
@@ -124,5 +125,5 @@ const r = (
|
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
export {
|
|
127
|
-
|
|
128
|
+
oo as default
|
|
128
129
|
};
|
|
@@ -91,6 +91,7 @@ import { useNamespace as k } 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
|
+
import "../infinite-scroll/index.js";
|
|
94
95
|
const y = { class: "content" }, $ = {
|
|
95
96
|
key: 0,
|
|
96
97
|
class: "left"
|
|
@@ -102,7 +103,7 @@ const y = { class: "content" }, $ = {
|
|
|
102
103
|
k("header-layout")
|
|
103
104
|
), N = f({
|
|
104
105
|
name: "vft-header-layout"
|
|
105
|
-
}),
|
|
106
|
+
}), ut = /* @__PURE__ */ f({
|
|
106
107
|
...N,
|
|
107
108
|
props: {
|
|
108
109
|
logoCfg: {}
|
|
@@ -148,5 +149,5 @@ const y = { class: "content" }, $ = {
|
|
|
148
149
|
}
|
|
149
150
|
});
|
|
150
151
|
export {
|
|
151
|
-
|
|
152
|
+
ut as default
|
|
152
153
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SubMenuProps } from 'vft/es/components/menu';
|
|
1
|
+
import { type SubMenuProps, type MenuProps } from 'vft/es/components/menu';
|
|
2
2
|
import { type MenuAttrMapping, type MenuType } from 'vft/es/components/side-menu';
|
|
3
3
|
import { MenuTypeEnum } from './constants';
|
|
4
4
|
export interface HorizontalMenuProps {
|
|
@@ -13,6 +13,7 @@ export interface HorizontalMenuProps {
|
|
|
13
13
|
maxRowLength?: false | number;
|
|
14
14
|
defaultActive?: string;
|
|
15
15
|
defaultOpeneds?: Array<string | number>;
|
|
16
|
+
menuOptions?: Partial<MenuProps>;
|
|
16
17
|
}
|
|
17
18
|
declare const _default: import("vue").DefineComponent<{
|
|
18
19
|
menus: {
|
|
@@ -49,6 +50,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
50
|
defaultOpeneds: {
|
|
50
51
|
type: import("vue").PropType<(string | number)[]>;
|
|
51
52
|
};
|
|
53
|
+
menuOptions: {
|
|
54
|
+
type: import("vue").PropType<Partial<MenuProps>>;
|
|
55
|
+
};
|
|
52
56
|
}, {
|
|
53
57
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
54
58
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -58,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
58
62
|
route: string;
|
|
59
63
|
indexPath: string[];
|
|
60
64
|
}) => void;
|
|
65
|
+
"sub-menu-click": (val: any) => void;
|
|
61
66
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
62
67
|
menus: {
|
|
63
68
|
type: import("vue").PropType<(Pick<import("vue-router").RouteLocationNormalized, "meta" | "path"> & {
|
|
@@ -93,6 +98,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
93
98
|
defaultOpeneds: {
|
|
94
99
|
type: import("vue").PropType<(string | number)[]>;
|
|
95
100
|
};
|
|
101
|
+
menuOptions: {
|
|
102
|
+
type: import("vue").PropType<Partial<MenuProps>>;
|
|
103
|
+
};
|
|
96
104
|
}>> & {
|
|
97
105
|
onSelect?: ((val: {
|
|
98
106
|
route: string;
|
|
@@ -100,5 +108,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
100
108
|
}) => any) | undefined;
|
|
101
109
|
onClose?: (() => any) | undefined;
|
|
102
110
|
onOpen?: (() => any) | undefined;
|
|
111
|
+
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
103
112
|
}, {}, {}>;
|
|
104
113
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as z, computed as
|
|
2
|
-
import { useRouterHelper as
|
|
3
|
-
import { isUrl as
|
|
4
|
-
import { VftMenu as
|
|
1
|
+
import { defineComponent as z, computed as T, getCurrentInstance as W, useSlots as X, ref as Y, createVNode as v, mergeProps as k } from "vue";
|
|
2
|
+
import { useRouterHelper as Z } from "@vft/router";
|
|
3
|
+
import { isUrl as m } from "@vft/utils";
|
|
4
|
+
import { VftMenu as _, VftSubMenu as ee, VftMenuItem as ne } from "../menu/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as oe } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { MenuTypeEnum as
|
|
11
|
+
import { MenuTypeEnum as ue } from "./constants.js";
|
|
12
12
|
const C = (
|
|
13
13
|
/* hoist-static*/
|
|
14
|
-
|
|
14
|
+
oe("horizontal-menu")
|
|
15
15
|
), te = z({
|
|
16
16
|
name: "vft-horizontal-menu"
|
|
17
17
|
}), ve = /* @__PURE__ */ z({
|
|
@@ -39,35 +39,36 @@ const C = (
|
|
|
39
39
|
default: 8
|
|
40
40
|
},
|
|
41
41
|
defaultActive: {},
|
|
42
|
-
defaultOpeneds: {}
|
|
42
|
+
defaultOpeneds: {},
|
|
43
|
+
menuOptions: {}
|
|
43
44
|
},
|
|
44
|
-
emits: ["open", "close", "select"],
|
|
45
|
-
setup(
|
|
45
|
+
emits: ["open", "close", "select", "sub-menu-click"],
|
|
46
|
+
setup(o, {
|
|
46
47
|
expose: B,
|
|
47
|
-
emit:
|
|
48
|
+
emit: x
|
|
48
49
|
}) {
|
|
49
|
-
const D =
|
|
50
|
+
const D = T(() => (e, l, a) => {
|
|
50
51
|
var c, r, n, f;
|
|
51
52
|
return {
|
|
52
|
-
"grid-template-rows": `repeat(${Math.min(((r = (c = e == null ? void 0 : e[
|
|
53
|
+
"grid-template-rows": `repeat(${Math.min(((r = (c = e == null ? void 0 : e[l]) == null ? void 0 : c[u.value.children]) == null ? void 0 : r.length) || 0, Number(a || o.maxRowLength ? a || o.maxRowLength : (f = (n = e == null ? void 0 : e[l]) == null ? void 0 : n[u.value.children]) == null ? void 0 : f.length))}, auto)`
|
|
53
54
|
};
|
|
54
|
-
}),
|
|
55
|
+
}), u = T(() => ({
|
|
55
56
|
path: "path",
|
|
56
57
|
children: "children",
|
|
57
58
|
title: "title",
|
|
58
59
|
index: "path",
|
|
59
60
|
icon: "icon",
|
|
60
61
|
disabled: "disabled",
|
|
61
|
-
...
|
|
62
|
-
})), P =
|
|
63
|
-
const c = e[
|
|
64
|
-
return
|
|
65
|
-
key:
|
|
66
|
-
index: String(
|
|
62
|
+
...o.attrMapping
|
|
63
|
+
})), P = W(), p = X(), S = Y(), R = P.appContext.config.globalProperties.$router, y = (e, l, a) => {
|
|
64
|
+
const c = e[u.value.path], r = e[u.value.title], n = e == null ? void 0 : e[u.value.index], f = e == null ? void 0 : e[u.value.icon], h = !!(e != null && e[u.value.disabled]), d = o.disabledJudgeTurnOver ? !h : h, i = n || c || l + r;
|
|
65
|
+
return v(ne, k(e, {
|
|
66
|
+
key: i,
|
|
67
|
+
index: String(i),
|
|
67
68
|
icon: f,
|
|
68
69
|
route: c,
|
|
69
70
|
title: r,
|
|
70
|
-
disabled:
|
|
71
|
+
disabled: o.openDisabled && d,
|
|
71
72
|
className: a ? "vft-menu-popup-item" : "vft-menu-no-popup-item"
|
|
72
73
|
}), {
|
|
73
74
|
default: a ? p.menuItem ? () => {
|
|
@@ -82,70 +83,72 @@ const C = (
|
|
|
82
83
|
});
|
|
83
84
|
} : null
|
|
84
85
|
});
|
|
85
|
-
}, E = () => {
|
|
86
|
-
|
|
87
|
-
}, $ = () => {
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
}, E = (e) => {
|
|
87
|
+
x("open", e);
|
|
88
|
+
}, $ = (e) => {
|
|
89
|
+
x("close", e);
|
|
90
|
+
}, j = (e) => {
|
|
91
|
+
x("sub-menu-click", e);
|
|
92
|
+
}, I = (e, l, a) => {
|
|
93
|
+
var N;
|
|
94
|
+
const c = e[u.value.path], r = e[u.value.title], n = e == null ? void 0 : e[u.value.children], f = e == null ? void 0 : e[u.value.index], h = e == null ? void 0 : e[u.value.icon], d = e == null ? void 0 : e.menuOrder, i = e == null ? void 0 : e.maxRowLength, g = !!(e != null && e[u.value.disabled]), q = o.disabledJudgeTurnOver ? !g : g, L = f || c || l + r, w = e.type === ue.TILE;
|
|
95
|
+
let O = [];
|
|
96
|
+
if (w)
|
|
94
97
|
if (d) {
|
|
95
|
-
const
|
|
96
|
-
if ((
|
|
97
|
-
const M = Math.max.apply(null,
|
|
98
|
+
const t = d.flat();
|
|
99
|
+
if ((t == null ? void 0 : t.length) < n.length) {
|
|
100
|
+
const M = Math.max.apply(null, t);
|
|
98
101
|
for (let s = M + 1; s < n.length; s++)
|
|
99
102
|
d.push([s]);
|
|
100
103
|
}
|
|
101
|
-
|
|
104
|
+
O = d;
|
|
102
105
|
} else
|
|
103
|
-
for (let
|
|
104
|
-
|
|
105
|
-
return n != null && n.length || e != null && e.render ?
|
|
106
|
-
index: String(
|
|
107
|
-
key:
|
|
106
|
+
for (let t = 0; t < n.length; t++)
|
|
107
|
+
O.push([t]);
|
|
108
|
+
return n != null && n.length || e != null && e.render ? v(ee, k(o.subMenuCfg, e, {
|
|
109
|
+
index: String(L),
|
|
110
|
+
key: L,
|
|
108
111
|
icon: h,
|
|
109
|
-
showArrow: e.showArrow ??
|
|
110
|
-
disabled:
|
|
112
|
+
showArrow: e.showArrow ?? o.subMenuCfg.showArrow,
|
|
113
|
+
disabled: o.openDisabled && q,
|
|
111
114
|
toolTipCfg: {
|
|
112
|
-
...
|
|
113
|
-
...((
|
|
115
|
+
...o.subMenuCfg.toolTipCfg || {},
|
|
116
|
+
...((N = e.subMenuCfg) == null ? void 0 : N.toolTipCfg) || {}
|
|
114
117
|
},
|
|
115
118
|
teleported: !1,
|
|
116
|
-
"popper-class": [
|
|
119
|
+
"popper-class": [w ? C.e("tile") : "", C.e("normal")]
|
|
117
120
|
}), {
|
|
118
|
-
default: () => [e != null && e.render ? e == null ? void 0 : e.render :
|
|
121
|
+
default: () => [e != null && e.render ? e == null ? void 0 : e.render : w ? O.map((t, M) => v("div", {
|
|
119
122
|
class: "content-main",
|
|
120
123
|
key: M
|
|
121
|
-
}, [
|
|
122
|
-
var
|
|
123
|
-
const
|
|
124
|
-
return n != null && n.length ?
|
|
124
|
+
}, [t.map((s, F) => {
|
|
125
|
+
var V, A, J;
|
|
126
|
+
const b = (V = n == null ? void 0 : n[s]) == null ? void 0 : V[u.value.children], G = (A = n == null ? void 0 : n[s]) == null ? void 0 : A.maxRowLength;
|
|
127
|
+
return n != null && n.length ? v("div", {
|
|
125
128
|
class: "content-col",
|
|
126
|
-
key:
|
|
127
|
-
}, [
|
|
128
|
-
class:
|
|
129
|
-
}, [(
|
|
129
|
+
key: F
|
|
130
|
+
}, [v("span", {
|
|
131
|
+
class: b != null && b.length ? "title" : ""
|
|
132
|
+
}, [(J = n == null ? void 0 : n[s]) == null ? void 0 : J[u.value.title]]), b != null && b.length ? v("div", {
|
|
130
133
|
class: "content",
|
|
131
|
-
style: D.value(n, s,
|
|
132
|
-
}, [
|
|
133
|
-
})])) : n.map((
|
|
134
|
+
style: D.value(n, s, G || i)
|
|
135
|
+
}, [b.map((K, Q) => y(K, Q, !0))]) : null]) : null;
|
|
136
|
+
})])) : n.map((t, M) => {
|
|
134
137
|
var s;
|
|
135
|
-
return (s =
|
|
138
|
+
return (s = t[u.value.children]) != null && s.length ? I(t, M, !0) : y(t, M, !0);
|
|
136
139
|
})],
|
|
137
140
|
title: () => r
|
|
138
|
-
}) :
|
|
141
|
+
}) : y(e, l, a);
|
|
139
142
|
};
|
|
140
|
-
async function
|
|
141
|
-
var
|
|
142
|
-
if (
|
|
143
|
+
async function H(e) {
|
|
144
|
+
var l, a, c;
|
|
145
|
+
if (o.useRouterJump) {
|
|
143
146
|
const {
|
|
144
147
|
go: r
|
|
145
|
-
} =
|
|
148
|
+
} = Z(R), n = e.route;
|
|
146
149
|
let f = e.route;
|
|
147
|
-
e.indexPath.some((d) =>
|
|
148
|
-
const h = (c = (a = (
|
|
150
|
+
e.indexPath.some((d) => m(d)) && (f = e.indexPath.slice(-2).join("/"));
|
|
151
|
+
const h = (c = (a = (l = R.getRoutes().filter((d) => d.path === f)) == null ? void 0 : l[0]) == null ? void 0 : a.meta) == null ? void 0 : c.linkTarget;
|
|
149
152
|
r(h ? {
|
|
150
153
|
url: n,
|
|
151
154
|
winOpenOpt: {
|
|
@@ -153,27 +156,28 @@ const C = (
|
|
|
153
156
|
}
|
|
154
157
|
} : n);
|
|
155
158
|
}
|
|
156
|
-
|
|
159
|
+
x("select", e);
|
|
157
160
|
}
|
|
158
|
-
const
|
|
161
|
+
const U = T(() => {
|
|
159
162
|
var e;
|
|
160
|
-
return (e =
|
|
163
|
+
return (e = S.value) == null ? void 0 : e.inSubMenu;
|
|
161
164
|
});
|
|
162
165
|
return B({
|
|
163
|
-
isInSubMenu:
|
|
164
|
-
}), () =>
|
|
165
|
-
ref:
|
|
166
|
-
onSelect:
|
|
166
|
+
isInSubMenu: U
|
|
167
|
+
}), () => v(_, k(o.menuOptions, {
|
|
168
|
+
ref: S,
|
|
169
|
+
onSelect: H,
|
|
167
170
|
onOpen: E,
|
|
168
171
|
onClose: $,
|
|
172
|
+
onSubMenuClick: j,
|
|
169
173
|
mode: "horizontal",
|
|
170
174
|
class: C.b(),
|
|
171
|
-
defaultActive:
|
|
172
|
-
defaultOpeneds:
|
|
173
|
-
}, {
|
|
175
|
+
defaultActive: o.defaultActive,
|
|
176
|
+
defaultOpeneds: o.defaultOpeneds
|
|
177
|
+
}), {
|
|
174
178
|
default: () => {
|
|
175
179
|
var e;
|
|
176
|
-
return [(e =
|
|
180
|
+
return [(e = o.menus) != null && e.length ? o.menus.map((l, a) => I(l, a, !1)) : null];
|
|
177
181
|
}
|
|
178
182
|
});
|
|
179
183
|
}
|
|
@@ -33,6 +33,9 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
33
33
|
defaultOpeneds: {
|
|
34
34
|
type: import("vue").PropType<(string | number)[]>;
|
|
35
35
|
};
|
|
36
|
+
menuOptions: {
|
|
37
|
+
type: import("vue").PropType<Partial<import("..").MenuProps>>;
|
|
38
|
+
};
|
|
36
39
|
}, {
|
|
37
40
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
38
41
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -42,6 +45,7 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
42
45
|
route: string;
|
|
43
46
|
indexPath: string[];
|
|
44
47
|
}) => void;
|
|
48
|
+
"sub-menu-click": (val: any) => void;
|
|
45
49
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
50
|
menus: {
|
|
47
51
|
type: import("vue").PropType<(Pick<import("vue-router").RouteLocationNormalized, "meta" | "path"> & {
|
|
@@ -77,6 +81,9 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
77
81
|
defaultOpeneds: {
|
|
78
82
|
type: import("vue").PropType<(string | number)[]>;
|
|
79
83
|
};
|
|
84
|
+
menuOptions: {
|
|
85
|
+
type: import("vue").PropType<Partial<import("..").MenuProps>>;
|
|
86
|
+
};
|
|
80
87
|
}>> & {
|
|
81
88
|
onSelect?: ((val: {
|
|
82
89
|
route: string;
|
|
@@ -84,6 +91,7 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
84
91
|
}) => any) | undefined;
|
|
85
92
|
onClose?: (() => any) | undefined;
|
|
86
93
|
onOpen?: (() => any) | undefined;
|
|
94
|
+
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
87
95
|
}, {}, {}>> & Record<string, any>;
|
|
88
96
|
export * from './constants';
|
|
89
97
|
export default VftHorizontalMenu;
|
|
@@ -54,8 +54,8 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
|
|
|
54
54
|
readonly src?: string | undefined;
|
|
55
55
|
readonly loading?: "eager" | "lazy" | undefined;
|
|
56
56
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
57
|
-
readonly initialIndex?: number | undefined;
|
|
58
57
|
readonly infinite?: boolean | undefined;
|
|
58
|
+
readonly initialIndex?: number | undefined;
|
|
59
59
|
readonly hideOnClickModal?: boolean | undefined;
|
|
60
60
|
readonly closeOnPressEscape?: boolean | undefined;
|
|
61
61
|
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
@@ -49,11 +49,11 @@ export declare const VftImageViewer: import("vft/es/utils").SFCWithInstall<{
|
|
|
49
49
|
[key: string]: any;
|
|
50
50
|
}>) => void)[] | undefined;
|
|
51
51
|
onClose?: (() => any) | undefined;
|
|
52
|
+
readonly infinite?: boolean | undefined;
|
|
53
|
+
readonly teleported?: boolean | undefined;
|
|
52
54
|
readonly urlList?: string[] | undefined;
|
|
53
55
|
readonly initialIndex?: number | undefined;
|
|
54
|
-
readonly infinite?: boolean | undefined;
|
|
55
56
|
readonly hideOnClickModal?: boolean | undefined;
|
|
56
|
-
readonly teleported?: boolean | undefined;
|
|
57
57
|
readonly closeOnPressEscape?: boolean | undefined;
|
|
58
58
|
readonly zoomRate?: number | undefined;
|
|
59
59
|
onSwitch?: ((index: number) => any) | undefined;
|
package/es/components/index.d.ts
CHANGED