savor-ui 0.23.0 → 0.24.0

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 (69) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/es/components/index.d.ts +2 -0
  3. package/dist/es/components/index.mjs +4 -0
  4. package/dist/es/components/src/avatar/avatar-group.d.ts +22 -0
  5. package/dist/es/components/src/avatar/avatar-group.vue.mjs +44 -0
  6. package/dist/es/components/src/avatar/avatar.vue.mjs +27 -26
  7. package/dist/es/components/src/avatar/index.d.ts +23 -0
  8. package/dist/es/components/src/avatar/index.mjs +4 -2
  9. package/dist/es/components/src/avatar/types.d.ts +14 -0
  10. package/dist/es/components/src/avatar/types.mjs +4 -0
  11. package/dist/es/components/src/card/card.vue.mjs +3 -1
  12. package/dist/es/components/src/card/index.d.ts +1 -0
  13. package/dist/es/components/src/card/types.d.ts +2 -0
  14. package/dist/es/components/src/dropdown/doption.vue.mjs +23 -20
  15. package/dist/es/components/src/dropdown/dsubmenu.vue.mjs +24 -21
  16. package/dist/es/components/src/dropdown/index.d.ts +2 -0
  17. package/dist/es/components/src/dropdown/types.d.ts +4 -0
  18. package/dist/es/components/src/form/form-item.vue.mjs +62 -61
  19. package/dist/es/components/src/icon-select/icon-select.vue.mjs +66 -66
  20. package/dist/es/components/src/menu/index.d.ts +3 -0
  21. package/dist/es/components/src/menu/menu-item.vue.mjs +12 -5
  22. package/dist/es/components/src/menu/menu.vue.mjs +24 -18
  23. package/dist/es/components/src/menu/sub-menu.vue.mjs +80 -81
  24. package/dist/es/components/src/menu/types.d.ts +10 -1
  25. package/dist/es/components/src/message/message.vue.mjs +33 -33
  26. package/dist/es/components/src/modal/index.d.ts +1 -1
  27. package/dist/es/components/src/modal/modal.vue.mjs +95 -90
  28. package/dist/es/components/src/modal/types.d.ts +11 -7
  29. package/dist/es/components/src/notification/index.d.ts +3 -0
  30. package/dist/es/components/src/notification/index.mjs +1 -0
  31. package/dist/es/components/src/notification/method.d.ts +3 -0
  32. package/dist/es/components/src/notification/method.mjs +67 -0
  33. package/dist/es/components/src/notification/notification-container.d.ts +23 -0
  34. package/dist/es/components/src/notification/notification-container.vue.mjs +70 -0
  35. package/dist/es/components/src/notification/notification.d.ts +22 -0
  36. package/dist/es/components/src/notification/notification.vue.mjs +72 -0
  37. package/dist/es/components/src/notification/types.d.ts +51 -0
  38. package/dist/es/components/src/overflow-list/index.d.ts +21 -0
  39. package/dist/es/components/src/overflow-list/index.mjs +7 -0
  40. package/dist/es/components/src/overflow-list/overflow-list.d.ts +20 -0
  41. package/dist/es/components/src/overflow-list/overflow-list.vue.mjs +70 -0
  42. package/dist/es/components/src/overflow-list/types.d.ts +17 -0
  43. package/dist/es/components/src/space/space.vue.mjs +1 -1
  44. package/dist/es/components/src/tree/index.d.ts +1 -0
  45. package/dist/es/components/src/tree/node.d.ts +1 -0
  46. package/dist/es/components/src/tree/node.vue.mjs +3 -1
  47. package/dist/es/components/src/tree/tree.vue.mjs +14 -20
  48. package/dist/es/components/src/tree/types.d.ts +2 -0
  49. package/dist/es/components/src/tree-select/tree-select.vue.mjs +5 -5
  50. package/dist/es/core/components.mjs +95 -92
  51. package/dist/es/core/global.d.ts +2 -0
  52. package/dist/es/core/index.mjs +83 -80
  53. package/dist/es/theme/components/avatar.scss +13 -2
  54. package/dist/es/theme/components/card.scss +6 -0
  55. package/dist/es/theme/components/dropdown.scss +4 -16
  56. package/dist/es/theme/components/form.scss +4 -1
  57. package/dist/es/theme/components/icon-select.scss +3 -0
  58. package/dist/es/theme/components/index.scss +2 -0
  59. package/dist/es/theme/components/menu.scss +41 -26
  60. package/dist/es/theme/components/modal.scss +27 -5
  61. package/dist/es/theme/components/notification.scss +164 -0
  62. package/dist/es/theme/components/overflow-list.scss +13 -0
  63. package/dist/es/theme/components/scrollbar.scss +4 -4
  64. package/dist/es/theme/components/tree.scss +19 -2
  65. package/dist/es/utils/src/theme/themeMap.mjs +6 -6
  66. package/dist/json/vetur-attributes.json +83 -4
  67. package/dist/json/vetur-tags.json +39 -6
  68. package/dist/json/web-types.json +218 -12
  69. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.24.0](https://gitee.com/mach552/savor-ui/compare/v0.23.1...v0.24.0) (2026-08-24)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **menu:** 修复样式变量没有给弹层传递的问题 ([a78d58b](https://gitee.com/mach552/savor-ui/commits/a78d58bb4f9461d7065f10829b1fb0b1d3fd5783))
11
+ * **tree:** 修复样式错误问题 ([0efa579](https://gitee.com/mach552/savor-ui/commits/0efa579bacb9c62e96856cab9a437778b10a5a17))
12
+
13
+
14
+ ### Features
15
+
16
+ * **avatar:** 新增`avatar-group`头像组组件 ([66e0a5b](https://gitee.com/mach552/savor-ui/commits/66e0a5be721e79525c1ea26fdfc455c70a083743))
17
+ * **card:** 新增`size`属性 ([b8847bb](https://gitee.com/mach552/savor-ui/commits/b8847bbd836b602467c34b6029c540c0a13bc8b6))
18
+ * **dropdown:** 新增`divider`属性 ([7e00c1d](https://gitee.com/mach552/savor-ui/commits/7e00c1d60c0db186b9f1fb3201cd7ed28b59c294))
19
+ * **menu:** 新增菜单项高度属性 ([57f2f15](https://gitee.com/mach552/savor-ui/commits/57f2f1517f8aa473ae7174605303b9c41fb71eee))
20
+ * **modal:** 新增分割线属性和额外内容插槽 ([7d67281](https://gitee.com/mach552/savor-ui/commits/7d67281fc1e162eb61936500a9775e1c9c2734a3))
21
+ * **notification:** 新增`notification`通知组件 ([dc8a727](https://gitee.com/mach552/savor-ui/commits/dc8a7272f25db93bb3ca2f0605842879499bec02))
22
+ * **overflow-list:** 新增折叠列表组件 ([8fc0209](https://gitee.com/mach552/savor-ui/commits/8fc020930c1a6a073b8ac7788c724906b5bdfe41))
23
+ * **tree:** 新增激活条属性 ([32681a6](https://gitee.com/mach552/savor-ui/commits/32681a612db83b6530a9cd6b838f8371a1ab00da))
24
+
25
+ ## [0.23.1](https://gitee.com/mach552/savor-ui/compare/v0.23.0...v0.23.1) (2026-08-19)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **form:** 恢复必填星号为图标 ([f0bda18](https://gitee.com/mach552/savor-ui/commits/f0bda1848a5f6e52cfc2747dcc36b16b04dd00ac))
31
+ * **icon-select:** 修复搜索框无法输入的问题 ([69de908](https://gitee.com/mach552/savor-ui/commits/69de908dd8d165a27abeec04134b0ab76a738fb5))
32
+ * **message:** 修复图标失效问题 ([567bb51](https://gitee.com/mach552/savor-ui/commits/567bb51daadb3c6302d0592bab5b867a0c170a1e))
33
+
5
34
  # [0.23.0](https://gitee.com/mach552/savor-ui/compare/v0.22.0...v0.23.0) (2026-08-18)
6
35
 
7
36
 
@@ -41,6 +41,8 @@ export * from './src/menu';
41
41
  export * from './src/message';
42
42
  export * from './src/meter-group';
43
43
  export * from './src/modal';
44
+ export * from './src/notification';
45
+ export * from './src/overflow-list';
44
46
  export * from './src/pagination';
45
47
  export * from './src/panel';
46
48
  export * from './src/popover';
@@ -13,6 +13,7 @@ import "./src/button/types.mjs";
13
13
  import "./src/back-top/index.mjs";
14
14
  import "./src/scrollbar/index.mjs";
15
15
  import "./src/auto-complete/index.mjs";
16
+ import "./src/avatar/types.mjs";
16
17
  import "./src/avatar/index.mjs";
17
18
  import "./src/badge/index.mjs";
18
19
  import "./src/button/index.mjs";
@@ -66,6 +67,9 @@ import "./src/message/index.mjs";
66
67
  import "./src/meter-group/index.mjs";
67
68
  import "./src/modal/method.mjs";
68
69
  import "./src/modal/index.mjs";
70
+ import "./src/notification/method.mjs";
71
+ import "./src/notification/index.mjs";
72
+ import "./src/overflow-list/index.mjs";
69
73
  import "./src/pagination/index.mjs";
70
74
  import "./src/panel/index.mjs";
71
75
  import "./src/progress/index.mjs";
@@ -0,0 +1,22 @@
1
+ import { AvatarGroupProps } from './types';
2
+ import { PublicProps, VNode } from 'vue';
3
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
+ props: PublicProps & __VLS_PrettifyLocal<AvatarGroupProps> & (typeof globalThis extends {
5
+ __VLS_PROPS_FALLBACK: infer P;
6
+ } ? P : {});
7
+ expose: (exposed: {}) => void;
8
+ attrs: any;
9
+ slots: {
10
+ default?: (props: {}) => any;
11
+ };
12
+ emit: {};
13
+ }>) => VNode & {
14
+ __ctx?: Awaited<typeof __VLS_setup>;
15
+ };
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
19
+ [K in keyof T]: T[K];
20
+ } : {
21
+ [K in keyof T as K]: T[K];
22
+ }) & {};
@@ -0,0 +1,44 @@
1
+ import { getSizeNum as e } from "../../../utils/src/tool.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
4
+ import "../../../hooks/index.mjs";
5
+ import { avatarGroupContextKey as n } from "./types.mjs";
6
+ import r from "./avatar.vue.mjs";
7
+ import { createComponent as i, createIf as a, createSlot as o, defineVaporComponent as s, onMounted as c, onUnmounted as l, provide as u, ref as d, renderEffect as f, setClass as p, setInsertionState as m, setStaticTemplateRef as h, setStyle as g, setText as _, template as v, toDisplayString as y, toRefs as b, unref as x, useTemplateRef as S, watch as C } from "vue";
8
+ //#region ../components/src/avatar/avatar-group.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
+ var w = v(" "), T = v("<div>", 1), E = /*@__PURE__*/ s({
10
+ name: "SAvatarGroup",
11
+ __name: "avatar-group",
12
+ props: {
13
+ size: { default: 40 },
14
+ circle: { type: Boolean },
15
+ max: {}
16
+ },
17
+ setup(s) {
18
+ let v = s, { size: E, circle: D } = b(v), O = t("avatar"), k = S("groupRef"), A = d(0), j = () => {
19
+ let e = k.value;
20
+ if (!e) return;
21
+ let t = v.max, n = O.e("excess"), r = Array.from(e.children).filter((e) => !e.classList.contains(n)), i = 0;
22
+ r.forEach((e, n) => {
23
+ t != null && n >= t ? (i++, e.style.display = "none") : e.style.display = "";
24
+ }), A.value = i;
25
+ }, M = null;
26
+ c(() => {
27
+ j(), M = new MutationObserver(j), M.observe(k.value, { childList: !0 });
28
+ }), l(() => {
29
+ M?.disconnect(), M = null;
30
+ }), C(() => v.max, j), u(n, {
31
+ size: E,
32
+ circle: D
33
+ });
34
+ let N = T();
35
+ return f(() => {
36
+ p(N, [x(O).e("group")]), g(N, { "--s-avatar-group-gap": `-${x(e)(x(E)) / 3}px` });
37
+ }), m(N, null, 0), o(), m(N, null, 1), a(() => A.value > 0, () => i(r, { class: () => x(O).e("excess") }, () => {
38
+ let e = w();
39
+ return f(() => _(e, " +" + y(A.value))), e;
40
+ })), h(N, k, null, "groupRef"), N;
41
+ }
42
+ });
43
+ //#endregion
44
+ export { E as default };
@@ -3,11 +3,12 @@ import "../../../utils/index.mjs";
3
3
  import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
4
4
  import "../../../hooks/index.mjs";
5
5
  import { EditLine as n } from "../../../icons/src/svg/editor/index.mjs";
6
- import { child as r, computed as i, createComponent as a, createIf as o, createInvoker as s, createSlot as c, defineVaporComponent as l, delegateEvents as u, renderEffect as d, setClass as f, setInsertionState as p, setStyle as m, template as h, unref as g } from "vue";
6
+ import { avatarGroupContextKey as r } from "./types.mjs";
7
+ import { child as i, computed as a, createComponent as o, createIf as s, createInvoker as c, createSlot as l, defineVaporComponent as u, delegateEvents as d, inject as f, renderEffect as p, setClass as m, setInsertionState as h, setStyle as g, template as _, unref as v } from "vue";
7
8
  //#region ../components/src/avatar/avatar.vue?vue&type=script&setup=true&vapor=true&lang.ts
8
- var _ = h("<div>"), v = h("<div><div></div>", 1);
9
- u("click");
10
- var y = /*@__PURE__*/ l({
9
+ var y = _("<div>"), b = _("<div><div></div>", 1);
10
+ d("click");
11
+ var x = /*@__PURE__*/ u({
11
12
  name: "SAvatar",
12
13
  __name: "avatar",
13
14
  props: {
@@ -17,30 +18,30 @@ var y = /*@__PURE__*/ l({
17
18
  edit: { type: Boolean }
18
19
  },
19
20
  emits: ["click"],
20
- setup(l, { emit: u }) {
21
- let h = l, y = t("avatar"), b = u, x = i(() => ({
22
- width: e(h.size),
23
- height: e(h.size),
24
- backgroundColor: h.bgColor || "var(--s-color-fill-2) "
25
- })), S = i(() => {
26
- let t = e(h.size);
21
+ setup(u, { emit: d }) {
22
+ let _ = u, x = t("avatar"), S = d, C = f(r, void 0), w = a(() => ({
23
+ width: e(C?.size.value || _.size),
24
+ height: e(C?.size.value || _.size),
25
+ backgroundColor: _.bgColor || "var(--s-color-fill-2) "
26
+ })), T = a(() => {
27
+ let t = e(C?.size.value || _.size);
27
28
  return { fontSize: Number(t.replace("px", "")) * .4 + "px" };
28
- }), C = i(() => {
29
- let t = e(h.size);
29
+ }), E = a(() => {
30
+ let t = e(_.size || C?.size.value);
30
31
  return { fontSize: Number(t.replace("px", "")) * .4 + "px" };
31
- }), w = (e) => {
32
- b("click", e);
33
- }, T = v(), E = r(T);
34
- return d(() => {
35
- let e = g(y);
36
- f(T, [e.b(), { [e.m("circle")]: l.circle }]), m(T, x.value), f(E, [e.e("content")]), m(E, S.value);
37
- }), p(E, null, 0), c(), p(T, null, 1), o(() => l.edit, () => {
38
- let e = _();
39
- return d(() => {
40
- f(e, [g(y).e("edit")]), m(e, C.value);
41
- }), p(e, null, 0), a(g(n)), e.$evtclick = s(w), e;
42
- }), T;
32
+ }), D = (e) => {
33
+ S("click", e);
34
+ }, O = b(), k = i(O);
35
+ return p(() => {
36
+ let e = v(x);
37
+ m(O, [e.b(), { [e.m("circle")]: u.circle || v(C)?.circle.value }]), g(O, w.value), m(k, [e.e("content")]), g(k, T.value);
38
+ }), h(k, null, 0), l(), h(O, null, 1), s(() => u.edit, () => {
39
+ let e = y();
40
+ return p(() => {
41
+ m(e, [v(x).e("edit")]), g(e, E.value);
42
+ }), h(e, null, 0), o(v(n)), e.$evtclick = c(D), e;
43
+ }), O;
43
44
  }
44
45
  });
45
46
  //#endregion
46
- export { y as default };
47
+ export { x as default };
@@ -21,4 +21,27 @@ export declare const SAvatar: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
21
21
  }>) => VNode & {
22
22
  __ctx?: Awaited<typeof __VLS_setup>;
23
23
  }) & Plugin;
24
+ export declare const SAvatarGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
25
+ attrs: any;
26
+ slots: {
27
+ default?: (props: {}) => any;
28
+ };
29
+ emit: {};
30
+ }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
31
+ props: PublicProps & {
32
+ size?: number | string | undefined;
33
+ circle?: boolean | undefined;
34
+ max?: number | undefined;
35
+ } & (typeof globalThis extends {
36
+ __VLS_PROPS_FALLBACK: infer P;
37
+ } ? P : {});
38
+ expose: (exposed: {}) => void;
39
+ attrs: any;
40
+ slots: {
41
+ default?: (props: {}) => any;
42
+ };
43
+ emit: {};
44
+ }>) => VNode & {
45
+ __ctx?: Awaited<typeof __VLS_setup>;
46
+ }) & Plugin;
24
47
  export * from './types';
@@ -1,7 +1,9 @@
1
1
  import { withInstall as e } from "../../../utils/src/install.mjs";
2
2
  import "../../../utils/index.mjs";
3
+ import "./types.mjs";
3
4
  import t from "./avatar.vue.mjs";
5
+ import n from "./avatar-group.vue.mjs";
4
6
  //#region ../components/src/avatar/index.ts
5
- var n = e(t);
7
+ var r = e(t), i = e(n);
6
8
  //#endregion
7
- export { n as SAvatar };
9
+ export { r as SAvatar, i as SAvatarGroup };
@@ -1,3 +1,4 @@
1
+ import { InjectionKey, Ref } from 'vue';
1
2
  export interface AvatarProps {
2
3
  /** 头像大小
3
4
  * @default 40px
@@ -19,3 +20,16 @@ export interface AvatarSlots {
19
20
  /** 默认插槽 */
20
21
  default?: () => any;
21
22
  }
23
+ export interface AvatarGroupProps {
24
+ /** 头像组大小 */
25
+ size?: number | string;
26
+ /** 是否圆形 */
27
+ circle?: boolean;
28
+ /** 最大显示数量 */
29
+ max?: number;
30
+ }
31
+ export interface AvatarGroupContext {
32
+ size: Ref<number | string>;
33
+ circle: Ref<boolean>;
34
+ }
35
+ export declare const avatarGroupContextKey: InjectionKey<AvatarGroupContext>;
@@ -0,0 +1,4 @@
1
+ //#region ../components/src/avatar/types.ts
2
+ var e = Symbol("AvatarGroupContextKey");
3
+ //#endregion
4
+ export { e as avatarGroupContextKey };
@@ -13,7 +13,8 @@ var p = d("<div>"), m = d("<div><div></div>"), h = d("<div><div>", 1), g = /*@__
13
13
  shadow: { default: "never" },
14
14
  bordered: { type: Boolean },
15
15
  bodyStyle: {},
16
- titleProps: {}
16
+ titleProps: {},
17
+ size: { default: "large" }
17
18
  },
18
19
  setup(o, { slots: d }) {
19
20
  let g = e("card"), _ = h(), v = n(_, 1);
@@ -21,6 +22,7 @@ var p = d("<div>"), m = d("<div><div></div>"), h = d("<div><div>", 1), g = /*@__
21
22
  let e = f(g);
22
23
  c(_, [
23
24
  e.b(),
25
+ e.m(o.size),
24
26
  e.m(o.shadow),
25
27
  { [e.m("bordered")]: o.bordered }
26
28
  ]);
@@ -14,6 +14,7 @@ export declare const SCard: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
14
14
  bordered?: boolean | undefined;
15
15
  bodyStyle?: Record<string, string> | undefined;
16
16
  titleProps?: TextProps | undefined;
17
+ size?: "mini" | "small" | "medium" | "large" | "larger" | undefined;
17
18
  } & (typeof globalThis extends {
18
19
  __VLS_PROPS_FALLBACK: infer P;
19
20
  } ? P : {});
@@ -14,6 +14,8 @@ export interface CardProps {
14
14
  bodyStyle?: Record<string, string>;
15
15
  /** 卡片标题属性 */
16
16
  titleProps?: TextProps;
17
+ /** 卡片大小(圆角) */
18
+ size?: "mini" | "small" | "medium" | "large" | "larger";
17
19
  }
18
20
  export interface CardSlots {
19
21
  /** 自定义卡片内容 */
@@ -1,35 +1,38 @@
1
1
  import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
2
2
  import "../../../hooks/index.mjs";
3
3
  import { SIcon as t } from "../icon/index.mjs";
4
- import { dropdownContextKey as n } from "./types.mjs";
5
- import { child as r, createComponent as i, createIf as a, createInvoker as o, createSlot as s, defineVaporComponent as c, delegateEvents as l, inject as u, renderEffect as d, setClass as f, setInsertionState as p, setText as m, template as h, toDisplayString as g, unref as _ } from "vue";
4
+ import { SDivider as n } from "../divider/index.mjs";
5
+ import { dropdownContextKey as r } from "./types.mjs";
6
+ import { child as i, createComponent as a, createIf as o, createInvoker as s, createSlot as c, defineVaporComponent as l, delegateEvents as u, inject as d, renderEffect as f, setClass as p, setInsertionState as m, setText as h, template as g, toDisplayString as _, unref as v } from "vue";
6
7
  //#region ../components/src/dropdown/doption.vue?vue&type=script&setup=true&vapor=true&lang.ts
7
- var v = h("<div>"), y = h(" "), b = h("<div><div></div>", 1);
8
- l("click");
9
- var x = /*@__PURE__*/ c({
8
+ var y = g("<div>"), b = g(" "), x = g("<div><div></div>");
9
+ u("click");
10
+ var S = /*@__PURE__*/ l({
10
11
  name: "SDoption",
11
12
  __name: "doption",
12
13
  props: {
13
14
  title: {},
14
15
  delayClose: { type: Boolean },
15
- icon: {}
16
+ icon: {},
17
+ divider: { type: Boolean }
16
18
  },
17
19
  emits: ["click"],
18
- setup(c, { emit: l, slots: h }) {
19
- let x = c, S = l, C = e("droption"), w = u(n, void 0), T = async () => {
20
- x.delayClose ? (await w?.itemClick?.(), S("click")) : (w?.itemClick?.(), S("click"));
21
- }, E = b(), D = r(E, 1);
22
- return d(() => f(E, [_(C).b()])), p(E, 0, 0), a(() => h.icon || c.icon, () => {
23
- let e = v();
24
- return d(() => f(e, [_(C).e("icon")])), p(e, null, 0), s("icon", null, () => i(_(t), { name: () => c.icon })), e;
25
- }), d(() => f(D, [_(C).e("title")])), p(D, null, 0), s("default", null, () => {
20
+ __multiRoot: !0,
21
+ setup(l, { emit: u, slots: g }) {
22
+ let S = l, C = u, w = e("droption"), T = d(r, void 0), E = async () => {
23
+ S.delayClose ? (await T?.itemClick?.(), C("click")) : (T?.itemClick?.(), C("click"));
24
+ }, D = o(() => l.divider, () => a(v(n), { margin: 4 })), O = x(), k = i(O, 1);
25
+ return f(() => p(O, [v(w).b()])), m(O, 0, 0), o(() => g.icon || l.icon, () => {
26
26
  let e = y();
27
- return d(() => m(e, g(c.title))), e;
28
- }), p(E, null, 2), a(() => h.extra, () => {
29
- let e = v();
30
- return d(() => f(e, [_(C).e("extra")])), p(e, null, 0), s("extra"), e;
31
- }), E.$evtclick = o(T), E;
27
+ return f(() => p(e, [v(w).e("icon")])), m(e, null, 0), c("icon", null, () => a(v(t), { name: () => l.icon })), e;
28
+ }), f(() => p(k, [v(w).e("title")])), m(k, null, 0), c("default", null, () => {
29
+ let e = b();
30
+ return f(() => h(e, _(l.title))), e;
31
+ }), m(O, null, 2), o(() => g.extra, () => {
32
+ let e = y();
33
+ return f(() => p(e, [v(w).e("extra")])), m(e, null, 0), c("extra"), e;
34
+ }), O.$evtclick = s(E), [D, O];
32
35
  }
33
36
  });
34
37
  //#endregion
35
- export { x as default };
38
+ export { S as default };
@@ -3,45 +3,48 @@ import "../../../hooks/index.mjs";
3
3
  import { RightLine as t } from "../../../icons/src/svg/arrow/index.mjs";
4
4
  import { SPopover as n } from "../popover/index.mjs";
5
5
  import { SIcon as r } from "../icon/index.mjs";
6
- import { dropdownContextKey as i } from "./types.mjs";
7
- 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, renderEffect as m, setClass as h, setInsertionState as g, setText as _, template as v, toDisplayString as y, unref as b } from "vue";
6
+ import { SDivider as i } from "../divider/index.mjs";
7
+ import { dropdownContextKey as a } from "./types.mjs";
8
+ import { child as o, createComponent as s, createIf as c, createInvoker as l, createSlot as u, defineVaporComponent as d, delegateEvents as f, inject as p, next as m, renderEffect as h, setClass as g, setInsertionState as _, setText as v, template as y, toDisplayString as b, unref as x } from "vue";
8
9
  //#region ../components/src/dropdown/dsubmenu.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
- var x = v("<div>"), S = v(" "), C = v("<div><div></div><div></div></div>"), w = v("<div>", 1);
10
- d("click");
11
- var T = /*@__PURE__*/ u({
10
+ var S = y("<div>"), C = y(" "), w = y("<div><div></div><div></div></div>");
11
+ f("click");
12
+ var T = /*@__PURE__*/ d({
12
13
  name: "SDsubmenu",
13
14
  __name: "dsubmenu",
14
15
  props: {
15
16
  title: {},
16
17
  popoverProps: {},
17
- icon: {}
18
+ icon: {},
19
+ divider: { type: Boolean }
18
20
  },
19
21
  emits: ["click"],
20
- setup(u, { emit: d, slots: v }) {
21
- let T = d, E = e("dsubmenu"), D = f(i, void 0), O = () => {
22
+ __multiRoot: !0,
23
+ setup(d, { emit: f, slots: y }) {
24
+ let T = f, E = e("dsubmenu"), D = p(a, void 0), O = () => {
22
25
  D?.itemClick?.(), T("click");
23
- }, k = w();
24
- return m(() => h(k, [b(E).b()])), g(k, null, 0), o(b(n), { $: [() => ({
26
+ }, k = c(() => d.divider, () => s(x(i), { margin: 4 })), A = S();
27
+ return h(() => g(A, [x(E).b()])), _(A, null, 0), s(x(n), { $: [() => ({
25
28
  teleportBody: !1,
26
29
  trigger: "hover",
27
30
  placement: "right-start",
28
- ...u.popoverProps
31
+ ...d.popoverProps
29
32
  })] }, {
30
33
  content: () => {
31
- let e = x();
32
- return m(() => h(e, b(E).e("list"))), g(e, null, 0), l("content"), e;
34
+ let e = S();
35
+ return h(() => g(e, x(E).e("list"))), _(e, null, 0), u("content"), e;
33
36
  },
34
37
  default: () => {
35
- let e = C(), n = a(e, 1), i = p(n, 2);
36
- return m(() => h(e, b(E).e("item"))), g(e, 0, 0), s(() => v.icon || u.icon, () => {
37
- let e = x();
38
- return m(() => h(e, [b(E).e("icon")])), g(e, null, 0), l("icon", null, () => o(b(r), { name: () => u.icon })), e;
39
- }), m(() => h(n, [b(E).e("title")])), g(n, null, 0), l("title", null, () => {
38
+ let e = w(), n = o(e, 1), i = m(n, 2);
39
+ return h(() => g(e, x(E).e("item"))), _(e, 0, 0), c(() => y.icon || d.icon, () => {
40
40
  let e = S();
41
- return m(() => _(e, y(u.title))), e;
42
- }), m(() => h(i, [b(E).e("arrow")])), g(i, null, 0), o(b(t)), e.$evtclick = c(O), e;
41
+ return h(() => g(e, [x(E).e("icon")])), _(e, null, 0), u("icon", null, () => s(x(r), { name: () => d.icon })), e;
42
+ }), h(() => g(n, [x(E).e("title")])), _(n, null, 0), u("title", null, () => {
43
+ let e = C();
44
+ return h(() => v(e, b(d.title))), e;
45
+ }), h(() => g(i, [x(E).e("arrow")])), _(i, null, 0), s(x(t)), e.$evtclick = l(O), e;
43
46
  }
44
- }), k;
47
+ }), [k, A];
45
48
  }
46
49
  });
47
50
  //#endregion
@@ -27,6 +27,7 @@ export declare const SDoption: ((__VLS_props: NonNullable<Awaited<typeof __VLS_s
27
27
  title?: string | undefined;
28
28
  delayClose?: boolean | undefined;
29
29
  icon?: string | undefined;
30
+ divider?: boolean | undefined;
30
31
  onClick?: (() => any) | undefined;
31
32
  } & (typeof globalThis extends {
32
33
  __VLS_PROPS_FALLBACK: infer P;
@@ -47,6 +48,7 @@ export declare const SDsubmenu: ((__VLS_props: NonNullable<Awaited<typeof __VLS_
47
48
  title?: string | undefined;
48
49
  popoverProps?: PopoverProps | undefined;
49
50
  icon?: string | undefined;
51
+ divider?: boolean | undefined;
50
52
  onClick?: (() => any) | undefined;
51
53
  } & (typeof globalThis extends {
52
54
  __VLS_PROPS_FALLBACK: infer P;
@@ -17,6 +17,8 @@ export interface DroptionProps {
17
17
  delayClose?: boolean;
18
18
  /** 图标 */
19
19
  icon?: string;
20
+ /** 分隔线 */
21
+ divider?: boolean;
20
22
  }
21
23
  export interface DroptionSlots {
22
24
  /** 默认 */
@@ -37,6 +39,8 @@ export interface DsubmenuProps {
37
39
  popoverProps?: PopoverProps;
38
40
  /** 图标 */
39
41
  icon?: string;
42
+ /** 分隔线 */
43
+ divider?: boolean;
40
44
  }
41
45
  export interface DsubmenuSlots {
42
46
  /** 默认 */