savor-ui 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/es/components/src/cascader/cascader-column.d.ts +2 -0
  3. package/dist/es/components/src/cascader/cascader-column.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -3
  4. package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -1
  5. package/dist/es/components/src/cascader/index.d.ts +1 -0
  6. package/dist/es/components/src/cascader/types.d.ts +4 -0
  7. package/dist/es/components/src/input/input.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -3
  8. package/dist/es/components/src/menu/index.d.ts +0 -1
  9. package/dist/es/components/src/menu/menu-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -11
  10. package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  11. package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +112 -91
  12. package/dist/es/components/src/menu/types.d.ts +4 -2
  13. package/dist/es/components/src/popover/popover.vue_vue_type_script_setup_true_vapor_true_lang.mjs +148 -144
  14. package/dist/es/components/src/scrollbar/scrollbar.vue_vue_type_script_setup_true_vapor_true_lang.mjs +99 -97
  15. package/dist/es/components/src/segmented/segmented.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  16. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +94 -76
  17. package/dist/es/core/global.d.ts +6 -6
  18. package/dist/es/hooks/src/use-theme.d.ts +0 -2
  19. package/dist/es/theme/common/reset.scss +1 -1
  20. package/dist/es/theme/components/chat-list.scss +0 -43
  21. package/dist/es/theme/components/checkbox.scss +7 -6
  22. package/dist/es/theme/components/input-number.scss +9 -4
  23. package/dist/es/theme/components/input.scss +16 -7
  24. package/dist/es/theme/components/menu.scss +13 -41
  25. package/dist/es/theme/components/popover.scss +240 -240
  26. package/dist/es/theme/components/table.scss +358 -372
  27. package/dist/es/utils/src/theme/themeMap.mjs +5 -7
  28. package/dist/json/vetur-attributes.json +4 -3
  29. package/dist/json/vetur-tags.json +1 -1
  30. package/dist/json/web-types.json +9 -9
  31. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.6.1](https://gitee.com/mach552/savor-ui/compare/v0.6.0...v0.6.1) (2026-06-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 修复打包路径问题 ([67d1faf](https://gitee.com/mach552/savor-ui/commits/67d1fafb089f939ca89068b29d8e562f9f795e0c))
11
+
12
+ # [0.6.0](https://gitee.com/mach552/savor-ui/compare/v0.5.0...v0.6.0) (2026-06-26)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **checkbox:** 修复文字不垂直居中问题 ([8a365ac](https://gitee.com/mach552/savor-ui/commits/8a365ac0360951954e1ac1ffb3835080850747e6))
18
+ * **input-number:** 修复一些样式表现问题 ([4e39701](https://gitee.com/mach552/savor-ui/commits/4e39701d60b371ae62c1306a4c0ada5e323be003))
19
+ * **input:** 修复禁用状态下依然显示清除按钮的问题 ([a5239c9](https://gitee.com/mach552/savor-ui/commits/a5239c957dad1f3dcf42384f462e96ac00c5048f))
20
+ * **menu:** 修复弹层鼠标移开后不关闭问题 ([0be99e1](https://gitee.com/mach552/savor-ui/commits/0be99e1e525388518b0e9776ca74c960e8319219))
21
+ * **scrollbar:** 修复滚动条偶发无效显示的问题 ([be0dd8e](https://gitee.com/mach552/savor-ui/commits/be0dd8e656e9958651a5519e2a80f0ecf4e5a762))
22
+ * **segmented:** 修复默认值激活条在某些情况下尺寸不一致的问题 ([7d4c3b2](https://gitee.com/mach552/savor-ui/commits/7d4c3b210ce2b5d6074c29419a032d450c4bc864))
23
+ * **table:** 修复最后一行无下边框问题 ([11847f3](https://gitee.com/mach552/savor-ui/commits/11847f387c74f86d07783f51438a7a1583251e0c))
24
+ * **table:** 修复fixed列样式偶发失效问题 ([6c8518b](https://gitee.com/mach552/savor-ui/commits/6c8518b11cd25acd2a14eab101321f15d3ed92be))
25
+
26
+
27
+ ### Features
28
+
29
+ * **cascader:** 新增非叶子节点可选择和值可为叶子节点 ([7f7e833](https://gitee.com/mach552/savor-ui/commits/7f7e83303d3cf283393c526708979d25c08c327f))
30
+
5
31
  # [0.5.0](https://gitee.com/mach552/savor-ui/compare/v0.4.1...v0.5.0) (2026-06-19)
6
32
 
7
33
 
@@ -10,6 +10,8 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
10
10
  key?: string;
11
11
  children?: string;
12
12
  };
13
+ /** 是否允许选中非叶子节点 */
14
+ checkStrictly?: boolean;
13
15
  } & {
14
16
  modelValue?: string | number | Array<string | number>;
15
17
  expandedKeys?: Array<string | number>;
@@ -16,7 +16,11 @@ var A = S("<div>"), j = S("<div><div> </div>"), M = /*@__PURE__*/ l({
16
16
  label: "label",
17
17
  key: "key",
18
18
  children: "children"
19
- }) }
19
+ }) },
20
+ checkStrictly: {
21
+ type: Boolean,
22
+ default: !1
23
+ }
20
24
  }, {
21
25
  modelValue: { default: void 0 },
22
26
  modelModifiers: {},
@@ -38,7 +42,10 @@ var A = S("<div>"), j = S("<div><div> </div>"), M = /*@__PURE__*/ l({
38
42
  children: "children",
39
43
  ...M.fieldNames
40
44
  })), I = D("scrollbarRef"), L = E(l, "modelValue"), R = E(l, "expandedKeys"), z = E(l, "expanded"), B = m([]), V = m([]), H = m(!0), U = (e) => {
41
- W(e), e.isFolder ? (V.value = [], V.value = e.children || [], H.value = !0) : (L.value = e[F.value.key], V.value = [], N("clickItem", {
45
+ W(e), e.isFolder ? (V.value = [], V.value = e.children || [], H.value = !0, M.checkStrictly && (L.value = e[F.value.key], N("clickItem", {
46
+ item: e,
47
+ expandeds: z.value
48
+ }))) : (L.value = e[F.value.key], V.value = [], N("clickItem", {
42
49
  item: e,
43
50
  expandeds: z.value
44
51
  }));
@@ -89,7 +96,8 @@ var A = S("<div>"), j = S("<div><div> </div>"), M = /*@__PURE__*/ l({
89
96
  "onUpdate:expandedKeys": () => (e) => R.value = e,
90
97
  id: () => l.id + 1,
91
98
  fieldNames: () => l.fieldNames,
92
- expandTrigger: () => l.expandTrigger
99
+ expandTrigger: () => l.expandTrigger,
100
+ checkStrictly: () => l.checkStrictly
93
101
  });
94
102
  })];
95
103
  }
@@ -33,6 +33,7 @@ var M = /*@__PURE__*/ p({
33
33
  disabled: { type: Boolean },
34
34
  clearable: { type: Boolean },
35
35
  checkStrictly: { type: Boolean },
36
+ leafMode: { type: Boolean },
36
37
  multiple: { type: Boolean }
37
38
  }, {
38
39
  modelValue: { default: void 0 },
@@ -61,7 +62,7 @@ var M = /*@__PURE__*/ p({
61
62
  children: "children",
62
63
  ...h.fieldNames
63
64
  })), V = v(""), H = ({ item: e, expandeds: t }) => {
64
- V.value = t.map((e) => e[B.value.label]).join(h.pathSeparator), K(!1), h.pathTextMode ? N.value = t.map((e) => e[B.value.key]).join(h.pathSeparator) : h.pathMode ? N.value = t.map((e) => e[B.value.key]) : N.value = e[B.value.key], M("selectItem", {
65
+ V.value = t.map((e) => e[B.value.label]).join(h.pathSeparator), K(!1), h.leafMode ? N.value = t[t.length - 1][B.value.key] : h.pathTextMode ? N.value = t.map((e) => e[B.value.key]).join(h.pathSeparator) : h.pathMode ? N.value = t.map((e) => e[B.value.key]) : N.value = e[B.value.key], M("selectItem", {
65
66
  item: e,
66
67
  expandeds: t
67
68
  });
@@ -131,6 +132,7 @@ var M = /*@__PURE__*/ p({
131
132
  expandTrigger: () => p.expandTrigger,
132
133
  fieldNames: () => p.fieldNames,
133
134
  options: () => p.options,
135
+ checkStrictly: () => p.checkStrictly,
134
136
  onClickItem: () => H,
135
137
  onExpand: () => U,
136
138
  modelValue: () => N.value,
@@ -28,6 +28,7 @@ export declare const SCascader: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
28
28
  disabled?: boolean | undefined;
29
29
  clearable?: boolean | undefined;
30
30
  checkStrictly?: boolean | undefined;
31
+ leafMode?: boolean | undefined;
31
32
  multiple?: boolean | undefined;
32
33
  expandedKeys?: Array<string | number> | undefined;
33
34
  expanded?: CascaderOption[] | undefined;
@@ -36,6 +36,10 @@ export interface CascaderProps {
36
36
  clearable?: boolean;
37
37
  /** 是否严格选择子项 */
38
38
  checkStrictly?: boolean;
39
+ /** 是否只返回叶子节点值
40
+ * @default false
41
+ */
42
+ leafMode?: boolean;
39
43
  /** 是否支持多选 */
40
44
  multiple?: boolean;
41
45
  }
@@ -95,7 +95,7 @@ var A = /*@__PURE__*/ d({
95
95
  let e = E();
96
96
  return _(() => x(e, w(d.prepend))), e;
97
97
  }), e;
98
- }), _(() => v(Q, [T(j).e("inner")])), y(Q, 0, 0), s(() => C.prefix || d.prefix, () => {
98
+ }), _(() => v(Q, [T(j).e("content")])), y(Q, 0, 0), s(() => C.prefix || d.prefix, () => {
99
99
  let e = D();
100
100
  return _(() => v(e, [T(j).e("prefix")])), y(e, null, 0), l("prefix", null, () => {
101
101
  let e = E();
@@ -103,8 +103,8 @@ var A = /*@__PURE__*/ d({
103
103
  }), e;
104
104
  }), h($, "blur", fe), h($, "change", ue), h($, "compositionend", le), h($, "compositionstart", ce), h($, "focus", de), $.$evtinput = c(q), h($, "press-enter", pe), he($, J, null, "inputRef"), _(() => {
105
105
  let e = d.type;
106
- S($, z.value), v($, [T(j).e("input")]), b($, "disabled", d.disabled), b($, "placeholder", d.placeholder), b($, "readonly", d.readonly ? !0 : void 0), b($, "type", e === "password" ? W.value ? "text" : "password" : e);
107
- }), y(Q, null, 2), s(() => B.value && !!z.value && d.clearable, () => {
106
+ S($, z.value), v($, [T(j).e("inner")]), b($, "disabled", d.disabled), b($, "placeholder", d.placeholder), b($, "readonly", d.readonly ? !0 : void 0), b($, "type", e === "password" ? W.value ? "text" : "password" : e);
107
+ }), y(Q, null, 2), s(() => B.value && !!z.value && d.clearable && !d.disabled, () => {
108
108
  let e = O();
109
109
  return _(() => v(e, T(j).e("close"))), y(e, null, 0), o(T(t)), h(e, "click", oe(U, ["stop"])), e.$evtmousedown = se(() => {}, ["prevent"]), e;
110
110
  }), y(Q, null, 3), s(() => d.type === "password", () => {
@@ -28,7 +28,6 @@ export declare const SMenuItem: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
28
28
  name: string | number;
29
29
  title?: string | undefined;
30
30
  disabled?: boolean | undefined;
31
- activePosition?: "left" | "center" | "right" | "circle" | undefined;
32
31
  item?: any;
33
32
  } & (typeof globalThis extends {
34
33
  __VLS_PROPS_FALLBACK: infer P;
@@ -13,7 +13,6 @@ var O = /*@__PURE__*/ u({
13
13
  name: {},
14
14
  title: {},
15
15
  disabled: { type: Boolean },
16
- activePosition: { default: "center" },
17
16
  item: {}
18
17
  },
19
18
  setup(u, { slots: d }) {
@@ -38,14 +37,11 @@ var O = /*@__PURE__*/ u({
38
37
  default: () => {
39
38
  let e = T(), t = a(e, 1);
40
39
  return m(() => {
41
- let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
40
+ let t = x(O);
42
41
  h(e, [
43
42
  t.e("item-title"),
44
43
  t.is("disabled", u.disabled),
45
- t.is("active", a.value === r && i === "center"),
46
- t.is("active-left", a.value === r && i === "left"),
47
- t.is("active-right", a.value === r && i === "right"),
48
- t.is("active-circle", a.value === r && i === "circle")
44
+ t.is("active", x(A)?.activeKey.value === u.name)
49
45
  ]);
50
46
  }), g(e, 0, 0), s(() => d.icon, () => {
51
47
  let e = C();
@@ -58,14 +54,11 @@ var O = /*@__PURE__*/ u({
58
54
  }), () => {
59
55
  let e = E(), t = a(e, 1);
60
56
  return m(() => {
61
- let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
57
+ let t = x(O);
62
58
  h(e, [
63
59
  t.e("item-title"),
64
60
  t.is("disabled", u.disabled),
65
- t.is("active-center", a.value === r && i === "center"),
66
- t.is("active-left", a.value === r && i === "left"),
67
- t.is("active-right", a.value === r && i === "right"),
68
- t.is("active-circle", a.value === r && i === "circle")
61
+ t.is("active", x(A)?.activeKey.value === u.name)
69
62
  ]);
70
63
  }), g(e, 0, 0), s(() => d.icon, () => {
71
64
  let e = C();
@@ -58,7 +58,7 @@ var C = v("<div>"), w = v("<div>", 1), T = /*@__PURE__*/ l({
58
58
  return p(() => {
59
59
  let e = b(E);
60
60
  m(B, [e.b(), e.m(b(F))]), _(B, D.value);
61
- }), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "4px 0" }, () => {
61
+ }), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "8px" }, () => {
62
62
  let e = C();
63
63
  return p(() => m(e, [b(E).e("content")])), h(e, null, 0), c(), e;
64
64
  })), h(B, null, 1), s(() => b(F) === "horizontal", () => {
@@ -4,14 +4,14 @@ import t from "../../../icons/src/down.vue.mjs";
4
4
  import n from "../../../icons/src/right.vue.mjs";
5
5
  import r from "../../../icons/src/up.vue.mjs";
6
6
  import "../../../icons/index.mjs";
7
- import i from "../popover/popover.vue.mjs";
7
+ import { SPopover as i } from "../popover/index.mjs";
8
8
  import { STransition as a } from "../transition/index.mjs";
9
9
  import { menuContextKey as ee, menuLevelContextKey as o, subMenuContextKey as s } from "./types.mjs";
10
- import { child as c, computed as l, createComponent as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, inject as _, next as v, onMounted as y, provide as b, ref as x, renderEffect as S, setClass as C, setInsertionState as w, setText as T, template as E, toDisplayString as D, unref as O, useTemplateRef as k, watch as A } from "vue";
10
+ import { child as c, computed as l, createComponent as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as te, defineVaporComponent as m, delegateEvents as h, inject as g, next as _, on as v, onMounted as ne, provide as y, ref as b, renderEffect as x, setClass as S, setInsertionState as C, setText as w, template as T, toDisplayString as E, unref as D, useTemplateRef as O, watch as k } from "vue";
11
11
  //#region ../components/src/menu/sub-menu.vue?vue&type=script&setup=true&vapor=true&lang.ts
12
- var j = E("<div>"), M = E(" "), N = E("<div><div></div><div></div>"), P = E("<div><div></div>"), F = E("<div><div></div><div>"), I = E("<div><div>"), L = E("<div>", 1);
13
- g("click", "mouseover");
14
- var R = /*@__PURE__*/ h({
12
+ var A = T("<div>"), j = T(" "), M = T("<div><div></div><div></div>"), re = T("<div><div></div>"), ie = T("<div><div></div><div>"), ae = T("<div><div>"), oe = T("<div>", 1);
13
+ h("click", "mouseover");
14
+ var N = /*@__PURE__*/ m({
15
15
  name: "SSubMenu",
16
16
  __name: "sub-menu",
17
17
  props: {
@@ -19,112 +19,133 @@ var R = /*@__PURE__*/ h({
19
19
  title: {},
20
20
  disabled: { type: Boolean }
21
21
  },
22
- setup(h, { slots: g }) {
23
- let E = h, R = e("menu"), z = k("subMenuRef"), B = _(ee, void 0), V = _(s, void 0), H = _(o, void 0), U = H ? H.level + 1 : 1, W = x(!1), G = x(/* @__PURE__ */ new Set()), K = () => {
24
- B?.collapsed.value || (W.value = !W.value, W.value ? B?.setOpenKey(E.name) : B?.removeOpenKey(E.name));
25
- }, q = l(() => {
26
- let e = B?.activeKey.value;
27
- return e != null && G.value.has(e);
28
- }), J = k("popoverRef"), Y = (e) => {
29
- e ? J.value?.show() : J.value?.hide();
22
+ setup(m, { slots: h }) {
23
+ let T = m, N = e("menu"), P = O("subMenuRef"), F = g(ee, void 0), I = g(s, void 0), L = g(o, void 0), R = L ? L.level + 1 : 1, z = b(!1), B = b(/* @__PURE__ */ new Set()), se = () => {
24
+ F?.collapsed.value || (z.value = !z.value, z.value ? F?.setOpenKey(T.name) : F?.removeOpenKey(T.name));
25
+ }, V = l(() => {
26
+ let e = F?.activeKey.value;
27
+ return e != null && B.value.has(e);
28
+ }), H = O("popoverRef"), U = (e) => {
29
+ e ? H.value?.show() : (H.value?.hide(), I?.notifyChildPopoverClose(T.name));
30
+ }, W = () => {
31
+ U(!1);
32
+ }, G = null, K = b(!1), q = b(void 0), J = () => {
33
+ G &&= (clearTimeout(G), null);
34
+ }, ce = () => {
35
+ J(), G = setTimeout(() => {
36
+ U(!1), G = null;
37
+ }, 150);
38
+ }, Y = () => {
39
+ q.value === void 0 && (K.value || ce());
40
+ }, le = () => {
41
+ J(), I?.cancelParentClose();
42
+ }, ue = (e) => {
43
+ q.value === e && (q.value = void 0, Y());
44
+ }, de = () => {
45
+ (F?.isCollapsed.value || F?.mode.value === "horizontal") && (K.value = !0, J(), U(!0), I ? (I.setActiveChildPopoverKey(T.name), I.cancelParentClose()) : F?.setActivePopoverKey(T.name));
46
+ }, fe = () => {
47
+ (F?.isCollapsed.value || F?.mode.value === "horizontal") && (K.value = !1, Y());
30
48
  }, X = () => {
31
- Y(!1);
32
- }, te = () => {
33
- (B?.isCollapsed.value || B?.mode.value === "horizontal") && (Y(!0), V ? V.setActiveChildPopoverKey(E.name) : B?.setActivePopoverKey(E.name));
49
+ K.value = !0, J(), I?.cancelParentClose();
50
+ }, Z = () => {
51
+ K.value = !1, Y();
34
52
  };
35
- A(q, (e) => {
36
- e && !W.value && (W.value = !0, B?.setOpenKey(E.name));
37
- }), A(l(() => V ? V.activeChildPopoverKey.value : B?.activePopoverKey.value), (e) => {
38
- (B?.isCollapsed.value || B?.mode.value === "horizontal") && e !== void 0 && e !== E.name && Y(!1);
39
- }), A(() => B?.openKeys.value || [], (e) => {
40
- e && e.length > 0 && (W.value = e.includes(E.name));
41
- }, { immediate: !0 }), y(() => {
42
- z.value?.style.setProperty("--s-menu-level", `${U}`), V?.registerDescendant(E.name);
43
- });
44
- let ne = (e) => {
45
- G.value.add(e), V?.registerDescendant(e);
46
- }, Z = x(void 0);
47
- b(o, { level: U }), b(s, {
48
- registerDescendant: ne,
49
- outsideClick: X,
50
- activeChildPopoverKey: Z,
53
+ k(V, (e) => {
54
+ e && !z.value && (z.value = !0, F?.setOpenKey(T.name));
55
+ }), k(l(() => I ? I.activeChildPopoverKey.value : F?.activePopoverKey.value), (e) => {
56
+ (F?.isCollapsed.value || F?.mode.value === "horizontal") && e !== void 0 && e !== T.name && U(!1);
57
+ }), k(() => F?.openKeys.value || [], (e) => {
58
+ e && e.length > 0 && (z.value = e.includes(T.name));
59
+ }, { immediate: !0 }), ne(() => {
60
+ P.value?.style.setProperty("--s-menu-level", `${R}`), I?.registerDescendant(T.name);
61
+ }), y(o, { level: R }), y(s, {
62
+ registerDescendant: (e) => {
63
+ B.value.add(e), I?.registerDescendant(e);
64
+ },
65
+ outsideClick: W,
66
+ activeChildPopoverKey: q,
51
67
  setActiveChildPopoverKey: (e) => {
52
- Z.value = e;
53
- }
68
+ q.value = e;
69
+ },
70
+ notifyChildPopoverClose: ue,
71
+ cancelParentClose: le
54
72
  });
55
- let Q = m(), $ = L();
56
- return S(() => {
57
- let e = O(R);
58
- C($, [
73
+ let Q = te(), $ = oe();
74
+ return x(() => {
75
+ let e = D(N);
76
+ S($, [
59
77
  e.e("sub-menu"),
60
- e.is("disabled", h.disabled),
61
- e.is("collapse", O(B)?.isCollapsed.value)
78
+ e.is("disabled", m.disabled),
79
+ e.is("collapse", D(F)?.isCollapsed.value)
62
80
  ]);
63
- }), w($, null, 0), d(() => O(B)?.isCollapsed.value || O(B)?.mode.value === "horizontal", () => {
64
- let e = u(i, {
81
+ }), C($, null, 0), d(() => D(F)?.isCollapsed.value || D(F)?.mode.value === "horizontal", () => {
82
+ let e = u(D(i), {
65
83
  manual: "",
66
- placement: () => O(B)?.mode.value === "horizontal" ? "bottom-start" : "right-start",
84
+ placement: () => D(F)?.mode.value === "horizontal" ? "bottom-start" : "right-start",
67
85
  offset: [0, 4],
68
- onClickOutside: () => X
86
+ onClickOutside: () => W
69
87
  }, {
70
- content: () => d(() => O(B)?.mode.value === "horizontal" && g.subContent, () => p("subContent", null, null, 4), () => {
71
- let e = j();
72
- return S(() => C(e, [O(R).e("pop-content")])), w(e, null, 0), p(), e;
88
+ content: () => d(() => D(F)?.mode.value === "horizontal" && h.subContent, () => {
89
+ let e = A();
90
+ return C(e, null, 0), p("subContent"), v(e, "mouseenter", X), v(e, "mouseleave", Z), e;
91
+ }, () => {
92
+ let e = A();
93
+ return x(() => S(e, [D(N).e("pop-content")])), C(e, null, 0), p(), v(e, "mouseenter", X), v(e, "mouseleave", Z), e;
73
94
  }, 1669),
74
- default: () => d(() => O(U) === 1 && O(B)?.mode.value === "horizontal", () => {
75
- let e = N(), n = c(e, 1), i = v(n, 2);
76
- return S(() => {
77
- let t = O(R);
78
- C(e, [
95
+ default: () => d(() => D(R) === 1 && D(F)?.mode.value === "horizontal", () => {
96
+ let e = M(), n = c(e, 1), i = _(n, 2);
97
+ return x(() => {
98
+ let t = D(N);
99
+ S(e, [
79
100
  t.e("sub-title"),
80
- t.is("active", q.value),
81
- { [t.e("horizontal-sub-title")]: O(B)?.mode.value === "horizontal" }
101
+ t.is("active", V.value),
102
+ { [t.e("horizontal-sub-title")]: D(F)?.mode.value === "horizontal" }
82
103
  ]);
83
- }), w(e, 0, 0), d(() => g.icon, () => {
104
+ }), C(e, 0, 0), d(() => h.icon, () => {
105
+ let e = A();
106
+ return x(() => S(e, [D(N).e("sub-icon")])), C(e, null, 0), p("icon"), e;
107
+ }), x(() => S(n, [D(N).e("sub-label")])), C(n, null, 0), p("title", null, () => {
84
108
  let e = j();
85
- return S(() => C(e, [O(R).e("sub-icon")])), w(e, null, 0), p("icon"), e;
86
- }), S(() => C(n, [O(R).e("sub-label")])), w(n, null, 0), p("title", null, () => {
87
- let e = M();
88
- return S(() => T(e, D(h.title))), e;
89
- }), S(() => C(i, [O(R).e("sub-arrow")])), w(i, null, 0), d(() => W.value, () => u(O(r)), () => u(O(t)), 517), e;
90
- }, () => d(() => O(U) === 1, () => {
91
- let e = P(), t = c(e);
92
- return S(() => {
93
- let n = O(R);
94
- C(e, [n.e("sub-title"), n.is("active", q.value)]), C(t, [n.e("sub-icon")]);
95
- }), w(t, null, 0), p("icon"), e;
109
+ return x(() => w(e, E(m.title))), e;
110
+ }), x(() => S(i, [D(N).e("sub-arrow")])), C(i, null, 0), d(() => z.value, () => u(D(r)), () => u(D(t)), 517), e;
111
+ }, () => d(() => D(R) === 1, () => {
112
+ let e = re(), t = c(e);
113
+ return x(() => {
114
+ let n = D(N);
115
+ S(e, [n.e("sub-title"), n.is("active", V.value)]), S(t, [n.e("sub-icon")]);
116
+ }), C(t, null, 0), p("icon"), e;
96
117
  }, () => {
97
- let e = N(), t = c(e, 1), r = v(t, 2);
98
- return S(() => {
99
- let t = O(R);
100
- C(e, [t.e("sub-title"), t.is("active", q.value)]);
101
- }), w(e, 0, 0), d(() => g.icon, () => {
118
+ let e = M(), t = c(e, 1), r = _(t, 2);
119
+ return x(() => {
120
+ let t = D(N);
121
+ S(e, [t.e("sub-title"), t.is("active", V.value)]);
122
+ }), C(e, 0, 0), d(() => h.icon, () => {
123
+ let e = A();
124
+ return x(() => S(e, [D(N).e("sub-icon")])), C(e, null, 0), p("icon"), e;
125
+ }), x(() => S(t, [D(N).e("sub-label")])), C(t, null, 0), p("title", null, () => {
102
126
  let e = j();
103
- return S(() => C(e, [O(R).e("sub-icon")])), w(e, null, 0), p("icon"), e;
104
- }), S(() => C(t, [O(R).e("sub-label")])), w(t, null, 0), p("title", null, () => {
105
- let e = M();
106
- return S(() => T(e, D(h.title))), e;
107
- }), S(() => C(r, [O(R).e("sub-arrow")])), w(r, null, 0), u(O(n)), e;
127
+ return x(() => w(e, E(m.title))), e;
128
+ }), x(() => S(r, [D(N).e("sub-arrow")])), C(r, null, 0), u(D(n)), e;
108
129
  }, 1157), 901)
109
130
  });
110
- return Q(e, J, null, "popoverRef"), e;
131
+ return Q(e, H, null, "popoverRef"), e;
111
132
  }, () => {
112
- let e = F(), n = c(e, 1), i = v(n, 2);
113
- return S(() => {
114
- let t = O(R);
115
- C(e, [t.e("sub-title"), t.is("active", q.value)]);
116
- }), w(e, 0, 0), d(() => g.icon, () => {
133
+ let e = ie(), n = c(e, 1), i = _(n, 2);
134
+ return x(() => {
135
+ let t = D(N);
136
+ S(e, [t.e("sub-title"), t.is("active", V.value)]);
137
+ }), C(e, 0, 0), d(() => h.icon, () => {
138
+ let e = A();
139
+ return x(() => S(e, [D(N).e("sub-icon")])), C(e, null, 0), p("icon"), e;
140
+ }), x(() => S(n, [D(N).e("sub-label")])), C(n, null, 0), p("title", null, () => {
117
141
  let e = j();
118
- return S(() => C(e, [O(R).e("sub-icon")])), w(e, null, 0), p("icon"), e;
119
- }), S(() => C(n, [O(R).e("sub-label")])), w(n, null, 0), p("title", null, () => {
120
- let e = M();
121
- return S(() => T(e, D(h.title))), e;
122
- }), S(() => C(i, [O(R).e("sub-arrow")])), w(i, null, 0), d(() => W.value, () => u(O(r)), () => u(O(t)), 2309), e.$evtclick = f(K), [e, u(O(a), { type: "height" }, () => d(() => W.value, () => {
123
- let e = I(), t = c(e);
124
- return S(() => C(t, [O(R).e("sub-content")])), w(t, null, 0), p(), e;
142
+ return x(() => w(e, E(m.title))), e;
143
+ }), x(() => S(i, [D(N).e("sub-arrow")])), C(i, null, 0), d(() => z.value, () => u(D(r)), () => u(D(t)), 2309), e.$evtclick = f(se), [e, u(D(a), { type: "height" }, () => d(() => z.value, () => {
144
+ let e = ae(), t = c(e);
145
+ return x(() => S(t, [D(N).e("sub-content")])), C(t, null, 0), p(), e;
125
146
  }, null, 129))];
126
- }, 1801), $.$evtmouseover = f(te), Q($, z, null, "subMenuRef"), $;
147
+ }, 1801), $.$evtmouseover = f(de), v($, "mouseleave", fe), Q($, P, null, "subMenuRef"), $;
127
148
  }
128
149
  });
129
150
  //#endregion
130
- export { R as default };
151
+ export { N as default };
@@ -32,8 +32,6 @@ export interface MenuItemProps {
32
32
  title?: string;
33
33
  /** 是否禁用 */
34
34
  disabled?: boolean;
35
- /** 激活标识位置 */
36
- activePosition?: "left" | "center" | "right" | "circle";
37
35
  /** 菜单项数据 */
38
36
  item?: any;
39
37
  }
@@ -86,6 +84,10 @@ export interface SubMenuContext {
86
84
  activeChildPopoverKey: Ref<string | number | undefined>;
87
85
  /** 设置当前 hover 打开 popover 的直接子 SubMenu,同级互斥 */
88
86
  setActiveChildPopoverKey: (name: string | number) => void;
87
+ /** 子级 popover 关闭时通知父级,父级清除 active key 并重新评估是否关闭 */
88
+ notifyChildPopoverClose: (name: string | number) => void;
89
+ /** 取消父级(当前 sub-menu)的关闭定时器,并递归取消更上层 */
90
+ cancelParentClose: () => void;
89
91
  }
90
92
  export declare const subMenuContextKey: InjectionKey<SubMenuContext>;
91
93
  export interface MenuLevelContext {