savor-ui 0.15.7 → 0.16.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 (24) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +35 -33
  3. package/dist/es/components/src/descriptions/descriptions.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
  4. package/dist/es/components/src/menu/index.d.ts +2 -0
  5. package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +6 -2
  6. package/dist/es/components/src/menu/types.d.ts +3 -0
  7. package/dist/es/components/src/statistic/index.d.ts +1 -0
  8. package/dist/es/components/src/statistic/statistic.vue_vue_type_script_setup_true_vapor_true_lang.mjs +52 -36
  9. package/dist/es/components/src/statistic/types.d.ts +2 -0
  10. package/dist/es/components/src/table/index.d.ts +7 -4
  11. package/dist/es/components/src/table/table-body.vue_vue_type_script_setup_true_vapor_true_lang.mjs +24 -35
  12. package/dist/es/components/src/table/table-header.vue_vue_type_script_setup_true_vapor_true_lang.mjs +51 -46
  13. package/dist/es/components/src/table/table.d.ts +5 -3
  14. package/dist/es/components/src/table/table.vue_vue_type_script_setup_true_vapor_true_lang.mjs +100 -82
  15. package/dist/es/components/src/table/types.d.ts +12 -1
  16. package/dist/es/components/src/tree/index.d.ts +3 -3
  17. package/dist/es/components/src/tree/tree.d.ts +2 -2
  18. package/dist/es/core/index.d.ts +1 -0
  19. package/dist/es/core/index.mjs +3 -2
  20. package/dist/es/theme/components/radio.scss +7 -0
  21. package/dist/json/vetur-attributes.json +20 -0
  22. package/dist/json/vetur-tags.json +8 -2
  23. package/dist/json/web-types.json +49 -1
  24. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
 
4
4
 
5
+ # [0.16.0](https://gitee.com/mach552/savor-ui/compare/v0.15.7...v0.16.0) (2026-08-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **descriptions:** 修复竖向布局时label宽度没有撑满的问题 ([d460cd0](https://gitee.com/mach552/savor-ui/commits/d460cd0a3df7c420a67e94a9deae7589a5bc7a1c))
11
+ * **radio:** 修复button的禁用样式无效问题 ([d647d8e](https://gitee.com/mach552/savor-ui/commits/d647d8e8e60b6cf41430b4ca0c6f44600cbef1d9))
12
+ * **statistic:** 修复动画无效的问题 ([3db3653](https://gitee.com/mach552/savor-ui/commits/3db3653c7ac933bcf4d554c5b39ab75ebbd10ea2))
13
+
14
+
15
+ ### Features
16
+
17
+ * **menu:** 新增滚动条属性 ([b6b3485](https://gitee.com/mach552/savor-ui/commits/b6b34857afb6aab2a0c7e4d897b55266ce8ec5d8))
18
+ * **table:** 新增隐藏头部属性 ([d1954d9](https://gitee.com/mach552/savor-ui/commits/d1954d978921f876a1230c43ff92d719645c1dcd))
19
+
5
20
  ## [0.15.7](https://gitee.com/mach552/savor-ui/compare/v0.15.6...v0.15.7) (2026-08-05)
6
21
 
7
22
 
@@ -1,9 +1,11 @@
1
- import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
1
+ import { getSize as e } from "../../../utils/src/tool.mjs";
2
+ import "../../../utils/index.mjs";
3
+ import { useNamespace as t } from "../../../hooks/src/use-namespace.mjs";
2
4
  import "../../../hooks/index.mjs";
3
- import { descriptionsContextKey as t } from "./types.mjs";
4
- import { child as n, computed as r, createSlot as i, defineVaporComponent as a, inject as o, next as s, onMounted as c, onUnmounted as l, renderEffect as u, setClass as d, setInsertionState as f, setStyle as p, setText as m, template as h, toDisplayString as g, unref as _, useId as v } from "vue";
5
+ import { descriptionsContextKey as n } from "./types.mjs";
6
+ import { child as r, computed as i, createSlot as a, defineVaporComponent as o, inject as s, next as c, onMounted as l, onUnmounted as u, renderEffect as d, setClass as f, setInsertionState as p, setStyle as m, setText as h, template as g, toDisplayString as _, unref as v, useId as y } from "vue";
5
7
  //#region ../components/src/descriptions/descriptions-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
6
- var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
8
+ var b = g(" "), x = g("<div><div></div><div>", 1), S = /*@__PURE__*/ o({
7
9
  name: "SDescriptionsItem",
8
10
  __name: "descriptions-item",
9
11
  props: {
@@ -12,51 +14,51 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
12
14
  labelWidth: {},
13
15
  labelAlign: {}
14
16
  },
15
- setup(a) {
16
- let h = a, x = e("descriptions"), S = o(t, void 0), C = "desc-item-" + v();
17
- c(() => {
18
- S?.addItem?.({
19
- uid: C,
20
- label: h.label,
21
- span: h.span,
22
- labelWidth: h.labelWidth,
23
- labelAlign: h.labelAlign
17
+ setup(o) {
18
+ let g = o, S = t("descriptions"), C = s(n, void 0), w = "desc-item-" + y();
19
+ l(() => {
20
+ C?.addItem?.({
21
+ uid: w,
22
+ label: g.label,
23
+ span: g.span,
24
+ labelWidth: g.labelWidth,
25
+ labelAlign: g.labelAlign
24
26
  });
25
- }), l(() => {
26
- S?.removeItem?.(C);
27
+ }), u(() => {
28
+ C?.removeItem?.(w);
27
29
  });
28
- let w = r(() => {
29
- if (!S?.positionList) return {
30
- gridColumn: `span ${h.span}`,
30
+ let T = i(() => {
31
+ if (!C?.positionList) return {
32
+ gridColumn: `span ${g.span}`,
31
33
  display: "flex",
32
34
  alignItems: "stretch"
33
35
  };
34
- let e = S.positionList.value[C];
36
+ let e = C.positionList.value[w];
35
37
  return e ? {
36
38
  gridColumn: `${e.start} / ${e.end}`,
37
39
  display: "flex",
38
40
  alignItems: "stretch"
39
41
  } : {
40
- gridColumn: `span ${h.span}`,
42
+ gridColumn: `span ${g.span}`,
41
43
  display: "flex",
42
44
  alignItems: "stretch"
43
45
  };
44
- }), T = r(() => {
45
- let e = S?.labelAlign || h.labelAlign, t = h.labelWidth || S?.labelWidth, n = {
46
- textAlign: e ?? "left",
46
+ }), E = i(() => {
47
+ let t = C?.labelAlign || g.labelAlign, n = C?.direction === "vertical" ? "100%" : g.labelWidth || C?.labelWidth, r = {
48
+ textAlign: t ?? "left",
47
49
  whiteSpace: "nowrap",
48
50
  flexShrink: "0"
49
51
  };
50
- return t != null && (n.width = typeof t == "number" ? `${t}px` : t), n;
51
- }), E = b(), D = n(E), O = s(D, 1);
52
- return u(() => {
53
- let e = _(x);
54
- d(E, [e.e("item")]), p(E, w.value), d(D, e.e("label")), p(D, T.value);
55
- }), f(D, null, 0), i("label", null, () => {
56
- let e = y();
57
- return u(() => m(e, g(a.label))), e;
58
- }), u(() => d(O, _(x).e("content"))), f(O, null, 0), i(), E;
52
+ return n != null && (r.width = e(n)), r;
53
+ }), D = x(), O = r(D), k = c(O, 1);
54
+ return d(() => {
55
+ let e = v(S);
56
+ f(D, [e.e("item")]), m(D, T.value), f(O, e.e("label")), m(O, E.value);
57
+ }), p(O, null, 0), a("label", null, () => {
58
+ let e = b();
59
+ return d(() => h(e, _(o.label))), e;
60
+ }), d(() => f(k, v(S).e("content"))), p(k, null, 0), a(), D;
59
61
  }
60
62
  });
61
63
  //#endregion
62
- export { x as default };
64
+ export { S as default };
@@ -16,7 +16,7 @@ var _ = m(" "), v = m("<div>"), y = m("<div><div>", 1), b = /*@__PURE__*/ o({
16
16
  labelAlign: { default: "left" },
17
17
  title: {},
18
18
  size: { default: "default" },
19
- labelWidth: { default: 120 },
19
+ labelWidth: { default: 100 },
20
20
  tableLayout: {}
21
21
  },
22
22
  setup(o, { slots: m }) {
@@ -1,5 +1,6 @@
1
1
  import { MenuGroupSlots, MenuItemSlots, MenuSlots, SubMenuSlots } from './types';
2
2
  import { PublicProps, VNode, Plugin } from 'vue';
3
+ import { ScrollbarProps } from '../scrollbar';
3
4
  export declare const SMenuGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
5
  attrs: any;
5
6
  slots: MenuGroupSlots;
@@ -53,6 +54,7 @@ export declare const SMenu: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setu
53
54
  openKeys?: (string[] & (string | number)[]) | undefined;
54
55
  selectedKey?: string | undefined;
55
56
  accordion?: boolean | undefined;
57
+ scrollbarProps?: ScrollbarProps | undefined;
56
58
  activeKey?: string | number | undefined;
57
59
  onItemClick?: ((name: string | number, item: any) => any) | undefined;
58
60
  onOpenChange?: ((keys: string[]) => any) | undefined;
@@ -16,7 +16,8 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
16
16
  collapsedWidth: { default: 48 },
17
17
  openKeys: {},
18
18
  selectedKey: {},
19
- accordion: { type: Boolean }
19
+ accordion: { type: Boolean },
20
+ scrollbarProps: {}
20
21
  }, {
21
22
  activeKey: {},
22
23
  activeKeyModifiers: {},
@@ -55,7 +56,10 @@ var S = _("<div>"), C = _("<div>", 1), w = /*@__PURE__*/ c({
55
56
  let R = C();
56
57
  return f(() => {
57
58
  p(R, [y(T).b()]), g(R, E.value);
58
- }), m(R, null, 0), o(y(r), { padding: "4px" }, () => {
59
+ }), m(R, null, 0), o(y(r), { $: [() => ({
60
+ padding: "4px",
61
+ ...c.scrollbarProps
62
+ })] }, () => {
59
63
  let e = S();
60
64
  return f(() => p(e, [y(T).e("content")])), m(e, null, 0), s(), e;
61
65
  }), h(R, L, null, "menuRef"), R;
@@ -1,4 +1,5 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
+ import { ScrollbarProps } from '../scrollbar';
2
3
  export interface MenuProps {
3
4
  /** 是否折叠 */
4
5
  collapsed?: boolean;
@@ -12,6 +13,8 @@ export interface MenuProps {
12
13
  selectedKey?: string;
13
14
  /** 是否开启手风琴模式 */
14
15
  accordion?: boolean;
16
+ /** 滚动条属性 */
17
+ scrollbarProps?: ScrollbarProps;
15
18
  }
16
19
  export interface MenuSlots {
17
20
  /** 默认 */
@@ -12,6 +12,7 @@ export declare const SStatistic: ((__VLS_props: NonNullable<Awaited<typeof __VLS
12
12
  precision?: number | undefined;
13
13
  showGroupSeparator?: boolean | undefined;
14
14
  animation?: boolean | undefined;
15
+ duration?: number | undefined;
15
16
  countdown?: boolean | undefined;
16
17
  format?: string | undefined;
17
18
  start?: boolean | undefined;
@@ -8,68 +8,84 @@ import y from "dayjs/plugin/duration";
8
8
  //#region ../components/src/statistic/statistic.vue?vue&type=script&setup=true&vapor=true&lang.ts
9
9
  var b = m(" "), x = m("<div>"), S = m("<div><div> </div>", 1), C = /*@__PURE__*/ o({
10
10
  name: "SStatistic",
11
+ inheritAttrs: !1,
11
12
  __name: "statistic",
12
13
  props: {
13
14
  title: {},
14
15
  value: {},
15
16
  extra: {},
16
- precision: { default: void 0 },
17
- showGroupSeparator: {
18
- type: Boolean,
19
- default: !1
20
- },
21
- animation: {
22
- type: Boolean,
23
- default: !1
24
- },
25
- countdown: {
26
- type: Boolean,
27
- default: !1
28
- },
17
+ precision: {},
18
+ showGroupSeparator: { type: Boolean },
19
+ animation: { type: Boolean },
20
+ duration: { default: 1e3 },
21
+ countdown: { type: Boolean },
29
22
  format: { default: "HH:mm:ss" },
30
- start: {
31
- type: Boolean,
32
- default: !1
33
- },
23
+ start: { type: Boolean },
34
24
  valueStyle: { default: () => ({}) }
35
25
  },
36
26
  emits: ["stop"],
37
27
  setup(o, { emit: m, slots: C }) {
38
28
  v.extend(y);
39
- let w = o, T = m, E = t("statistic"), D = c(w.value), O = null, k = c(0), A = r(() => {
29
+ let w = o, T = m, E = t("statistic"), D = c(w.value), O = null, k = c(0), A = c(null), j = null, M = (e, t, n, r) => {
30
+ if (j &&= (j(), null), e <= 0) {
31
+ r(n);
32
+ return;
33
+ }
34
+ let i = performance.now(), a, o = () => {
35
+ let s = performance.now() - i, c = Math.min(s / e, 1);
36
+ r(t + (n - t) * c), !(c >= 1) && (a = requestAnimationFrame(o));
37
+ };
38
+ a = requestAnimationFrame(o), j = () => cancelAnimationFrame(a);
39
+ }, N = () => {
40
+ T("stop"), O &&= (clearInterval(O), null);
41
+ }, P = () => {
42
+ O ||= window.setInterval(() => {
43
+ k.value++, D.value - Date.now() <= 0 && N();
44
+ }, 1e3);
45
+ }, F = r(() => {
40
46
  if (w.countdown) {
41
47
  k.value;
42
48
  let e = Date.now(), t = Math.max(0, D.value - e);
43
- return t <= 0 ? (M(), "00:00:00") : v.duration(t).format(w.format);
49
+ return t <= 0 ? v.duration(0).format(w.format) : v.duration(t).format(w.format);
44
50
  }
45
- let t = Number(w.value) || 0, n = t.toFixed(w.precision ?? t.toString().split(".").length - 1);
46
- return w.showGroupSeparator && (n = e(n)), n;
47
- }), j = () => {
48
- O ||= window.setInterval(() => {
49
- k.value++, D.value - Date.now() <= 0 && M();
50
- }, 1e3);
51
- }, M = () => {
52
- T("stop"), O && clearInterval(O), O = null;
53
- };
54
- _(() => w.start, (e) => e ? j() : M(), { immediate: !0 }), _(() => w.value, (e) => {
55
- M(), D.value = e, k.value++, w.start && j();
56
- }), s(M);
57
- let N = S(), P = n(N, 1), F = n(P, 1);
58
- return l(() => u(N, [g(E).b()])), d(N, 0, 0), i(() => o.title || C.title, () => {
51
+ let t = Number(w.value) || 0, n = A.value ?? t, r;
52
+ if (w.precision !== void 0) r = n.toFixed(w.precision);
53
+ else {
54
+ let e = t.toString(), i = e.indexOf("."), a = i > -1 ? e.length - i - 1 : 0;
55
+ r = n.toFixed(a);
56
+ }
57
+ return w.showGroupSeparator && (r = e(r)), r;
58
+ });
59
+ _(() => w.value, (e, t) => {
60
+ let n = Number(e) || 0, r = Number(t) || 0;
61
+ if (w.countdown) {
62
+ N(), D.value = n, k.value++, w.start && P();
63
+ return;
64
+ }
65
+ w.animation ? M(w.duration, r, n, (e) => {
66
+ A.value = e;
67
+ }) : A.value = null;
68
+ }, { immediate: !0 }), _(() => w.start, (e) => {
69
+ e ? P() : N();
70
+ }, { immediate: !0 }), s(() => {
71
+ N(), j && j();
72
+ });
73
+ let I = S(), L = n(I, 1), R = n(L, 1);
74
+ return l(() => u(I, [g(E).b()])), d(I, 0, 0), i(() => o.title || C.title, () => {
59
75
  let e = x();
60
76
  return l(() => u(e, [g(E).e("title")])), d(e, null, 0), a("title", null, () => {
61
77
  let e = b();
62
78
  return l(() => p(e, h(o.title))), e;
63
79
  }), e;
64
80
  }), l(() => {
65
- u(P, [g(E).e("value")]), f(P, o.valueStyle);
66
- }), d(P, 0, 0), a("prefix"), l(() => p(F, " " + h(A.value) + " ")), d(P, null, 2), a("suffix"), d(N, null, 2), i(() => o.extra || C.extra, () => {
81
+ u(L, [g(E).e("value")]), f(L, o.valueStyle);
82
+ }), d(L, 0, 0), a("prefix"), l(() => p(R, " " + h(F.value) + " ")), d(L, null, 2), a("suffix"), d(I, null, 2), i(() => o.extra || C.extra, () => {
67
83
  let e = x();
68
84
  return l(() => u(e, [g(E).e("extra")])), d(e, null, 0), a("extra", null, () => {
69
85
  let e = b();
70
86
  return l(() => p(e, h(o.extra))), e;
71
87
  }), e;
72
- }), N;
88
+ }), I;
73
89
  }
74
90
  });
75
91
  //#endregion
@@ -11,6 +11,8 @@ export interface StatisticProps {
11
11
  showGroupSeparator?: boolean;
12
12
  /** 动画 */
13
13
  animation?: boolean;
14
+ /** 动画时长 */
15
+ duration?: number;
14
16
  /** 倒计时 */
15
17
  countdown?: boolean;
16
18
  /** 格式 */
@@ -3,7 +3,7 @@ import { PublicProps, ShallowUnwrapRef, VNode, Plugin } from 'vue';
3
3
  export declare const STable: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
4
4
  attrs: any;
5
5
  slots: TableAllSlots;
6
- emit: (((evt: "checkRow", row: any, index: number, checked: any[]) => void) & ((evt: "selectRow", row: any, index: number) => void) & ((evt: "expandedRow", row: any, index: number, expandedRows: any[]) => void) & ((evt: "checkAll", checked: any[]) => void)) & (((event: "update:checked", value: any[]) => void) & ((event: "update:selected", value: any) => void));
6
+ emit: (((evt: "checkRow", row: any, index: number, checked: any[]) => void) & ((evt: "selectRow", row: any, index: number) => void) & ((evt: "expandedRow", row: any, index: number, expandedRows: any[]) => void) & ((evt: "checkAll", checked: any[]) => void)) & (((event: "update:expandedKeys", value: (string | number)[]) => void) & ((event: "update:checkedKeys", value: (string | number)[]) => void) & ((event: "update:selected", value: any) => void));
7
7
  }, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
8
  props: PublicProps & {
9
9
  data: any[];
@@ -19,13 +19,16 @@ export declare const STable: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
19
19
  rowKey?: string | undefined;
20
20
  scrollAlways?: boolean | undefined;
21
21
  nativeScrollbar?: boolean | undefined;
22
- checked?: any[] | undefined;
22
+ hideHeader?: boolean | undefined;
23
+ checkedKeys?: (string | number)[] | undefined;
24
+ expandedKeys?: (string | number)[] | undefined;
23
25
  selected?: any;
26
+ "onUpdate:expandedKeys"?: ((value: (string | number)[]) => any) | undefined;
24
27
  onCheckRow?: ((row: any, index: number, checked: any[]) => any) | undefined;
25
28
  onSelectRow?: ((row: any, index: number) => any) | undefined;
26
29
  onExpandedRow?: ((row: any, index: number, expandedRows: any[]) => any) | undefined;
27
30
  onCheckAll?: ((checked: any[]) => any) | undefined;
28
- "onUpdate:checked"?: ((value: any[]) => any) | undefined;
31
+ "onUpdate:checkedKeys"?: ((value: (string | number)[]) => any) | undefined;
29
32
  "onUpdate:selected"?: ((value: any) => any) | undefined;
30
33
  } & (typeof globalThis extends {
31
34
  __VLS_PROPS_FALLBACK: infer P;
@@ -33,7 +36,7 @@ export declare const STable: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
33
36
  expose: (exposed: ShallowUnwrapRef<TableExpose>) => void;
34
37
  attrs: any;
35
38
  slots: TableAllSlots;
36
- emit: (((evt: "checkRow", row: any, index: number, checked: any[]) => void) & ((evt: "selectRow", row: any, index: number) => void) & ((evt: "expandedRow", row: any, index: number, expandedRows: any[]) => void) & ((evt: "checkAll", checked: any[]) => void)) & (((event: "update:checked", value: any[]) => void) & ((event: "update:selected", value: any) => void));
39
+ emit: (((evt: "checkRow", row: any, index: number, checked: any[]) => void) & ((evt: "selectRow", row: any, index: number) => void) & ((evt: "expandedRow", row: any, index: number, expandedRows: any[]) => void) & ((evt: "checkAll", checked: any[]) => void)) & (((event: "update:expandedKeys", value: (string | number)[]) => void) & ((event: "update:checkedKeys", value: (string | number)[]) => void) & ((event: "update:selected", value: any) => void));
37
40
  }>) => VNode & {
38
41
  __ctx?: Awaited<typeof __VLS_setup>;
39
42
  }) & Plugin;
@@ -7,9 +7,9 @@ import "../../../icons/index.mjs";
7
7
  import { STooltip as i } from "../tooltip/index.mjs";
8
8
  import { SCheckbox as a } from "../checkbox/index.mjs";
9
9
  import { tableContextKey as o } from "./types.mjs";
10
- import { child as s, computed as c, createComponent as l, createFor as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, inject as _, nextTick as v, ref as y, renderEffect as b, setClass as x, setInsertionState as S, setProp as C, setStyle as w, setText as T, template as E, toDisplayString as D, txt as O, unref as k, watch as A } from "vue";
10
+ import { child as s, computed as c, createComponent as l, createFor as u, createIf as d, createInvoker as f, createSlot as p, createTemplateRefSetter as m, defineVaporComponent as h, delegateEvents as g, inject as _, nextTick as v, ref as y, renderEffect as b, setClass as x, setInsertionState as S, setProp as C, setStyle as w, setText as T, template as E, toDisplayString as D, txt as O, unref as k, watch as ee } from "vue";
11
11
  //#region ../components/src/table/table-body.vue?vue&type=script&setup=true&vapor=true&lang.ts
12
- var j = E("<td><div>"), M = E("<span>"), N = E("<div>"), P = E("<div><div> </div>"), F = E("<div><div> "), ee = E("<td>"), te = E("<tr>"), I = E("<tbody>", 1);
12
+ var A = E("<td><div>"), j = E("<span>"), M = E("<div>"), N = E("<div><div> </div>"), P = E("<div><div> "), F = E("<td>"), I = E("<tr>"), te = E("<tbody>", 1);
13
13
  g("click");
14
14
  var L = /*@__PURE__*/ h({
15
15
  __name: "table-body",
@@ -30,7 +30,7 @@ var L = /*@__PURE__*/ h({
30
30
  }), B.value = t;
31
31
  });
32
32
  };
33
- A(() => E.data, () => {
33
+ ee(() => E.data, () => {
34
34
  U();
35
35
  }, {
36
36
  flush: "post",
@@ -42,40 +42,29 @@ var L = /*@__PURE__*/ h({
42
42
  }, G = (e, n) => t(e, n), K = c(() => z?.flatColumns.value || []), q = c(() => z?.props.stripe ?? !1), J = c(() => z?.isScrollAtLeft.value ?? !0), Y = c(() => z?.isScrollAtRight.value ?? !1), X = (e) => {
43
43
  let t = {};
44
44
  return e.width === "auto" && (t.whiteSpace = "nowrap"), e.fixed && e.fixedOffset !== void 0 && (t.position = "sticky", t[e.fixed] = `${e.fixedOffset}px`, t.zIndex = 1), t;
45
- }, Z = c(() => {
46
- let e = z?.checked.value ?? [];
47
- return new Set(e.map((e) => e._id));
48
- }), Q = (e) => Z.value.has(e._id), ne = (e, t, n) => {
49
- let r = z?.checked.value ?? [], i;
50
- if (z?.props?.multiple) {
51
- let n = r.findIndex((e) => e._id === t._id);
52
- if (e) if (n === -1) {
53
- let e = E.data.find((e) => e._id === t._id);
54
- i = [...r, e];
55
- } else i = [...r];
56
- else i = n === -1 ? [...r] : r.toSpliced(n, 1);
57
- } else i = e ? [E.data.find((e) => e._id === t._id)] : [];
58
- L("checkRow", t, n, i);
59
- }, re = (e) => {
60
- let t = z?.selected.value;
61
- return t && t._id === e._id;
45
+ }, Z = (e) => z?.getRowKey(e) ?? e._id, ne = c(() => new Set(z?.checkedKeys.value ?? [])), Q = (e) => ne.value.has(Z(e)), re = (e, t, n) => {
46
+ let r = z?.checkedKeys.value ?? [], i = Z(t), a;
47
+ a = z?.props?.multiple ? e ? r.includes(i) ? [...r] : [...r, i] : r.filter((e) => e !== i) : e ? [i] : [], L("checkRow", t, n, (E.data ?? []).filter((e) => a.includes(Z(e))));
62
48
  }, ie = (e) => {
49
+ let t = z?.selected.value;
50
+ return t && Z(t) === Z(e);
51
+ }, ae = (e) => {
63
52
  if (!z?.props?.rowSelection) return;
64
53
  let t = z?.selected.value;
65
- L("selectRow", t && t._id === e._id ? {} : e, E.data.indexOf(e));
66
- }, ae = m(), $ = I();
54
+ L("selectRow", t && Z(t) === Z(e) ? {} : e, E.data.indexOf(e));
55
+ }, oe = m(), $ = te();
67
56
  return S($, null, 0), u(() => E.data, (e, t) => {
68
- let n = te();
57
+ let n = I();
69
58
  return b(() => {
70
59
  let r = k(R), i = e.value;
71
60
  x(n, [
72
61
  r.e("body-row"),
73
62
  r.is("stripe", q.value && t.value % 2 == 1),
74
- r.is("selected", re(i) || Q(i)),
63
+ r.is("selected", ie(i) || Q(i)),
75
64
  r.is("selection", k(z)?.props?.rowSelection)
76
65
  ]);
77
66
  }), S(n, null, 0), u(() => K.value, (n, o) => d(() => n.value.type === "select", () => {
78
- let r = j(), i = s(r);
67
+ let r = A(), i = s(r);
79
68
  b(() => {
80
69
  let e = k(R), t = n.value, a = t.fixed;
81
70
  x(r, [
@@ -87,13 +76,13 @@ var L = /*@__PURE__*/ h({
87
76
  { [e.m("body-cell", "align", t.align)]: t.align }
88
77
  ]), w(r, X(t)), x(i, [e.e("body-cell-content")]);
89
78
  }), S(i, null, 0);
90
- let o = (n) => ne(n, e.value, t.value);
79
+ let o = (n) => re(n, e.value, t.value);
91
80
  return l(k(a), {
92
81
  "model-value": () => Q(e.value),
93
82
  onChange: () => o
94
83
  }), r;
95
84
  }, () => {
96
- let a = ee();
85
+ let a = F();
97
86
  return b(() => {
98
87
  let e = k(R), t = n.value, r = t.fixed;
99
88
  x(a, [
@@ -106,11 +95,11 @@ var L = /*@__PURE__*/ h({
106
95
  { [e.m("body-cell", "align", t.align)]: t.align }
107
96
  ]), w(a, X(t));
108
97
  }), S(a, null, 0), d(() => n.value.slot, () => {
109
- let i = N();
98
+ let i = M();
110
99
  return b(() => {
111
100
  x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
112
101
  }), S(i, null, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
113
- let n = M();
102
+ let n = j();
114
103
  return b(() => {
115
104
  let t = k(R);
116
105
  x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
@@ -125,11 +114,11 @@ var L = /*@__PURE__*/ h({
125
114
  mini: "",
126
115
  disabled: () => B.value[t.value + "_" + o.value] !== !0
127
116
  }, () => {
128
- let i = P(), a = s(i, 1);
117
+ let i = N(), a = s(i, 1);
129
118
  b(() => {
130
119
  x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
131
120
  }), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
132
- let n = M();
121
+ let n = j();
133
122
  return b(() => {
134
123
  let t = k(R);
135
124
  x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
@@ -137,14 +126,14 @@ var L = /*@__PURE__*/ h({
137
126
  });
138
127
  let c = O(a);
139
128
  return b(() => {
140
- x(a, k(R).e("body-cell-text")), T(c, D(G(e.value, n.value.field))), ae(a, (e) => H(e, t.value + "_" + o.value), !0);
129
+ x(a, k(R).e("body-cell-text")), T(c, D(G(e.value, n.value.field))), oe(a, (e) => H(e, t.value + "_" + o.value), !0);
141
130
  }), i;
142
131
  }), () => {
143
- let i = F(), a = s(i, 1);
132
+ let i = P(), a = s(i, 1);
144
133
  b(() => {
145
134
  x(i, [k(R).e("body-cell-content")]), w(i, { paddingLeft: n.value.treeNode ? (e.value._level || 0) * 24 + "px" : "0px" });
146
135
  }), S(i, 0, 0), d(() => e.value._hasChildren && n.value.treeNode, () => {
147
- let n = M();
136
+ let n = j();
148
137
  return b(() => {
149
138
  let t = k(R);
150
139
  x(n, [t.e("tree-node-arrow"), t.is("expanded", e.value._expanded)]);
@@ -155,7 +144,7 @@ var L = /*@__PURE__*/ h({
155
144
  x(a, k(R).e("body-cell-text")), T(o, D(G(e.value, n.value.field)));
156
145
  }), i;
157
146
  }, 1285), 773), a;
158
- }, 266), (e, t) => t, 17), n.$evtclick = f(() => ie(e.value)), n;
147
+ }, 266), (e, t) => t, 17), n.$evtclick = f(() => ae(e.value)), n;
159
148
  }, (e, t) => t, 9), C($, "tabindex", -1), $;
160
149
  }
161
150
  });