vft 0.0.482 → 0.0.485
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/carousel/use-carousel.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +29 -29
- package/es/components/horizontal-menu/index.d.ts +20 -4
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/menu/index.d.ts +28 -7
- package/es/components/menu/menu-item-group.vue.d.ts +2 -4
- package/es/components/menu/menu-item.vue.d.ts +1 -17
- package/es/components/menu/menu.vue.d.ts +3 -28
- package/es/components/menu/menu.vue2.js +81 -76
- package/es/components/menu/sub-menu.vue.d.ts +1 -19
- package/es/components/menu/types.d.ts +64 -0
- package/es/components/side-menu/index.d.ts +55 -4
- package/es/components/side-menu/side-menu.vue.d.ts +20 -3
- package/es/components/side-menu/side-menu.vue2.js +166 -139
- package/es/components/side-menu/types.d.ts +13 -2
- package/es/components/super-form/super-form-action.vue2.js +55 -55
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/index.d.ts +20 -4
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/menu/index.d.ts +28 -7
- package/lib/components/menu/menu-item-group.vue.d.ts +2 -4
- package/lib/components/menu/menu-item.vue.d.ts +1 -17
- package/lib/components/menu/menu.vue.d.ts +3 -28
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue.d.ts +1 -19
- package/lib/components/menu/types.d.ts +64 -0
- package/lib/components/side-menu/index.d.ts +55 -4
- package/lib/components/side-menu/side-menu.vue.d.ts +20 -3
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +13 -2
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/menu.scss +54 -0
- package/theme-style/vft-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
|
|
|
11
11
|
import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
|
|
12
12
|
import "@popperjs/core";
|
|
13
13
|
import "../../hooks/use-z-index/index.js";
|
|
14
|
-
import {
|
|
14
|
+
import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
|
|
15
15
|
const L = 300, ze = (t, O, M) => {
|
|
16
16
|
const {
|
|
17
17
|
children: o,
|
|
@@ -21,8 +21,16 @@ export interface HorizontalMenuProps {
|
|
|
21
21
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<HorizontalMenuProps>>, {
|
|
22
22
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
23
23
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
close: (val: {
|
|
25
|
+
index: string;
|
|
26
|
+
indexPath: string[];
|
|
27
|
+
event?: Event;
|
|
28
|
+
}) => void;
|
|
29
|
+
open: (val: {
|
|
30
|
+
index: string;
|
|
31
|
+
indexPath: string[];
|
|
32
|
+
e?: Event;
|
|
33
|
+
}) => void;
|
|
26
34
|
select: (val: {
|
|
27
35
|
route: string;
|
|
28
36
|
indexPath: string[];
|
|
@@ -33,8 +41,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
33
41
|
route: string;
|
|
34
42
|
indexPath: string[];
|
|
35
43
|
}) => any) | undefined;
|
|
36
|
-
onClose?: ((
|
|
37
|
-
|
|
44
|
+
onClose?: ((val: {
|
|
45
|
+
index: string;
|
|
46
|
+
indexPath: string[];
|
|
47
|
+
event?: Event;
|
|
48
|
+
}) => any) | undefined;
|
|
49
|
+
onOpen?: ((val: {
|
|
50
|
+
index: string;
|
|
51
|
+
indexPath: string[];
|
|
52
|
+
e?: Event;
|
|
53
|
+
}) => any) | undefined;
|
|
38
54
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
39
55
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
56
|
export default _default;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRouterHelper as
|
|
3
|
-
import { isUrl as
|
|
4
|
-
import { VftMenu as
|
|
1
|
+
import { defineComponent as V, computed as S, getCurrentInstance as Y, useSlots as q, ref as F, createVNode as c, mergeProps as w, isVNode as K } from "vue";
|
|
2
|
+
import { useRouterHelper as Q } from "@vft/router";
|
|
3
|
+
import { isUrl as X } from "@vft/utils";
|
|
4
|
+
import { VftMenu as Z, VftSubMenu as _, VftMenuItem as ee, VftMenuItemGroup as te } from "../menu/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "../config-provider/hooks/use-global-config.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as ne } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
import { MenuTypeEnum as
|
|
14
|
-
function
|
|
15
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !
|
|
13
|
+
import { MenuTypeEnum as le } from "./constants.js";
|
|
14
|
+
function oe(t) {
|
|
15
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !K(t);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const ue = V({
|
|
18
18
|
name: "vft-horizontal-menu"
|
|
19
|
-
}),
|
|
20
|
-
...
|
|
19
|
+
}), Me = /* @__PURE__ */ V({
|
|
20
|
+
...ue,
|
|
21
21
|
props: {
|
|
22
22
|
menus: {},
|
|
23
23
|
attrMapping: {},
|
|
@@ -54,12 +54,12 @@ const ae = I({
|
|
|
54
54
|
default: "400px"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
emits: ["
|
|
57
|
+
emits: ["close", "open", "select", "sub-menu-click"],
|
|
58
58
|
setup(t, {
|
|
59
|
-
expose:
|
|
60
|
-
emit:
|
|
59
|
+
expose: A,
|
|
60
|
+
emit: L
|
|
61
61
|
}) {
|
|
62
|
-
const p =
|
|
62
|
+
const p = L, b = ne("horizontal-menu"), N = S(() => (e, o, a) => ({
|
|
63
63
|
"grid-template-rows": `repeat(${Math.min(e?.[o]?.[l.value.children]?.length || 0, Number(a || t.maxRowLength ? a || t.maxRowLength : e?.[o]?.[l.value.children]?.length))}, auto)`
|
|
64
64
|
})), l = S(() => ({
|
|
65
65
|
path: "path",
|
|
@@ -71,7 +71,7 @@ const ae = I({
|
|
|
71
71
|
...t.attrMapping
|
|
72
72
|
})), B = Y(), h = q(), O = F(), T = B.appContext.config.globalProperties.$router, v = (e, o, a) => {
|
|
73
73
|
const i = e[l.value.path], r = e[l.value.title], n = e?.[l.value.index], M = e?.[l.value.icon], m = !!e?.[l.value.disabled], d = t.disabledJudgeTurnOver ? !m : m, g = n || i || o + r;
|
|
74
|
-
return c(
|
|
74
|
+
return c(ee, w(e, {
|
|
75
75
|
key: g,
|
|
76
76
|
index: String(g),
|
|
77
77
|
icon: M,
|
|
@@ -92,15 +92,15 @@ const ae = I({
|
|
|
92
92
|
p("close", e);
|
|
93
93
|
}, z = (e) => {
|
|
94
94
|
p("sub-menu-click", e);
|
|
95
|
-
}, H = (e, o) => !t.enableScroll || !e ? e : o > t.scrollThreshold ? c(
|
|
95
|
+
}, H = (e, o) => !t.enableScroll || !e ? e : o > t.scrollThreshold ? c(te, {
|
|
96
96
|
style: {
|
|
97
97
|
maxHeight: t.scrollMaxHeight,
|
|
98
98
|
overflowY: "auto"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, oe(e) ? e : {
|
|
101
101
|
default: () => [e]
|
|
102
102
|
}) : e, k = (e, o, a) => {
|
|
103
|
-
const i = e[l.value.path], r = e[l.value.title], n = e?.[l.value.children], M = e?.[l.value.index], m = e?.[l.value.icon], d = e?.menuOrder, g = e?.maxRowLength, R = !!e?.[l.value.disabled], E = t.disabledJudgeTurnOver ? !R : R,
|
|
103
|
+
const i = e[l.value.path], r = e[l.value.title], n = e?.[l.value.children], M = e?.[l.value.index], m = e?.[l.value.icon], d = e?.menuOrder, g = e?.maxRowLength, R = !!e?.[l.value.disabled], E = t.disabledJudgeTurnOver ? !R : R, I = M || i || o + r, x = e.type === le.TILE;
|
|
104
104
|
let y = [];
|
|
105
105
|
if (x)
|
|
106
106
|
if (d) {
|
|
@@ -114,9 +114,9 @@ const ae = I({
|
|
|
114
114
|
} else
|
|
115
115
|
for (let u = 0; u < n.length; u++)
|
|
116
116
|
y.push([u]);
|
|
117
|
-
return n?.length || e?.render ? c(
|
|
118
|
-
index: String(
|
|
119
|
-
key:
|
|
117
|
+
return n?.length || e?.render ? c(_, w(t.subMenuCfg, e, {
|
|
118
|
+
index: String(I),
|
|
119
|
+
key: I,
|
|
120
120
|
icon: m,
|
|
121
121
|
showArrow: e.showArrow ?? t.subMenuCfg.showArrow,
|
|
122
122
|
disabled: t.openDisabled && E,
|
|
@@ -139,7 +139,7 @@ const ae = I({
|
|
|
139
139
|
class: C?.length ? "title" : ""
|
|
140
140
|
}, [n?.[s]?.[l.value.title]]), C?.length ? c("div", {
|
|
141
141
|
class: "content",
|
|
142
|
-
style:
|
|
142
|
+
style: N.value(n, s, G || g)
|
|
143
143
|
}, [C.map((U, W) => v(U, W, !0))]) : null]) : null;
|
|
144
144
|
})])) : n.map((u, f) => u[l.value.children]?.length ? k(u, f, !0) : v(u, f, !0)), n?.length || 0)],
|
|
145
145
|
title: () => r
|
|
@@ -149,9 +149,9 @@ const ae = I({
|
|
|
149
149
|
if (t.useRouterJump) {
|
|
150
150
|
const {
|
|
151
151
|
go: o
|
|
152
|
-
} =
|
|
152
|
+
} = Q(T), a = e.route;
|
|
153
153
|
let i = e.route;
|
|
154
|
-
e.indexPath.some((n) =>
|
|
154
|
+
e.indexPath.some((n) => X(n)) && (i = e.indexPath.slice(-2).join("/"));
|
|
155
155
|
const r = T.getRoutes().filter((n) => n.path === i)?.[0]?.meta?.linkTarget;
|
|
156
156
|
o(r ? {
|
|
157
157
|
url: a,
|
|
@@ -163,9 +163,9 @@ const ae = I({
|
|
|
163
163
|
p("select", e);
|
|
164
164
|
}
|
|
165
165
|
const P = S(() => O.value?.inSubMenu);
|
|
166
|
-
return
|
|
166
|
+
return A({
|
|
167
167
|
isInSubMenu: P
|
|
168
|
-
}), () => c(
|
|
168
|
+
}), () => c(Z, w(t.menuOptions, {
|
|
169
169
|
ref: O,
|
|
170
170
|
onSelect: D,
|
|
171
171
|
onOpen: J,
|
|
@@ -176,10 +176,10 @@ const ae = I({
|
|
|
176
176
|
defaultActive: t.defaultActive,
|
|
177
177
|
defaultOpeneds: t.defaultOpeneds
|
|
178
178
|
}), {
|
|
179
|
-
default: () => [t.menus?.length ? t.menus.map((e, o) => k(e, o, !1)) : null
|
|
179
|
+
default: () => [t.menus?.length ? t.menus.map((e, o) => k(e, o, !1)) : null]
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
export {
|
|
184
|
-
|
|
184
|
+
Me as default
|
|
185
185
|
};
|
|
@@ -44,8 +44,16 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
44
44
|
}>, {
|
|
45
45
|
isInSubMenu: import("vue").ComputedRef<any>;
|
|
46
46
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
close: (val: {
|
|
48
|
+
index: string;
|
|
49
|
+
indexPath: string[];
|
|
50
|
+
event?: Event;
|
|
51
|
+
}) => void;
|
|
52
|
+
open: (val: {
|
|
53
|
+
index: string;
|
|
54
|
+
indexPath: string[];
|
|
55
|
+
e?: Event;
|
|
56
|
+
}) => void;
|
|
49
57
|
select: (val: {
|
|
50
58
|
route: string;
|
|
51
59
|
indexPath: string[];
|
|
@@ -99,8 +107,16 @@ export declare const VftHorizontalMenu: import("vft/es/utils").SFCWithInstall<im
|
|
|
99
107
|
route: string;
|
|
100
108
|
indexPath: string[];
|
|
101
109
|
}) => any) | undefined;
|
|
102
|
-
onClose?: ((
|
|
103
|
-
|
|
110
|
+
onClose?: ((val: {
|
|
111
|
+
index: string;
|
|
112
|
+
indexPath: string[];
|
|
113
|
+
event?: Event;
|
|
114
|
+
}) => any) | undefined;
|
|
115
|
+
onOpen?: ((val: {
|
|
116
|
+
index: string;
|
|
117
|
+
indexPath: string[];
|
|
118
|
+
e?: Event;
|
|
119
|
+
}) => any) | undefined;
|
|
104
120
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
105
121
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
106
122
|
export * from './constants';
|
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as he } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
|
|
17
|
+
import { useFormItem as at, useFormItemInputId as nt } from "../form/hooks/use-form-item.js";
|
|
18
18
|
const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
n.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = at(), { inputId: Y } = nt(we.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = et(), x = tt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -27,7 +27,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
27
27
|
type: import("vue").PropType<boolean>;
|
|
28
28
|
};
|
|
29
29
|
horizontalMenuProps: {
|
|
30
|
-
type: import("vue").PropType<Partial<import("./
|
|
30
|
+
type: import("vue").PropType<Partial<import("./types").SubMenuProps>>;
|
|
31
31
|
};
|
|
32
32
|
persistent: {
|
|
33
33
|
type: import("vue").PropType<boolean>;
|
|
@@ -35,6 +35,18 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
35
35
|
disableSubMenuAction: {
|
|
36
36
|
type: import("vue").PropType<boolean>;
|
|
37
37
|
};
|
|
38
|
+
backgroundColor: {
|
|
39
|
+
type: import("vue").PropType<string>;
|
|
40
|
+
};
|
|
41
|
+
textColor: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
};
|
|
44
|
+
activeTextColor: {
|
|
45
|
+
type: import("vue").PropType<string>;
|
|
46
|
+
};
|
|
47
|
+
collapseType: {
|
|
48
|
+
type: import("vue").PropType<"menu-title">;
|
|
49
|
+
};
|
|
38
50
|
}>, {
|
|
39
51
|
open: (index: string) => void;
|
|
40
52
|
close: (index: string, indexPath: string[], e?: Event) => void;
|
|
@@ -55,7 +67,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
55
67
|
open: (val: {
|
|
56
68
|
index: string;
|
|
57
69
|
indexPath: string[];
|
|
58
|
-
|
|
70
|
+
e?: Event;
|
|
59
71
|
}) => void;
|
|
60
72
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
61
73
|
mode: {
|
|
@@ -86,7 +98,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
86
98
|
type: import("vue").PropType<boolean>;
|
|
87
99
|
};
|
|
88
100
|
horizontalMenuProps: {
|
|
89
|
-
type: import("vue").PropType<Partial<import("./
|
|
101
|
+
type: import("vue").PropType<Partial<import("./types").SubMenuProps>>;
|
|
90
102
|
};
|
|
91
103
|
persistent: {
|
|
92
104
|
type: import("vue").PropType<boolean>;
|
|
@@ -94,6 +106,18 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
94
106
|
disableSubMenuAction: {
|
|
95
107
|
type: import("vue").PropType<boolean>;
|
|
96
108
|
};
|
|
109
|
+
backgroundColor: {
|
|
110
|
+
type: import("vue").PropType<string>;
|
|
111
|
+
};
|
|
112
|
+
textColor: {
|
|
113
|
+
type: import("vue").PropType<string>;
|
|
114
|
+
};
|
|
115
|
+
activeTextColor: {
|
|
116
|
+
type: import("vue").PropType<string>;
|
|
117
|
+
};
|
|
118
|
+
collapseType: {
|
|
119
|
+
type: import("vue").PropType<"menu-title">;
|
|
120
|
+
};
|
|
97
121
|
}>> & Readonly<{
|
|
98
122
|
onSelect?: ((menuItem: import("./types").MenuItemClicked, routerResult?: Promise<void | import("vue-router").NavigationFailure> | undefined) => any) | undefined;
|
|
99
123
|
onClose?: ((val: {
|
|
@@ -104,7 +128,7 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
104
128
|
onOpen?: ((val: {
|
|
105
129
|
index: string;
|
|
106
130
|
indexPath: string[];
|
|
107
|
-
|
|
131
|
+
e?: Event;
|
|
108
132
|
}) => any) | undefined;
|
|
109
133
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
110
134
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|
|
@@ -368,9 +392,6 @@ export declare const VftMenu: import("vft/es/utils").SFCWithInstall<import("vue"
|
|
|
368
392
|
onMouseleave?: ((event: MouseEvent) => any) | undefined;
|
|
369
393
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
370
394
|
};
|
|
371
|
-
export { type MenuProps } from './menu.vue';
|
|
372
|
-
export { type MenuItemProps } from './menu-item.vue';
|
|
373
|
-
export { type SubMenuProps } from './sub-menu.vue';
|
|
374
395
|
export * from './types';
|
|
375
396
|
export declare const VftMenuItem: import("vft/es/utils").SFCWithInstall<{
|
|
376
397
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
title?: string;
|
|
3
|
-
}
|
|
1
|
+
import type { MenuItemGroupProps } from './types';
|
|
4
2
|
declare function __VLS_template(): {
|
|
5
3
|
title?(_: {}): any;
|
|
6
4
|
default?(_: {}): any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuItemGroupProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuItemGroupProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
7
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
10
8
|
export default _default;
|
|
11
9
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { RouteLocationRaw } from 'vue-router';
|
|
3
|
-
export interface MenuItemProps {
|
|
4
|
-
/** 唯一标志 */
|
|
5
|
-
index?: string;
|
|
6
|
-
/** Vue Router 路径对象 */
|
|
7
|
-
route?: RouteLocationRaw;
|
|
8
|
-
/** 是否禁用 */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
icon?: IconProps | string;
|
|
11
|
-
title?: string | number;
|
|
12
|
-
isAloneUse?: boolean;
|
|
13
|
-
divider?: boolean;
|
|
14
|
-
className?: string;
|
|
15
|
-
reverse?: boolean;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
1
|
+
import type { MenuItemProps } from './types';
|
|
18
2
|
declare function __VLS_template(): {
|
|
19
3
|
title?(_: {}): any;
|
|
20
4
|
default?(_: {}): any;
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import type { NavigationFailure } from 'vue-router';
|
|
2
|
-
import type {
|
|
3
|
-
import type { MenuItemClicked } from './types';
|
|
4
|
-
export interface MenuProps {
|
|
5
|
-
/** 菜单展示模式 */
|
|
6
|
-
mode?: 'horizontal' | 'vertical';
|
|
7
|
-
/** 页面加载时默认激活菜单的 index(menu-item 的index) */
|
|
8
|
-
defaultActive?: string;
|
|
9
|
-
/** 默认打开的 sub-menu 的 index 的数组 */
|
|
10
|
-
defaultOpeneds?: string[];
|
|
11
|
-
/** 是否只保持一个子菜单的展开 */
|
|
12
|
-
uniqueOpened?: boolean;
|
|
13
|
-
/** 是否启用 vue-router 模式。 启用该模式会在激活导航时以 index 作为 path 进行路由跳转 使用 default-active 来设置加载时的激活项 */
|
|
14
|
-
router?: boolean;
|
|
15
|
-
/** 子菜单打开的触发方式,只在 mode 为 horizontal 时有效 */
|
|
16
|
-
menuTrigger?: 'hover' | 'click';
|
|
17
|
-
/** 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) */
|
|
18
|
-
collapse?: boolean;
|
|
19
|
-
/** 是否开启折叠动画 */
|
|
20
|
-
collapseTransition?: boolean;
|
|
21
|
-
/** 是否省略多余的子项(仅在横向模式生效) */
|
|
22
|
-
ellipsis?: boolean;
|
|
23
|
-
horizontalMenuProps?: Partial<SubMenuProps>;
|
|
24
|
-
persistent?: boolean;
|
|
25
|
-
/** 禁用子菜单的展开收缩行为 */
|
|
26
|
-
disableSubMenuAction?: boolean;
|
|
27
|
-
}
|
|
2
|
+
import type { MenuItemClicked, MenuProps } from './types';
|
|
28
3
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuProps>>, {
|
|
29
4
|
open: (index: string) => void;
|
|
30
5
|
close: (index: string, indexPath: string[], e?: Event) => void;
|
|
@@ -45,7 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
45
20
|
open: (val: {
|
|
46
21
|
index: string;
|
|
47
22
|
indexPath: string[];
|
|
48
|
-
|
|
23
|
+
e?: Event;
|
|
49
24
|
}) => void;
|
|
50
25
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<MenuProps>>> & Readonly<{
|
|
51
26
|
onSelect?: ((menuItem: MenuItemClicked, routerResult?: Promise<void | NavigationFailure> | undefined) => any) | undefined;
|
|
@@ -57,7 +32,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
57
32
|
onOpen?: ((val: {
|
|
58
33
|
index: string;
|
|
59
34
|
indexPath: string[];
|
|
60
|
-
|
|
35
|
+
e?: Event;
|
|
61
36
|
}) => any) | undefined;
|
|
62
37
|
"onUpdate:collapse"?: ((val: boolean) => any) | undefined;
|
|
63
38
|
"onSub-menu-click"?: ((val: any) => any) | undefined;
|