vft 0.0.481 → 0.0.483

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.
Files changed (56) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
  3. package/es/components/autocomplete/index.d.ts +6 -6
  4. package/es/components/button/index.d.ts +9 -9
  5. package/es/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
  6. package/es/components/horizontal-menu/horizontal-menu.vue2.js +29 -29
  7. package/es/components/horizontal-menu/index.d.ts +20 -4
  8. package/es/components/menu/index.d.ts +28 -7
  9. package/es/components/menu/menu-item-group.vue.d.ts +2 -4
  10. package/es/components/menu/menu-item.vue.d.ts +1 -17
  11. package/es/components/menu/menu.vue.d.ts +3 -28
  12. package/es/components/menu/menu.vue2.js +81 -76
  13. package/es/components/menu/sub-menu.vue.d.ts +1 -19
  14. package/es/components/menu/types.d.ts +64 -0
  15. package/es/components/popconfirm/index.d.ts +15 -15
  16. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  17. package/es/components/select/index.d.ts +4 -4
  18. package/es/components/select/select.vue.d.ts +4 -4
  19. package/es/components/select/useSelect.d.ts +4 -4
  20. package/es/components/side-menu/index.d.ts +55 -4
  21. package/es/components/side-menu/side-menu.vue.d.ts +20 -3
  22. package/es/components/side-menu/side-menu.vue2.js +166 -139
  23. package/es/components/side-menu/types.d.ts +13 -2
  24. package/es/package.json.d.ts +1 -1
  25. package/es/package.json.js +1 -1
  26. package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
  27. package/lib/components/autocomplete/index.d.ts +6 -6
  28. package/lib/components/button/index.d.ts +9 -9
  29. package/lib/components/horizontal-menu/horizontal-menu.vue.d.ts +20 -4
  30. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  31. package/lib/components/horizontal-menu/index.d.ts +20 -4
  32. package/lib/components/menu/index.d.ts +28 -7
  33. package/lib/components/menu/menu-item-group.vue.d.ts +2 -4
  34. package/lib/components/menu/menu-item.vue.d.ts +1 -17
  35. package/lib/components/menu/menu.vue.d.ts +3 -28
  36. package/lib/components/menu/menu.vue2.cjs +1 -1
  37. package/lib/components/menu/sub-menu.vue.d.ts +1 -19
  38. package/lib/components/menu/types.d.ts +64 -0
  39. package/lib/components/popconfirm/index.d.ts +15 -15
  40. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  41. package/lib/components/select/index.d.ts +4 -4
  42. package/lib/components/select/select.vue.d.ts +4 -4
  43. package/lib/components/select/useSelect.d.ts +4 -4
  44. package/lib/components/side-menu/index.d.ts +55 -4
  45. package/lib/components/side-menu/side-menu.vue.d.ts +20 -3
  46. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  47. package/lib/components/side-menu/types.d.ts +13 -2
  48. package/lib/package.json.cjs +1 -1
  49. package/lib/package.json.d.ts +1 -1
  50. package/package.json +4 -4
  51. package/theme-style/index.css +1 -1
  52. package/theme-style/src/md-container.scss +1 -1
  53. package/theme-style/src/menu.scss +54 -0
  54. package/theme-style/vft-md-container.css +1 -1
  55. package/theme-style/vft-menu.css +1 -1
  56. package/web-types.json +1 -1
@@ -62,9 +62,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
62
62
  readonly placement?: import("@popperjs/core").Placement | undefined;
63
63
  readonly strategy?: "fixed" | "absolute" | undefined;
64
64
  readonly effect?: "light" | "dark" | undefined;
65
- readonly visible?: boolean | null | undefined;
66
65
  readonly teleported?: boolean | undefined;
67
66
  readonly open?: boolean | undefined;
67
+ readonly visible?: boolean | null | undefined;
68
68
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
69
69
  readonly arrowOffset?: number | undefined;
70
70
  readonly gpuAcceleration?: boolean | undefined;
@@ -480,9 +480,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
480
480
  readonly placement?: import("@popperjs/core").Placement | undefined;
481
481
  readonly strategy?: "fixed" | "absolute" | undefined;
482
482
  readonly effect?: "light" | "dark" | undefined;
483
- readonly visible?: boolean | null | undefined;
484
483
  readonly teleported?: boolean | undefined;
485
484
  readonly open?: boolean | undefined;
485
+ readonly visible?: boolean | null | undefined;
486
486
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
487
487
  readonly arrowOffset?: number | undefined;
488
488
  readonly gpuAcceleration?: boolean | undefined;
@@ -85,9 +85,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
85
85
  readonly placement?: import("@popperjs/core").Placement | undefined;
86
86
  readonly strategy?: "fixed" | "absolute" | undefined;
87
87
  readonly effect?: "light" | "dark" | undefined;
88
- readonly visible?: boolean | null | undefined;
89
88
  readonly teleported?: boolean | undefined;
90
89
  readonly open?: boolean | undefined;
90
+ readonly visible?: boolean | null | undefined;
91
91
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
92
92
  readonly arrowOffset?: number | undefined;
93
93
  readonly gpuAcceleration?: boolean | undefined;
@@ -503,9 +503,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
503
503
  readonly placement?: import("@popperjs/core").Placement | undefined;
504
504
  readonly strategy?: "fixed" | "absolute" | undefined;
505
505
  readonly effect?: "light" | "dark" | undefined;
506
- readonly visible?: boolean | null | undefined;
507
506
  readonly teleported?: boolean | undefined;
508
507
  readonly open?: boolean | undefined;
508
+ readonly visible?: boolean | null | undefined;
509
509
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
510
510
  readonly arrowOffset?: number | undefined;
511
511
  readonly gpuAcceleration?: boolean | undefined;
@@ -1006,9 +1006,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1006
1006
  readonly placement?: import("@popperjs/core").Placement | undefined;
1007
1007
  readonly strategy?: "fixed" | "absolute" | undefined;
1008
1008
  readonly effect?: "light" | "dark" | undefined;
1009
- readonly visible?: boolean | null | undefined;
1010
1009
  readonly teleported?: boolean | undefined;
1011
1010
  readonly open?: boolean | undefined;
1011
+ readonly visible?: boolean | null | undefined;
1012
1012
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1013
1013
  readonly arrowOffset?: number | undefined;
1014
1014
  readonly gpuAcceleration?: boolean | undefined;
@@ -1424,9 +1424,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1424
1424
  readonly placement?: import("@popperjs/core").Placement | undefined;
1425
1425
  readonly strategy?: "fixed" | "absolute" | undefined;
1426
1426
  readonly effect?: "light" | "dark" | undefined;
1427
- readonly visible?: boolean | null | undefined;
1428
1427
  readonly teleported?: boolean | undefined;
1429
1428
  readonly open?: boolean | undefined;
1429
+ readonly visible?: boolean | null | undefined;
1430
1430
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1431
1431
  readonly arrowOffset?: number | undefined;
1432
1432
  readonly gpuAcceleration?: boolean | undefined;
@@ -1916,9 +1916,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1916
1916
  readonly placement?: import("@popperjs/core").Placement | undefined;
1917
1917
  readonly strategy?: "fixed" | "absolute" | undefined;
1918
1918
  readonly effect?: "light" | "dark" | undefined;
1919
- readonly visible?: boolean | null | undefined;
1920
1919
  readonly teleported?: boolean | undefined;
1921
1920
  readonly open?: boolean | undefined;
1921
+ readonly visible?: boolean | null | undefined;
1922
1922
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1923
1923
  readonly arrowOffset?: number | undefined;
1924
1924
  readonly gpuAcceleration?: boolean | undefined;
@@ -2334,9 +2334,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
2334
2334
  readonly placement?: import("@popperjs/core").Placement | undefined;
2335
2335
  readonly strategy?: "fixed" | "absolute" | undefined;
2336
2336
  readonly effect?: "light" | "dark" | undefined;
2337
- readonly visible?: boolean | null | undefined;
2338
2337
  readonly teleported?: boolean | undefined;
2339
2338
  readonly open?: boolean | undefined;
2339
+ readonly visible?: boolean | null | undefined;
2340
2340
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
2341
2341
  readonly arrowOffset?: number | undefined;
2342
2342
  readonly gpuAcceleration?: boolean | undefined;
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
24
24
  autofocus: {
25
25
  type: import("vue").PropType<boolean>;
26
26
  };
27
- icon: {
28
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
29
- };
30
27
  dark: {
31
28
  type: import("vue").PropType<boolean>;
32
29
  };
30
+ icon: {
31
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
32
+ };
33
33
  loading: {
34
34
  type: import("vue").PropType<boolean>;
35
35
  };
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
114
114
  autofocus: {
115
115
  type: import("vue").PropType<boolean>;
116
116
  };
117
- icon: {
118
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
119
- };
120
117
  dark: {
121
118
  type: import("vue").PropType<boolean>;
122
119
  };
120
+ icon: {
121
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
122
+ };
123
123
  loading: {
124
124
  type: import("vue").PropType<boolean>;
125
125
  };
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
199
199
  autofocus: {
200
200
  type: import("vue").PropType<boolean>;
201
201
  };
202
- icon: {
203
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
204
- };
205
202
  dark: {
206
203
  type: import("vue").PropType<boolean>;
207
204
  };
205
+ icon: {
206
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
207
+ };
208
208
  loading: {
209
209
  type: import("vue").PropType<boolean>;
210
210
  };
@@ -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
- open: () => void;
25
- close: () => void;
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?: (() => any) | undefined;
37
- onOpen?: (() => any) | undefined;
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 I, computed as S, getCurrentInstance as Y, useSlots as q, ref as F, createVNode as c, mergeProps as w, createTextVNode as K, isVNode as Q } from "vue";
2
- import { useRouterHelper as X } from "@vft/router";
3
- import { isUrl as Z } from "@vft/utils";
4
- import { VftMenu as _, VftSubMenu as ee, VftMenuItem as te, VftMenuItemGroup as ne } from "../menu/index.js";
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 le } from "../../hooks/use-namespace/index.js";
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 oe } from "./constants.js";
14
- function ue(t) {
15
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !Q(t);
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 ae = I({
17
+ const ue = V({
18
18
  name: "vft-horizontal-menu"
19
- }), xe = /* @__PURE__ */ I({
20
- ...ae,
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: ["open", "close", "select", "sub-menu-click"],
57
+ emits: ["close", "open", "select", "sub-menu-click"],
58
58
  setup(t, {
59
- expose: N,
60
- emit: A
59
+ expose: A,
60
+ emit: L
61
61
  }) {
62
- const p = A, b = le("horizontal-menu"), L = S(() => (e, o, a) => ({
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(te, w(e, {
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(ne, {
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
- }, ue(e) ? e : {
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, V = M || i || o + r, x = e.type === oe.TILE;
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(ee, w(t.subMenuCfg, e, {
118
- index: String(V),
119
- key: V,
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: L.value(n, s, G || g)
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
- } = X(T), a = e.route;
152
+ } = Q(T), a = e.route;
153
153
  let i = e.route;
154
- e.indexPath.some((n) => Z(n)) && (i = e.indexPath.slice(-2).join("/"));
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 N({
166
+ return A({
167
167
  isInSubMenu: P
168
- }), () => c(_, w(t.menuOptions, {
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, K("·")]
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
- xe as default
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
- open: () => void;
48
- close: () => void;
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?: (() => any) | undefined;
103
- onOpen?: (() => any) | undefined;
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';
@@ -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("./sub-menu.vue").SubMenuProps>>;
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
- event?: Event;
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("./sub-menu.vue").SubMenuProps>>;
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
- event?: Event;
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
- interface Props {
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<Props>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
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 { IconProps } from 'vft/es/components/icon';
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 { SubMenuProps } from './sub-menu.vue';
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
- event?: Event;
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
- event?: Event;
35
+ e?: Event;
61
36
  }) => any) | undefined;
62
37
  "onUpdate:collapse"?: ((val: boolean) => any) | undefined;
63
38
  "onSub-menu-click"?: ((val: any) => any) | undefined;