savor-ui 0.3.2 → 0.3.3

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 (27) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/es/components/index.mjs +1 -1
  3. package/dist/es/components/src/cascader/cascader.vue_vue_type_script_setup_true_vapor_true_lang.mjs +92 -81
  4. package/dist/es/components/src/cascader/index.d.ts +1 -0
  5. package/dist/es/components/src/cascader/types.d.ts +2 -0
  6. package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +23 -15
  7. package/dist/es/components/src/grid/grid.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -1
  8. package/dist/es/components/src/grid/types.d.ts +1 -0
  9. package/dist/es/components/src/menu/menu-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +46 -37
  10. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +45 -34
  11. package/dist/es/components/src/tree/index.d.ts +12 -4
  12. package/dist/es/components/src/tree/node.d.ts +2 -1
  13. package/dist/es/components/src/tree/node.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -1
  14. package/dist/es/components/src/tree/tree.d.ts +6 -2
  15. package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +57 -49
  16. package/dist/es/components/src/tree/types.d.ts +13 -3
  17. package/dist/es/core/components.mjs +6 -6
  18. package/dist/es/core/index.mjs +7 -7
  19. package/dist/es/theme/components/button.scss +21 -4
  20. package/dist/es/theme/components/cascader.scss +3 -0
  21. package/dist/es/theme/components/input.scss +2 -0
  22. package/dist/es/theme/components/menu.scss +13 -0
  23. package/dist/es/theme/components/table.scss +1 -0
  24. package/dist/json/vetur-attributes.json +28 -0
  25. package/dist/json/vetur-tags.json +8 -0
  26. package/dist/json/web-types.json +52 -3
  27. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
 
4
4
 
5
+ ## [0.3.3](https://gitee.com/mach552/savor-ui/compare/v0.3.2...v0.3.3) (2026-06-09)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **button:** 修复禁用状态样式无效问题 ([604ca42](https://gitee.com/mach552/savor-ui/commits/604ca427631e89bceaada29a04baf75371c77c60))
11
+ * **cascader:** 修复不显示下拉箭头图标问题 ([c2eb385](https://gitee.com/mach552/savor-ui/commits/c2eb38597b79bda04e98c94a0a61bf32b1c6af59))
12
+ * **cascader:** 修复空状态显示样式问题 ([25d0db3](https://gitee.com/mach552/savor-ui/commits/25d0db39d24b889de90ab15d8ccc663dcb04c424))
13
+ * **cascader:** 修复清除图标不显示问题 ([0f6fda6](https://gitee.com/mach552/savor-ui/commits/0f6fda6a85611dce909f72bdc6062a77f348abc0))
14
+ * **grid:** 修复动态增减item时不动态计算位置的问题 ([67785f2](https://gitee.com/mach552/savor-ui/commits/67785f208652f0fd5a66f0e593790461789283ee))
15
+ * **input:** 修复禁用状态hover样式 ([cede93e](https://gitee.com/mach552/savor-ui/commits/cede93e6c8b72e6c608a37f59a6b395f4be4719f))
16
+ * **menu:** 修复折叠时的样式问题 ([9633091](https://gitee.com/mach552/savor-ui/commits/9633091ba4a04f4ce8e18cca24332268b21e7401))
17
+ * **table:** 修复横向滚动条在最右边反复横跳问题 ([a5e1902](https://gitee.com/mach552/savor-ui/commits/a5e19026cfe255fd0e303d7018a6eb69b62d4427))
18
+ * **table:** 修复树形展开时图标不旋转问题 ([6813adb](https://gitee.com/mach552/savor-ui/commits/6813adb8387a3a64ced2f045a9d12d82023aa692))
19
+ * **tree:** 修复各种事件无效问题 ([007a8ae](https://gitee.com/mach552/savor-ui/commits/007a8aecc76a257e61f5985c3e3a8803eb7d2f1e))
20
+
5
21
  ## [0.3.2](https://gitee.com/mach552/savor-ui/compare/v0.3.1...v0.3.2) (2026-06-08)
6
22
 
7
23
 
@@ -16,12 +16,12 @@ import "./src/badge/index.mjs";
16
16
  import "./src/button/index.mjs";
17
17
  import "./src/card/index.mjs";
18
18
  import "./src/carousel/index.mjs";
19
+ import "./src/empty/index.mjs";
19
20
  import "./src/cascader/index.mjs";
20
21
  import "./src/checkbox/types.mjs";
21
22
  import "./src/checkbox/index.mjs";
22
23
  import "./src/collapse/types.mjs";
23
24
  import "./src/collapse/index.mjs";
24
- import "./src/empty/index.mjs";
25
25
  import "./src/icon/index.mjs";
26
26
  import "./src/tag/index.mjs";
27
27
  import "./src/select/index.mjs";
@@ -1,17 +1,20 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
3
  import { useFormItem as t } from "../form/use-form-item.mjs";
4
- import { SPopover as n } from "../popover/index.mjs";
5
- import { SInput as r } from "../input/index.mjs";
6
- import i from "./cascader-column.vue.mjs";
7
- import { computed as a, createComponent as o, createComponentWithFallback as s, createIf as c, createInvoker as l, createTemplateRefSetter as u, defineVaporComponent as d, delegateEvents as f, mergeModels as p, on as ee, onMounted as m, ref as h, renderEffect as g, resolveComponent as _, setClass as v, setInsertionState as y, template as b, toRefs as x, unref as S, useModel as C, useTemplateRef as w, watch as T, withModifiers as E } from "vue";
4
+ import n from "../../../icons/src/down.vue.mjs";
5
+ import "../../../icons/index.mjs";
6
+ import { SPopover as r } from "../popover/index.mjs";
7
+ import { SInput as i } from "../input/index.mjs";
8
+ import { SEmpty as a } from "../empty/index.mjs";
9
+ import o from "./cascader-column.vue.mjs";
10
+ import { computed as s, createComponent as c, createComponentWithFallback as l, createIf as u, createInvoker as d, createTemplateRefSetter as f, defineVaporComponent as p, delegateEvents as m, mergeModels as h, on as g, onMounted as _, ref as v, renderEffect as y, resolveComponent as b, setClass as x, setInsertionState as S, template as C, toRefs as w, unref as T, useModel as E, useTemplateRef as D, watch as O, withModifiers as k } from "vue";
8
11
  //#region ../components/src/cascader/cascader.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
- var D = b("<div>"), O = b("<div>", 1);
10
- f("click");
11
- var k = /*@__PURE__*/ d({
12
+ var ee = C("<div style=\"padding: 12px\">"), A = C("<div>"), j = C("<div>", 1);
13
+ m("click");
14
+ var M = /*@__PURE__*/ p({
12
15
  name: "SCascader",
13
16
  __name: "cascader",
14
- props: /*@__PURE__*/ p({
17
+ props: /*@__PURE__*/ h({
15
18
  modelValue: {},
16
19
  options: { default: () => [] },
17
20
  placeholder: { default: "请选择" },
@@ -28,6 +31,7 @@ var k = /*@__PURE__*/ d({
28
31
  size: { default: "medium" },
29
32
  error: { type: Boolean },
30
33
  disabled: { type: Boolean },
34
+ clearable: { type: Boolean },
31
35
  checkStrictly: { type: Boolean },
32
36
  multiple: { type: Boolean }
33
37
  }, {
@@ -38,7 +42,7 @@ var k = /*@__PURE__*/ d({
38
42
  expanded: { default: () => [] },
39
43
  expandedModifiers: {}
40
44
  }),
41
- emits: /*@__PURE__*/ p([
45
+ emits: /*@__PURE__*/ h([
42
46
  "selectItem",
43
47
  "expand",
44
48
  "clear"
@@ -47,107 +51,114 @@ var k = /*@__PURE__*/ d({
47
51
  "update:expandedKeys",
48
52
  "update:expanded"
49
53
  ]),
50
- setup(d, { emit: f }) {
51
- let p = d, b = e("cascader"), k = f, A = C(d, "modelValue"), { size: j, error: M } = x(p), { mergedSize: N, mergedError: P } = t({
52
- size: j,
53
- error: M
54
- }), F = C(d, "expandedKeys"), I = C(d, "expanded"), L = a(() => ({
54
+ setup(p, { emit: m }) {
55
+ let h = p, C = e("cascader"), M = m, N = E(p, "modelValue"), { size: P, error: F } = w(h), { mergedSize: I, mergedError: L } = t({
56
+ size: P,
57
+ error: F
58
+ }), R = E(p, "expandedKeys"), z = E(p, "expanded"), B = s(() => ({
55
59
  label: "label",
56
60
  key: "key",
57
61
  children: "children",
58
- ...p.fieldNames
59
- })), R = h(""), z = ({ item: e, expandeds: t }) => {
60
- R.value = t.map((e) => e[L.value.label]).join(p.pathSeparator), U(!1), p.pathTextMode ? A.value = t.map((e) => e[L.value.key]).join(p.pathSeparator) : p.pathMode ? A.value = t.map((e) => e[L.value.key]) : A.value = e[L.value.key], k("selectItem", {
62
+ ...h.fieldNames
63
+ })), 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", {
61
65
  item: e,
62
66
  expandeds: t
63
67
  });
64
- }, B = () => {
65
- k("expand", F.value);
66
- }, V = w("popoverRef"), H = h(!1), U = (e) => {
67
- H.value = e, e ? V.value?.show() : V.value?.hide();
68
- }, W = () => {
69
- let e = !H.value;
70
- e && J(), U(e);
71
- }, G = () => {
72
- U(!1);
73
- }, K = (e, t, n = []) => {
68
+ }, U = () => {
69
+ M("expand", R.value);
70
+ }, W = D("popoverRef"), G = v(!1), K = (e) => {
71
+ G.value = e, e ? W.value?.show() : W.value?.hide();
72
+ }, q = () => {
73
+ let e = !G.value;
74
+ e && Z(), K(e);
75
+ }, J = () => {
76
+ K(!1);
77
+ }, Y = (e, t, n = []) => {
74
78
  for (let r of e) {
75
79
  let e = [...n, r];
76
- if (r[L.value.key] === t) return e;
77
- if (r[L.value.children]) {
78
- let n = K(r[L.value.children], t, e);
80
+ if (r[B.value.key] === t) return e;
81
+ if (r[B.value.children]) {
82
+ let n = Y(r[B.value.children], t, e);
79
83
  if (n) return n;
80
84
  }
81
85
  }
82
86
  return null;
83
- }, q = (e, t) => {
87
+ }, X = (e, t) => {
84
88
  let n = [], r = e;
85
89
  for (let e of t) {
86
- let t = r.find((t) => t[L.value.key] === e);
90
+ let t = r.find((t) => t[B.value.key] === e);
87
91
  if (!t) return null;
88
- n.push(t), r = t[L.value.children] || [];
92
+ n.push(t), r = t[B.value.children] || [];
89
93
  }
90
94
  return n;
91
- }, J = () => {
92
- if (A.value !== void 0) {
95
+ }, Z = () => {
96
+ if (N.value !== void 0) {
93
97
  let e = null;
94
- if (p.pathTextMode && typeof A.value == "string") {
95
- let t = A.value.split(p.pathSeparator);
96
- e = q(p.options, t);
97
- } else e = Array.isArray(A.value) ? q(p.options, A.value) : K(p.options, A.value);
98
- e && (F.value = e.map((e) => e[L.value.key]), I.value = e, R.value = e.map((e) => e[L.value.label]).join(p.pathSeparator));
98
+ if (h.pathTextMode && typeof N.value == "string") {
99
+ let t = N.value.split(h.pathSeparator);
100
+ e = X(h.options, t);
101
+ } else e = Array.isArray(N.value) ? X(h.options, N.value) : Y(h.options, N.value);
102
+ e && (R.value = e.map((e) => e[B.value.key]), z.value = e, V.value = e.map((e) => e[B.value.label]).join(h.pathSeparator));
99
103
  }
100
- }, Y = (e) => {
101
- A.value === void 0 ? e.forEach((e) => {
102
- F.value.includes(e[L.value.key]) && (R.value = R.value ? `${R.value}${p.pathSeparator}${e[L.value.label]}` : e[L.value.label], e[L.value.children] && Y(e[L.value.children]));
103
- }) : J();
104
- }, X = () => {
105
- A.value = "", k("clear");
104
+ }, Q = (e) => {
105
+ N.value === void 0 ? e.forEach((e) => {
106
+ R.value.includes(e[B.value.key]) && (V.value = V.value ? `${V.value}${h.pathSeparator}${e[B.value.label]}` : e[B.value.label], e[B.value.children] && Q(e[B.value.children]));
107
+ }) : Z();
108
+ }, te = () => {
109
+ N.value = "", M("clear");
106
110
  };
107
- T(A, () => {
108
- J();
109
- }), m(() => {
110
- Y(p.options);
111
+ O(N, () => {
112
+ Z();
113
+ }), _(() => {
114
+ Q(h.options);
111
115
  });
112
- let Z = u(), Q = _("SEmpty"), $ = O();
113
- return g(() => v($, [S(b).b()])), y($, null, 0), Z(o(S(n), { $: [() => ({
116
+ let ne = f(), re = b("SIcon"), $ = j();
117
+ return y(() => x($, [T(C).b()])), S($, null, 0), ne(c(T(r), { $: [() => ({
114
118
  offset: [0, 4],
115
119
  placement: "bottom-start",
116
120
  manual: !0,
117
- ...d.popoverProps
118
- }), { onClickOutside: () => G }] }, {
121
+ ...p.popoverProps
122
+ }), { onClickOutside: () => J }] }, {
119
123
  content: () => {
120
- let e = D();
121
- return g(() => v(e, [S(b).e("wrapper")])), y(e, null, 0), c(() => !d.options.length, () => s(Q), () => {
122
- let e = D();
123
- return g(() => v(e, [S(b).e("panel")])), y(e, null, 0), o(i, {
124
- expandTrigger: () => d.expandTrigger,
125
- fieldNames: () => d.fieldNames,
126
- options: () => d.options,
127
- onClickItem: () => z,
128
- onExpand: () => B,
129
- modelValue: () => A.value,
130
- "onUpdate:modelValue": () => (e) => A.value = e,
131
- expanded: () => I.value,
132
- "onUpdate:expanded": () => (e) => I.value = e,
133
- expandedKeys: () => F.value,
134
- "onUpdate:expandedKeys": () => (e) => F.value = e
124
+ let e = A();
125
+ return y(() => x(e, [T(C).e("wrapper")])), S(e, null, 0), u(() => !p.options.length, () => {
126
+ let e = ee();
127
+ return S(e, null, 0), c(T(a)), e;
128
+ }, () => {
129
+ let e = A();
130
+ return y(() => x(e, [T(C).e("panel")])), S(e, null, 0), c(o, {
131
+ expandTrigger: () => p.expandTrigger,
132
+ fieldNames: () => p.fieldNames,
133
+ options: () => p.options,
134
+ onClickItem: () => H,
135
+ onExpand: () => U,
136
+ modelValue: () => N.value,
137
+ "onUpdate:modelValue": () => (e) => N.value = e,
138
+ expanded: () => z.value,
139
+ "onUpdate:expanded": () => (e) => z.value = e,
140
+ expandedKeys: () => R.value,
141
+ "onUpdate:expandedKeys": () => (e) => R.value = e
135
142
  }), e;
136
- }, 261), ee(e, "click", E(() => {}, ["stop"])), e;
143
+ }, 261), g(e, "click", k(() => {}, ["stop"])), e;
137
144
  },
138
- default: () => o(S(r), {
139
- placeholder: () => d.placeholder,
140
- disabled: () => d.disabled,
141
- error: () => S(P),
142
- size: () => S(N),
143
- modelValue: () => R.value,
144
- "onUpdate:modelValue": () => (e) => R.value = e,
145
+ default: () => c(T(i), {
146
+ placeholder: () => p.placeholder,
147
+ disabled: () => p.disabled,
148
+ error: () => T(L),
149
+ size: () => T(I),
150
+ modelValue: () => V.value,
151
+ "onUpdate:modelValue": () => (e) => V.value = e,
145
152
  readonly: "",
153
+ clearable: () => p.clearable,
146
154
  style: "width: 100%",
147
- onClear: () => X
148
- })
149
- }), V, null, "popoverRef"), $.$evtclick = l(W), $;
155
+ onClear: () => te
156
+ }, { suffix: () => l(re, {
157
+ class: () => [T(C).e("suffix-icon")],
158
+ style: () => ({ transform: G.value ? "rotate(180deg)" : "" })
159
+ }, () => c(T(n))) })
160
+ }), W, null, "popoverRef"), $.$evtclick = d(q), $;
150
161
  }
151
162
  });
152
163
  //#endregion
153
- export { k as default };
164
+ export { M as default };
@@ -26,6 +26,7 @@ export declare const SCascader: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
26
26
  size?: "mini" | "small" | "medium" | "large" | undefined;
27
27
  error?: boolean | undefined;
28
28
  disabled?: boolean | undefined;
29
+ clearable?: boolean | undefined;
29
30
  checkStrictly?: boolean | undefined;
30
31
  multiple?: boolean | undefined;
31
32
  expandedKeys?: Array<string | number> | undefined;
@@ -32,6 +32,8 @@ export interface CascaderProps {
32
32
  error?: boolean;
33
33
  /** 是否禁用 */
34
34
  disabled?: boolean;
35
+ /** 是否可清除 */
36
+ clearable?: boolean;
35
37
  /** 是否严格选择子项 */
36
38
  checkStrictly?: boolean;
37
39
  /** 是否支持多选 */
@@ -1,9 +1,9 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
3
  import { gridContextKey as t } from "./types.mjs";
4
- import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u, setStyle as d, template as f, unref as p, useId as m } from "vue";
4
+ import { computed as n, createSlot as r, defineVaporComponent as i, inject as a, onMounted as o, onUnmounted as s, renderEffect as c, setClass as l, setInsertionState as u, setStyle as d, template as f, unref as p, useId as m, watch as h } from "vue";
5
5
  //#region ../components/src/grid/grid-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
- var h = f("<div>", 1), g = /*@__PURE__*/ i({
6
+ var g = f("<div>", 1), _ = /*@__PURE__*/ i({
7
7
  name: "SGridItem",
8
8
  __name: "grid-item",
9
9
  props: {
@@ -11,29 +11,37 @@ var h = f("<div>", 1), g = /*@__PURE__*/ i({
11
11
  offset: { default: 0 }
12
12
  },
13
13
  setup(i) {
14
- let f = i, g = e("grid-item"), _ = "grid-item-" + m(), v = a(t, {}), y = n(() => {
15
- if (!v?.positionList) return {};
16
- let e = v?.positionList.value[_];
14
+ let f = i, _ = e("grid-item"), v = "grid-item-" + m(), y = a(t, {}), b = n(() => {
15
+ if (!y?.positionList) return {};
16
+ let e = y?.positionList.value[v];
17
17
  return e ? { gridColumn: `${e.start} / ${e.end}` } : {};
18
- }), b = () => {
19
- v?.addGridItem?.({
18
+ }), x = () => {
19
+ y?.addGridItem?.({
20
20
  ...f,
21
- uid: _
21
+ uid: v
22
22
  });
23
23
  };
24
24
  o(() => {
25
- b();
25
+ x();
26
+ }), h(() => ({
27
+ span: f.span,
28
+ offset: f.offset
29
+ }), () => {
30
+ y?.updateGridItem?.({
31
+ ...f,
32
+ uid: v
33
+ });
26
34
  }), s(() => {
27
- v?.removeGridItem?.({
35
+ y?.removeGridItem?.({
28
36
  ...f,
29
- uid: _
37
+ uid: v
30
38
  });
31
39
  });
32
- let x = h();
40
+ let S = g();
33
41
  return c(() => {
34
- l(x, [p(g).b()]), d(x, y.value);
35
- }), u(x, null, 0), r(), x;
42
+ l(S, [p(_).b()]), d(S, b.value);
43
+ }), u(S, null, 0), r(), S;
36
44
  }
37
45
  });
38
46
  //#endregion
39
- export { g as default };
47
+ export { _ as default };
@@ -24,7 +24,12 @@ var m = f("<div>", 1), h = /*@__PURE__*/ a({
24
24
  _.value.push(e);
25
25
  },
26
26
  removeGridItem: (e) => {
27
- _.value = _.value.filter((t) => t.uid !== e);
27
+ let t = typeof e == "string" ? e : e.uid;
28
+ _.value = _.value.filter((e) => e.uid !== t);
29
+ },
30
+ updateGridItem: (e) => {
31
+ let t = _.value.findIndex((t) => t.uid === e.uid);
32
+ t !== -1 && (_.value[t] = e);
28
33
  },
29
34
  positionList: r(() => {
30
35
  let e = 1, t = {}, n = y.value;
@@ -38,6 +38,7 @@ export interface GridChildren {
38
38
  export interface GridContext {
39
39
  addGridItem?: (item: any) => void;
40
40
  removeGridItem?: (item: any) => void;
41
+ updateGridItem?: (item: any) => void;
41
42
  positionList?: ComputedRef<Record<string, {
42
43
  start: number;
43
44
  end: number;
@@ -2,9 +2,9 @@ import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
3
  import { STooltip as t } from "../tooltip/index.mjs";
4
4
  import { menuContextKey as n, menuLevelContextKey as r, subMenuContextKey as i } from "./types.mjs";
5
- import { child as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f, next as p, onMounted as m, renderEffect as h, setClass as g, setInsertionState as _, setStaticTemplateRef as v, setText as y, template as b, toDisplayString as x, unref as S, useTemplateRef as C } from "vue";
5
+ import { child as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f, onMounted as p, renderEffect as m, setClass as h, setInsertionState as g, setStaticTemplateRef as _, setText as v, template as y, toDisplayString as b, unref as x, useTemplateRef as S } from "vue";
6
6
  //#region ../components/src/menu/menu-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
7
- var w = b(" "), T = b("<div><div></div><div></div></div>"), E = b("<div><div></div><div>"), D = b("<div>", 1);
7
+ var C = y("<div>"), w = y(" "), T = y("<div><div></div></div>"), E = y("<div><div>"), D = y("<div>", 1);
8
8
  d("click");
9
9
  var O = /*@__PURE__*/ u({
10
10
  name: "SMenuItem",
@@ -16,54 +16,63 @@ var O = /*@__PURE__*/ u({
16
16
  activePosition: { default: "center" },
17
17
  item: {}
18
18
  },
19
- setup(u) {
20
- let d = u, b = e("menu"), O = C("itemRef"), k = f(n, void 0), A = f(i, void 0), j = f(r, void 0), M = () => {
21
- k?.itemClick(d.name, d.item), A?.outsideClick();
19
+ setup(u, { slots: d }) {
20
+ let y = u, O = e("menu"), k = S("itemRef"), A = f(n, void 0), j = f(i, void 0), M = f(r, void 0), N = () => {
21
+ A?.itemClick(y.name, y.item), j?.outsideClick();
22
22
  };
23
- m(() => {
24
- A?.registerDescendant(d.name), j || O.value?.style.setProperty("--s-menu-level", "0");
23
+ p(() => {
24
+ j?.registerDescendant(y.name), M || k.value?.style.setProperty("--s-menu-level", "0");
25
25
  });
26
- let N = D();
27
- return h(() => g(N, [S(b).e("item")])), _(N, null, 0), s(() => S(k)?.collapsed.value, () => o(S(t), {
26
+ let P = D();
27
+ return m(() => {
28
+ let e = x(O);
29
+ h(P, [e.e("item"), e.is("collapse", x(A)?.isCollapsed.value)]);
30
+ }), g(P, null, 0), s(() => x(A)?.collapsed.value && !x(j), () => o(x(t), {
28
31
  mini: "",
29
32
  "popover-props": { placement: "right" }
30
33
  }, {
31
34
  content: () => l("default", null, () => {
32
35
  let e = w();
33
- return h(() => y(e, x(u.title))), e;
36
+ return m(() => v(e, b(u.title))), e;
34
37
  }, 4),
35
38
  default: () => {
36
- let e = T(), t = a(e), n = p(t, 1);
37
- return h(() => {
38
- let n = S(b), r = S(k), i = u.name, a = u.activePosition, o = r.activeKey;
39
- g(e, [
40
- n.e("item-title"),
41
- n.is("disabled", u.disabled),
42
- n.is("active", o.value === i && a === "center"),
43
- n.is("active-left", o.value === i && a === "left"),
44
- n.is("active-right", o.value === i && a === "right")
45
- ]), g(t, [n.e("item-icon")]);
46
- }), _(t, null, 0), l("icon"), h(() => g(n, [S(b).e("item-label")])), _(n, null, 0), l("default", null, () => {
39
+ let e = T(), t = a(e, 1);
40
+ return m(() => {
41
+ let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
42
+ h(e, [
43
+ t.e("item-title"),
44
+ 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
+ ]);
49
+ }), g(e, 0, 0), s(() => d.icon, () => {
50
+ let e = C();
51
+ return m(() => h(e, [x(O).e("item-icon")])), g(e, null, 0), l("icon"), e;
52
+ }), m(() => h(t, [x(O).e("item-label")])), g(t, null, 0), l("default", null, () => {
47
53
  let e = w();
48
- return h(() => y(e, x(u.title))), e;
49
- }), e.$evtclick = c(M), e;
54
+ return m(() => v(e, b(u.title))), e;
55
+ }), e.$evtclick = c(N), e;
50
56
  }
51
57
  }), () => {
52
- let e = E(), t = a(e), n = p(t, 1);
53
- return h(() => {
54
- let n = S(b), r = S(k), i = u.name, a = u.activePosition, o = r.activeKey;
55
- g(e, [
56
- n.e("item-title"),
57
- n.is("disabled", u.disabled),
58
- n.is("active", o.value === i && a === "center"),
59
- n.is("active-left", o.value === i && a === "left"),
60
- n.is("active-right", o.value === i && a === "right")
61
- ]), g(t, [n.e("item-icon")]);
62
- }), _(t, null, 0), l("icon"), h(() => g(n, [S(b).e("item-label")])), _(n, null, 0), l("default", null, () => {
58
+ let e = E(), t = a(e, 1);
59
+ return m(() => {
60
+ let t = x(O), n = x(A), r = u.name, i = u.activePosition, a = n.activeKey;
61
+ h(e, [
62
+ t.e("item-title"),
63
+ t.is("disabled", u.disabled),
64
+ t.is("active", a.value === r && i === "center"),
65
+ t.is("active-left", a.value === r && i === "left"),
66
+ t.is("active-right", a.value === r && i === "right")
67
+ ]);
68
+ }), g(e, 0, 0), s(() => d.icon, () => {
69
+ let e = C();
70
+ return m(() => h(e, [x(O).e("item-icon")])), g(e, null, 0), l("icon"), e;
71
+ }), m(() => h(t, [x(O).e("item-label")])), g(t, null, 0), l("default", null, () => {
63
72
  let e = w();
64
- return h(() => y(e, x(u.title))), e;
65
- }), e.$evtclick = c(M), e;
66
- }, 261), v(N, O, null, "itemRef"), N;
73
+ return m(() => v(e, b(u.title))), e;
74
+ }), e.$evtclick = c(N), e;
75
+ }, 517), _(P, k, null, "itemRef"), P;
67
76
  }
68
77
  });
69
78
  //#endregion