@done-coding/admin-core 0.8.3-alpha.0 → 0.9.1-alpha.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 (127) hide show
  1. package/docs/nested-config-paradigm.md +80 -0
  2. package/es/bridge/config-hook.mjs +37 -0
  3. package/es/bridge/index.mjs +157 -62
  4. package/es/bridge/plugin.mjs +29 -0
  5. package/es/bridge/theme.mjs +65 -0
  6. package/es/components/app-layout/AppBody.vue.mjs +1 -1
  7. package/es/components/app-layout/AppBody.vue2.mjs +47 -49
  8. package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
  9. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
  10. package/es/components/app-layout/AppFooter.vue.mjs +2 -2
  11. package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
  12. package/es/components/app-layout/AppHeader.vue.mjs +1 -1
  13. package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
  14. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  15. package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
  16. package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
  17. package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
  18. package/es/components/app-layout/AppTheme.vue.mjs +7 -0
  19. package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
  20. package/es/components/data-view/DataListView.vue.mjs +2 -2
  21. package/es/components/data-view/DataListView.vue2.mjs +36 -36
  22. package/es/components/display/ActionConfirm.vue2.mjs +16 -16
  23. package/es/components/display/HeightProvider.vue.mjs +10 -10
  24. package/es/components/display/TabsHeader.vue.mjs +4 -4
  25. package/es/components/display/TabsHeader.vue2.mjs +34 -34
  26. package/es/components/display/TabsMain.vue.mjs +40 -39
  27. package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
  28. package/es/components/form/FormItem.vue.mjs +1 -1
  29. package/es/components/form/FormItem.vue2.mjs +75 -81
  30. package/es/components/form/FormItemNestForm.vue.mjs +7 -0
  31. package/es/components/form/FormItemNestForm.vue2.mjs +49 -0
  32. package/es/components/form/FormItemNestFormList.vue.mjs +7 -0
  33. package/es/components/form/FormItemNestFormList.vue2.mjs +137 -0
  34. package/es/components/form/FormMain.vue.mjs +5 -147
  35. package/es/components/form/FormMain.vue2.mjs +160 -2
  36. package/es/components/form/FormRadioGroup.vue.mjs +42 -49
  37. package/es/components/form/FormSearch.vue.mjs +2 -2
  38. package/es/components/form/FormSearch.vue2.mjs +122 -128
  39. package/es/components/form/FormSelect.vue.mjs +34 -40
  40. package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
  41. package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
  42. package/es/components/form/FormSubmitPanel.vue2.mjs +29 -28
  43. package/es/components/form/FormTree.vue.mjs +16 -21
  44. package/es/components/form/FormVerifyCode.vue.mjs +37 -43
  45. package/es/components/form/FormVerifyImage.vue.mjs +2 -2
  46. package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
  47. package/es/components/form/nest-form-item-list.mjs +71 -0
  48. package/es/components/form/nest-form-item.mjs +42 -0
  49. package/es/components/form/nest-registry.mjs +7 -0
  50. package/es/components/form/use-nest-form-list.mjs +22 -0
  51. package/es/components/form/use-nest-form.mjs +34 -0
  52. package/es/components/form/use-nest-layout-scale.mjs +14 -0
  53. package/es/components/form/utils.mjs +77 -61
  54. package/es/components/list-page/ListPage.vue.mjs +2 -2
  55. package/es/components/list-page/ListPage.vue2.mjs +134 -139
  56. package/es/components/menu/MenuItemSub.vue.mjs +41 -48
  57. package/es/components/menu/MenuTree.vue.mjs +58 -65
  58. package/es/components/misc/AutoRefresh.vue.mjs +2 -2
  59. package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
  60. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  61. package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
  62. package/es/components/modal/ConfirmModal.vue.mjs +3 -4
  63. package/es/components/modal/ConfirmModal.vue2.mjs +83 -111
  64. package/es/components/modal/DetailModal.vue.mjs +38 -41
  65. package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
  66. package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
  67. package/es/components/panel/PanelItemNestForm.vue.mjs +7 -0
  68. package/es/components/panel/PanelItemNestForm.vue2.mjs +69 -0
  69. package/es/components/panel/PanelItemNestPanel.vue.mjs +34 -0
  70. package/es/components/panel/PanelItemNestPanel.vue2.mjs +4 -0
  71. package/es/components/panel/PanelMain.vue.mjs +1 -1
  72. package/es/components/panel/PanelMain.vue2.mjs +72 -72
  73. package/es/components/panel/nest-panel-form.mjs +53 -0
  74. package/es/components/panel/nest-panel-item.mjs +25 -0
  75. package/es/components/table/TableMain.vue.mjs +2 -2
  76. package/es/components/table/TableMain.vue2.mjs +221 -229
  77. package/es/components/table/TableToolbar.vue.mjs +2 -2
  78. package/es/components/table/TableToolbar.vue2.mjs +115 -126
  79. package/es/hooks/use-admin-theme-apply.mjs +84 -0
  80. package/es/hooks/use-admin-viewport-apply.mjs +27 -0
  81. package/es/index.mjs +190 -153
  82. package/es/inject/key.mjs +15 -6
  83. package/es/store/app.mjs +75 -84
  84. package/es/style.css +1 -1
  85. package/es/utils/theme-scale.mjs +37 -0
  86. package/package.json +2 -4
  87. package/types/bridge/config-hook.d.ts +91 -0
  88. package/types/bridge/index.d.ts +108 -8
  89. package/types/bridge/plugin.d.ts +39 -0
  90. package/types/bridge/theme.d.ts +85 -0
  91. package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
  92. package/types/components/app-layout/types.d.ts +1 -1
  93. package/types/components/form/FormItem.vue.d.ts +12 -12
  94. package/types/components/form/FormItemNestForm.vue.d.ts +36 -0
  95. package/types/components/form/FormItemNestFormList.vue.d.ts +63 -0
  96. package/types/components/form/FormMain.vue.d.ts +2 -2
  97. package/types/components/form/FormSearch.vue.d.ts +2 -2
  98. package/types/components/form/FormTree.vue.d.ts +50 -50
  99. package/types/components/form/index.d.ts +9 -1
  100. package/types/components/form/nest-form-item-list.d.ts +63 -0
  101. package/types/components/form/nest-form-item.d.ts +36 -0
  102. package/types/components/form/nest-registry.d.ts +22 -0
  103. package/types/components/form/types.d.ts +2 -0
  104. package/types/components/form/use-nest-form-list.d.ts +20 -0
  105. package/types/components/form/use-nest-form.d.ts +26 -0
  106. package/types/components/form/use-nest-layout-scale.d.ts +17 -0
  107. package/types/components/form/utils.d.ts +26 -1
  108. package/types/components/menu/MenuTree.vue.d.ts +10 -10
  109. package/types/components/modal/ModalShelf.vue.d.ts +1 -1
  110. package/types/components/panel/PanelItemNestForm.vue.d.ts +35 -0
  111. package/types/components/panel/PanelItemNestPanel.vue.d.ts +22 -0
  112. package/types/components/panel/index.d.ts +5 -1
  113. package/types/components/panel/nest-panel-form.d.ts +38 -0
  114. package/types/components/panel/nest-panel-item.d.ts +28 -0
  115. package/types/components/panel/types.d.ts +2 -0
  116. package/types/components/table/TableMain.vue.d.ts +3 -3
  117. package/types/hooks/activated.d.ts +2 -2
  118. package/types/hooks/feel-size.d.ts +1 -1
  119. package/types/hooks/index.d.ts +2 -0
  120. package/types/hooks/menus-dispatch.d.ts +5 -5
  121. package/types/hooks/use-admin-theme-apply.d.ts +17 -0
  122. package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
  123. package/types/hooks/use-breakpoint.d.ts +1 -1
  124. package/types/inject/key.d.ts +46 -1
  125. package/types/store/app.d.ts +138 -59
  126. package/types/utils/index.d.ts +1 -0
  127. package/types/utils/theme-scale.d.ts +35 -0
@@ -1,13 +1,10 @@
1
- import { ElTooltip as T, ElIcon as H } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/tooltip/style/css";
4
- import "element-plus/es/components/icon/style/css";
5
- import { defineComponent as P, useCssVars as w, unref as o, inject as A, computed as e, ref as b, toRefs as F, openBlock as f, createElementBlock as I, normalizeStyle as g, createVNode as a, withCtx as p, renderSlot as v, createElementVNode as h, createBlock as L, createCommentVNode as V } from "vue";
6
- import N from "../menu/MenuTree.vue.mjs";
7
- import y from "../display/WatchSize.vue.mjs";
8
- import { ArrowRightBold as R } from "@element-plus/icons-vue";
9
- import { APP_LAYOUT_APP_STORE_KEY as M } from "../../inject/key.mjs";
10
- const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
1
+ import { defineComponent as w, useCssVars as A, inject as f, computed as e, ref as b, openBlock as g, createElementBlock as T, normalizeStyle as h, createVNode as l, unref as o, withCtx as u, renderSlot as C, createElementVNode as y, createBlock as H, createCommentVNode as L } from "vue";
2
+ import F from "../menu/MenuTree.vue.mjs";
3
+ import S from "../display/WatchSize.vue.mjs";
4
+ import { ElTooltip as I, ElIcon as V } from "element-plus";
5
+ import { ArrowRightBold as Y } from "@element-plus/icons-vue";
6
+ import { APP_LAYOUT_APP_STORE_KEY as N, APP_LAYOUT_BRIDGE_KEY as O } from "../../inject/key.mjs";
7
+ const R = { class: "app-sidebar-shim" }, G = /* @__PURE__ */ w({
11
8
  __name: "AppSidebar",
12
9
  props: {
13
10
  show: { type: Boolean },
@@ -16,82 +13,82 @@ const O = { class: "app-sidebar-shim" }, J = /* @__PURE__ */ P({
16
13
  menuFlatList: {}
17
14
  },
18
15
  setup(s) {
19
- w((c) => ({
20
- ce9ef212: o(E),
21
- v309db2c2: o(x),
22
- v2189b8a1: o(_),
23
- v65908f82: o(l).bodyColor,
24
- v42a24063: o(l).primaryColor
16
+ A((c) => ({
17
+ f2149ac0: d.value.left,
18
+ v6fb5779c: d.value.top,
19
+ e0532af8: d.value.bottom,
20
+ v36eef49e: E.value,
21
+ v7a209d86: _.value,
22
+ v0a70f74c: B.value,
23
+ v1ffafb76: a.value.bodyColor,
24
+ v738d1dcc: a.value.primaryColor
25
25
  }));
26
- const C = s, r = A(M), m = e(() => r.sidebarStyle), d = b(0), u = b(0), S = e(() => parseFloat(m.value.paddingTop) || 0), x = e(
27
- () => `${Math.max(S.value, d.value)}px`
28
- ), _ = e(() => `${u.value}px`), E = e(() => C.aboveHeader ? 2 : 0), n = e(() => r.sidebarIsCollapse), $ = e(() => ({
26
+ const x = s, r = f(N), p = e(() => r.sidebarStyle), d = e(() => r.viewportPadding), m = b(0), v = b(0), P = e(() => parseFloat(p.value.paddingTop) || 0), _ = e(
27
+ () => `${Math.max(P.value, m.value)}px`
28
+ ), B = e(() => `${v.value}px`), E = e(() => x.aboveHeader ? 2 : 0), n = e(() => r.sidebarIsCollapse), $ = e(() => ({
29
29
  transform: `rotate(${n.value ? 0 : 180}deg)`
30
- })), { theme: l } = F(r);
31
- return (c, t) => {
32
- const k = H, B = T;
33
- return f(), I("div", {
34
- class: "app-sidebar",
35
- style: g(o(m))
36
- }, [
37
- a(o(y), {
38
- class: "app-sidebar-top",
39
- onHeightChange: t[0] || (t[0] = (i) => d.value = i)
40
- }, {
41
- default: p(() => [
42
- v(c.$slots, "top", {}, void 0, !0)
43
- ]),
44
- _: 3
45
- }),
46
- h("div", O, [
47
- a(o(N), {
48
- collapse: o(n),
49
- menus: s.menus,
50
- style: { height: "100%" },
51
- "background-color": o(l).bodyColor,
52
- "text-color": o(l).baseColor,
53
- "active-text-color": o(l).primaryColor,
54
- menuFlatList: s.menuFlatList,
55
- routerMode: ""
56
- }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
30
+ })), k = f(O), a = e(() => k.themeColors.value);
31
+ return (c, t) => (g(), T("div", {
32
+ class: "app-sidebar",
33
+ style: h(p.value)
34
+ }, [
35
+ l(o(S), {
36
+ class: "app-sidebar-top",
37
+ onHeightChange: t[0] || (t[0] = (i) => m.value = i)
38
+ }, {
39
+ default: u(() => [
40
+ C(c.$slots, "top", {}, void 0, !0)
57
41
  ]),
58
- a(o(y), {
59
- class: "app-sidebar-bottom",
60
- onHeightChange: t[1] || (t[1] = (i) => u.value = i)
61
- }, {
62
- default: p(() => [
63
- v(c.$slots, "bottom", {}, void 0, !0)
64
- ]),
65
- _: 3
66
- }),
67
- s.show ? (f(), L(B, {
68
- key: 0,
69
- content: o(n) ? "展开" : "收起",
70
- placement: "right",
71
- "show-after": 200
72
- }, {
73
- default: p(() => [
74
- h("div", {
75
- class: "app-sidebar-toggle",
76
- onClick: t[2] || (t[2] = (i) => o(r).changeSidebarCollapseStatus(!o(n)))
77
- }, [
78
- a(k, null, {
79
- default: p(() => [
80
- a(o(R), {
81
- class: "app-sidebar-toggle-icon",
82
- style: g(o($))
83
- }, null, 8, ["style"])
84
- ]),
85
- _: 1
86
- })
87
- ])
88
- ]),
89
- _: 1
90
- }, 8, ["content"])) : V("", !0)
91
- ], 4);
92
- };
42
+ _: 3
43
+ }),
44
+ y("div", R, [
45
+ l(o(F), {
46
+ collapse: n.value,
47
+ menus: s.menus,
48
+ style: { height: "100%" },
49
+ "background-color": a.value.bodyColor,
50
+ "text-color": a.value.baseColor,
51
+ "active-text-color": a.value.primaryColor,
52
+ menuFlatList: s.menuFlatList,
53
+ routerMode: ""
54
+ }, null, 8, ["collapse", "menus", "background-color", "text-color", "active-text-color", "menuFlatList"])
55
+ ]),
56
+ l(o(S), {
57
+ class: "app-sidebar-bottom",
58
+ onHeightChange: t[1] || (t[1] = (i) => v.value = i)
59
+ }, {
60
+ default: u(() => [
61
+ C(c.$slots, "bottom", {}, void 0, !0)
62
+ ]),
63
+ _: 3
64
+ }),
65
+ s.show ? (g(), H(o(I), {
66
+ key: 0,
67
+ content: n.value ? "展开" : "收起",
68
+ placement: "right",
69
+ "show-after": 200
70
+ }, {
71
+ default: u(() => [
72
+ y("div", {
73
+ class: "app-sidebar-toggle",
74
+ onClick: t[2] || (t[2] = (i) => o(r).changeSidebarCollapseStatus(!n.value))
75
+ }, [
76
+ l(o(V), null, {
77
+ default: u(() => [
78
+ l(o(Y), {
79
+ class: "app-sidebar-toggle-icon",
80
+ style: h($.value)
81
+ }, null, 8, ["style"])
82
+ ]),
83
+ _: 1
84
+ })
85
+ ])
86
+ ]),
87
+ _: 1
88
+ }, 8, ["content"])) : L("", !0)
89
+ ], 4));
93
90
  }
94
91
  });
95
92
  export {
96
- J as default
93
+ G as default
97
94
  };
@@ -0,0 +1,7 @@
1
+ import o from "./AppTheme.vue2.mjs";
2
+ /* empty css */
3
+ import p from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const e = /* @__PURE__ */ p(o, [["__scopeId", "data-v-1f068b22"]]);
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,38 @@
1
+ import { defineComponent as u, inject as p, computed as n, openBlock as a, createElementBlock as m, createBlock as r, unref as e, withCtx as v, Fragment as d, renderList as h, createCommentVNode as _, createVNode as f } from "vue";
2
+ import { ElSelect as k, ElOption as y, ElSwitch as E } from "element-plus";
3
+ import { Sunny as S, Moon as B } from "@element-plus/icons-vue";
4
+ import { APP_LAYOUT_BRIDGE_KEY as b } from "../../inject/key.mjs";
5
+ const g = { class: "app-theme" }, O = /* @__PURE__ */ u({
6
+ __name: "AppTheme",
7
+ setup(C) {
8
+ const l = p(b), c = n(() => l.themeIsDark.value), s = n(() => l.themeStyle.value), i = n(() => l.theme.list.value);
9
+ return (D, o) => (a(), m("div", g, [
10
+ i.value.length > 1 ? (a(), r(e(k), {
11
+ key: 0,
12
+ "model-value": s.value,
13
+ class: "app-theme__style-select",
14
+ size: "small",
15
+ onChange: o[0] || (o[0] = (t) => e(l).theme.setStyle(t))
16
+ }, {
17
+ default: v(() => [
18
+ (a(!0), m(d, null, h(i.value, (t) => (a(), r(e(y), {
19
+ key: t,
20
+ label: e(l).theme.labelOf(t),
21
+ value: t
22
+ }, null, 8, ["label", "value"]))), 128))
23
+ ]),
24
+ _: 1
25
+ }, 8, ["model-value"])) : _("", !0),
26
+ f(e(E), {
27
+ "model-value": c.value,
28
+ class: "app-theme__dark-switch",
29
+ "active-action-icon": e(B),
30
+ "inactive-action-icon": e(S),
31
+ "onUpdate:modelValue": o[1] || (o[1] = (t) => e(l).theme.setDark(!!t))
32
+ }, null, 8, ["model-value", "active-action-icon", "inactive-action-icon"])
33
+ ]));
34
+ }
35
+ });
36
+ export {
37
+ O as default
38
+ };
@@ -1,7 +1,7 @@
1
1
  import t from "./DataListView.vue2.mjs";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const i = /* @__PURE__ */ a(t, [["__scopeId", "data-v-da38bea6"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const i = /* @__PURE__ */ o(t, [["__scopeId", "data-v-708af83f"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as v, computed as m, ref as A, watch as F, openBlock as i, createElementBlock as p, normalizeStyle as H, unref as f, Fragment as z, renderList as E, createBlock as K, withCtx as q, renderSlot as k, createVNode as I, markRaw as M, h as c } from "vue";
1
+ import { defineComponent as S, computed as m, ref as R, watch as A, openBlock as i, createElementBlock as p, normalizeStyle as F, Fragment as H, renderList as z, createBlock as E, withCtx as K, renderSlot as h, createVNode as q, unref as I, markRaw as M, h as c } from "vue";
2
2
  import { ElEmpty as N } from "element-plus";
3
3
  import O from "./DataListViewItem.vue.mjs";
4
4
  import { createDataListViewInstance as P } from "./utils.mjs";
5
5
  const j = {
6
6
  key: 1,
7
7
  class: "data-list-view-empty"
8
- }, T = /* @__PURE__ */ v({
8
+ }, T = /* @__PURE__ */ S({
9
9
  __name: "DataListView",
10
10
  props: {
11
11
  data: {},
@@ -16,26 +16,26 @@ const j = {
16
16
  getRenderCtxParams: {}
17
17
  },
18
18
  emits: ["selectionChange"],
19
- setup(r, { expose: C, emit: b }) {
20
- const o = r, V = b, s = (t) => {
19
+ setup(r, { expose: k, emit: C }) {
20
+ const o = r, b = C, s = (t) => {
21
21
  const e = o.rowKey;
22
22
  return typeof e == "function" ? e(t) : String(t[e]);
23
- }, D = m(
23
+ }, V = m(
24
24
  () => o.maxHeight ? { maxHeight: `${o.maxHeight}px`, overflowY: "auto" } : void 0
25
- ), l = A(/* @__PURE__ */ new Set()), L = m(() => l.value.size === o.data.length), g = (t) => o.selectable && l.value.has(s(t)), d = () => {
26
- V("selectionChange", y());
27
- }, y = () => o.selectable ? o.data.filter((t) => l.value.has(s(t))) : [], w = () => {
25
+ ), l = R(/* @__PURE__ */ new Set()), D = m(() => l.value.size === o.data.length), f = (t) => o.selectable && l.value.has(s(t)), d = () => {
26
+ b("selectionChange", g());
27
+ }, g = () => o.selectable ? o.data.filter((t) => l.value.has(s(t))) : [], y = () => {
28
28
  l.value = /* @__PURE__ */ new Set(), d();
29
- }, _ = () => {
29
+ }, L = () => {
30
30
  if (!o.selectable) return;
31
- const t = !L.value;
31
+ const t = !D.value;
32
32
  l.value = t ? new Set(o.data.map((e) => s(e))) : /* @__PURE__ */ new Set(), d();
33
- }, x = (t) => {
33
+ }, v = (t) => {
34
34
  if (!o.selectable) return;
35
35
  const e = s(t), n = new Set(l.value);
36
36
  n.has(e) ? n.delete(e) : n.add(e), l.value = n, d();
37
- }, $ = (t) => M(
38
- v({
37
+ }, _ = (t) => M(
38
+ S({
39
39
  name: "DataViewField",
40
40
  props: {
41
41
  row: { type: Object, required: !0 },
@@ -45,7 +45,7 @@ const j = {
45
45
  },
46
46
  setup(e) {
47
47
  return () => {
48
- const { type: n, render: a, prop: S } = t;
48
+ const { type: n, render: a, prop: w } = t;
49
49
  if (n === "index")
50
50
  return c("span", String(e.index + 1));
51
51
  if (n === "selection")
@@ -53,8 +53,8 @@ const j = {
53
53
  type: "checkbox",
54
54
  checked: e.selected,
55
55
  onChange: () => {
56
- var h;
57
- return (h = e.toggleSelect) == null ? void 0 : h.call(e);
56
+ var x;
57
+ return (x = e.toggleSelect) == null ? void 0 : x.call(e);
58
58
  }
59
59
  });
60
60
  if (typeof a == "function")
@@ -66,12 +66,12 @@ const j = {
66
66
  });
67
67
  if (a)
68
68
  return c(a);
69
- const u = S ? e.row[S] : void 0;
69
+ const u = w ? e.row[w] : void 0;
70
70
  return c("span", u == null ? "" : String(u));
71
71
  };
72
72
  }
73
73
  })
74
- ), B = m(() => {
74
+ ), $ = m(() => {
75
75
  const t = {};
76
76
  for (const e of o.columns) {
77
77
  if (e.type === "expand") continue;
@@ -83,42 +83,42 @@ const j = {
83
83
  );
84
84
  continue;
85
85
  }
86
- t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] = $(e);
86
+ t[n] && console.warn(`[DataListView] 列 key 重复 "${n}",后者覆盖前者`), t[n] = _(e);
87
87
  }
88
88
  return t;
89
- }), R = P({
90
- clearSelection: w,
91
- getSelectionRows: y,
92
- toggleRowSelection: x,
93
- toggleAllSelection: _,
89
+ }), B = P({
90
+ clearSelection: y,
91
+ getSelectionRows: g,
92
+ toggleRowSelection: v,
93
+ toggleAllSelection: L,
94
94
  columns: o.columns
95
95
  });
96
- return C(R), F(
96
+ return k(B), A(
97
97
  () => o.data,
98
98
  () => {
99
- l.value.size && w();
99
+ l.value.size && y();
100
100
  }
101
101
  ), (t, e) => (i(), p("div", {
102
102
  class: "data-list-view",
103
- style: H(f(D))
103
+ style: F(V.value)
104
104
  }, [
105
- r.data.length ? (i(!0), p(z, { key: 0 }, E(r.data, (n, a) => (i(), K(O, {
105
+ r.data.length ? (i(!0), p(H, { key: 0 }, z(r.data, (n, a) => (i(), E(O, {
106
106
  key: s(n),
107
- selected: g(n)
107
+ selected: f(n)
108
108
  }, {
109
- default: q(() => [
110
- k(t.$slots, "item", {
111
- fieldComponentMap: f(B),
109
+ default: K(() => [
110
+ h(t.$slots, "item", {
111
+ fieldComponentMap: $.value,
112
112
  row: n,
113
113
  index: a,
114
- selected: g(n),
115
- toggleSelect: () => x(n)
114
+ selected: f(n),
115
+ toggleSelect: () => v(n)
116
116
  }, void 0, !0)
117
117
  ]),
118
118
  _: 2
119
119
  }, 1032, ["selected"]))), 128)) : (i(), p("div", j, [
120
- k(t.$slots, "empty", {}, () => [
121
- I(f(N))
120
+ h(t.$slots, "empty", {}, () => [
121
+ q(I(N))
122
122
  ], !0)
123
123
  ]))
124
124
  ], 4));
@@ -1,5 +1,5 @@
1
- import { defineComponent as V, useModel as P, ref as $, computed as s, h as r, openBlock as o, createBlock as u, unref as d, withCtx as c, createElementVNode as x, createElementBlock as f, resolveDynamicComponent as C, createCommentVNode as k, createVNode as m, createTextVNode as T, toDisplayString as _, renderSlot as v, Fragment as z, mergeModels as D } from "vue";
2
- import { ElPopover as S, ElButton as b } from "element-plus";
1
+ import { defineComponent as _, useModel as P, ref as $, computed as s, h as r, openBlock as o, createBlock as u, unref as d, withCtx as c, createElementVNode as C, createElementBlock as f, resolveDynamicComponent as x, createCommentVNode as k, createVNode as m, createTextVNode as T, toDisplayString as b, renderSlot as v, Fragment as z, mergeModels as D } from "vue";
2
+ import { ElPopover as S, ElButton as N } from "element-plus";
3
3
  import A from "../modal/ConfirmModal.vue.mjs";
4
4
  const U = { class: "action-confirm" }, j = {
5
5
  key: 0,
@@ -7,7 +7,7 @@ const U = { class: "action-confirm" }, j = {
7
7
  }, q = {
8
8
  key: 1,
9
9
  class: "action-confirm__content"
10
- }, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */ V({
10
+ }, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */ _({
11
11
  __name: "ActionConfirm",
12
12
  props: /* @__PURE__ */ D({
13
13
  mode: {},
@@ -29,7 +29,7 @@ const U = { class: "action-confirm" }, j = {
29
29
  }, y = (e) => {
30
30
  if (!(e == null || e === ""))
31
31
  return typeof e == "string" ? () => r("span", e) : () => e;
32
- }, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))), N = async () => {
32
+ }, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))), B = async () => {
33
33
  a.value = !0;
34
34
  try {
35
35
  await Promise.resolve(n.submitFn()), i.value = !1;
@@ -39,7 +39,7 @@ const U = { class: "action-confirm" }, j = {
39
39
  }
40
40
  }, g = () => {
41
41
  i.value = !1;
42
- }, B = s(() => {
42
+ }, M = s(() => {
43
43
  const e = l(n.title);
44
44
  if (!(e === void 0 || e === ""))
45
45
  return typeof e == "string" ? e : () => r("span", e);
@@ -64,32 +64,32 @@ const U = { class: "action-confirm" }, j = {
64
64
  v(e.$slots, "default", {}, void 0, !0)
65
65
  ]),
66
66
  default: c(() => [
67
- x("div", U, [
67
+ C("div", U, [
68
68
  p.value ? (o(), f("div", j, [
69
- (o(), u(C(p.value)))
69
+ (o(), u(x(p.value)))
70
70
  ])) : k("", !0),
71
71
  h.value ? (o(), f("div", q, [
72
- (o(), u(C(h.value)))
72
+ (o(), u(x(h.value)))
73
73
  ])) : k("", !0),
74
- x("div", G, [
75
- m(d(b), {
74
+ C("div", G, [
75
+ m(d(N), {
76
76
  size: "small",
77
77
  disabled: a.value,
78
78
  onClick: g
79
79
  }, {
80
80
  default: c(() => [
81
- T(_(t.cancelText), 1)
81
+ T(b(t.cancelText), 1)
82
82
  ]),
83
83
  _: 1
84
84
  }, 8, ["disabled"]),
85
- m(d(b), {
85
+ m(d(N), {
86
86
  size: "small",
87
87
  type: t.type,
88
88
  loading: a.value,
89
- onClick: N
89
+ onClick: B
90
90
  }, {
91
91
  default: c(() => [
92
- T(_(t.confirmText), 1)
92
+ T(b(t.confirmText), 1)
93
93
  ]),
94
94
  _: 1
95
95
  }, 8, ["type", "loading"])
@@ -101,8 +101,8 @@ const U = { class: "action-confirm" }, j = {
101
101
  v(e.$slots, "default", {}, void 0, !0),
102
102
  m(A, {
103
103
  show: i.value,
104
- "onUpdate:show": w[0] || (w[0] = (M) => i.value = M),
105
- title: B.value,
104
+ "onUpdate:show": w[0] || (w[0] = (V) => i.value = V),
105
+ title: M.value,
106
106
  content: E.value,
107
107
  "confirm-text": t.confirmText,
108
108
  "cancel-text": t.cancelText,
@@ -1,14 +1,14 @@
1
- import { defineComponent as p, ref as u, computed as a, watch as d, openBlock as i, createElementBlock as g, Fragment as f, createBlock as H, withCtx as v, renderSlot as n, createCommentVNode as w, normalizeProps as C, guardReactiveProps as _, unref as k } from "vue";
2
- import P from "./WatchSize.vue.mjs";
3
- const S = /* @__PURE__ */ p({
1
+ import { defineComponent as p, ref as u, computed as a, watch as d, openBlock as i, createElementBlock as g, Fragment as f, createBlock as v, withCtx as H, renderSlot as n, createCommentVNode as w, normalizeProps as C, guardReactiveProps as _ } from "vue";
2
+ import k from "./WatchSize.vue.mjs";
3
+ const V = /* @__PURE__ */ p({
4
4
  __name: "HeightProvider",
5
5
  props: {
6
6
  viewportHeight: {},
7
7
  minHeight: { default: 0 }
8
8
  },
9
9
  emits: ["childViewportHeightChange"],
10
- setup(s, { emit: l }) {
11
- const t = s, h = l, o = u(0), r = a(
10
+ setup(l, { emit: s }) {
11
+ const t = l, h = s, o = u(0), r = a(
12
12
  () => Math.max(t.viewportHeight - o.value, t.minHeight)
13
13
  ), m = (e) => {
14
14
  o.value = e;
@@ -19,20 +19,20 @@ const S = /* @__PURE__ */ p({
19
19
  );
20
20
  return d(r, (e) => h("childViewportHeightChange", e), {
21
21
  immediate: !0
22
- }), (e, $) => (i(), g(f, null, [
23
- e.$slots.header ? (i(), H(P, {
22
+ }), (e, P) => (i(), g(f, null, [
23
+ e.$slots.header ? (i(), v(k, {
24
24
  key: 0,
25
25
  onHeightChange: m
26
26
  }, {
27
- default: v(() => [
27
+ default: H(() => [
28
28
  n(e.$slots, "header")
29
29
  ]),
30
30
  _: 3
31
31
  })) : w("", !0),
32
- n(e.$slots, "default", C(_(k(c))))
32
+ n(e.$slots, "default", C(_(c.value)))
33
33
  ], 64));
34
34
  }
35
35
  });
36
36
  export {
37
- S as default
37
+ V as default
38
38
  };
@@ -1,7 +1,7 @@
1
- import o from "./TabsHeader.vue2.mjs";
1
+ import a from "./TabsHeader.vue2.mjs";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d6937179"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const e = /* @__PURE__ */ o(a, [["__scopeId", "data-v-3faa57f5"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as $, toRefs as z, useModel as K, ref as T, computed as n, onMounted as g, onBeforeUnmount as B, watch as R, openBlock as i, createElementBlock as r, normalizeClass as b, unref as o, Fragment as S, renderList as D, renderSlot as H, createTextVNode as I, toDisplayString as N, normalizeStyle as V, createCommentVNode as F, mergeModels as U, nextTick as W } from "vue";
2
- const X = ["onClick"], q = /* @__PURE__ */ $({
1
+ import { defineComponent as L, toRefs as $, useModel as z, ref as K, computed as n, onMounted as T, onBeforeUnmount as g, watch as B, openBlock as s, createElementBlock as l, normalizeClass as y, Fragment as R, renderList as S, unref as D, renderSlot as H, createTextVNode as I, toDisplayString as N, normalizeStyle as V, createCommentVNode as F, mergeModels as U, nextTick as W } from "vue";
2
+ const X = ["onClick"], q = /* @__PURE__ */ L({
3
3
  __name: "TabsHeader",
4
4
  props: /* @__PURE__ */ U({
5
5
  tabs: {},
@@ -10,63 +10,63 @@ const X = ["onClick"], q = /* @__PURE__ */ $({
10
10
  activeKeyModifiers: {}
11
11
  }),
12
12
  emits: ["update:activeKey"],
13
- setup(v) {
14
- const d = v, { tabs: k, level: h, variant: M } = z(d), s = K(v, "activeKey"), l = /* @__PURE__ */ new Map(), m = T(0), f = n(
15
- () => Math.min(Math.max(Math.floor(h.value), 1), 4)
16
- ), w = n(() => `tabs-main-bar--l${f.value}`), C = {
13
+ setup(u) {
14
+ const v = u, { tabs: b, level: k, variant: h } = $(v), o = z(u, "activeKey"), i = /* @__PURE__ */ new Map(), d = K(0), m = n(
15
+ () => Math.min(Math.max(Math.floor(k.value), 1), 4)
16
+ ), M = n(() => `tabs-main-bar--l${m.value}`), w = {
17
17
  1: "card",
18
18
  2: "indicator",
19
19
  3: "indicator-compact",
20
20
  4: "plain"
21
- }, c = n(
22
- () => M.value ?? C[f.value]
21
+ }, r = n(
22
+ () => h.value ?? w[m.value]
23
+ ), C = n(
24
+ () => `tabs-main-bar--variant-${r.value}`
23
25
  ), x = n(
24
- () => `tabs-main-bar--variant-${c.value}`
25
- ), _ = n(
26
- () => c.value === "indicator" || c.value === "indicator-compact"
27
- ), E = n(() => {
28
- const [, t] = [m.value, s.value], a = t ? l.get(t) : void 0;
26
+ () => r.value === "indicator" || r.value === "indicator-compact"
27
+ ), _ = n(() => {
28
+ const [, t] = [d.value, o.value], a = t ? i.get(t) : void 0;
29
29
  return a ? {
30
30
  width: `${a.offsetWidth}px`,
31
31
  transform: `translateX(${a.offsetLeft}px)`
32
32
  } : { width: "0px" };
33
- }), L = (t, a) => {
34
- a instanceof HTMLElement ? l.set(t, a) : l.delete(t);
35
- }, u = () => {
33
+ }), E = (t, a) => {
34
+ a instanceof HTMLElement ? i.set(t, a) : i.delete(t);
35
+ }, c = () => {
36
36
  W(() => {
37
- m.value++;
37
+ d.value++;
38
38
  });
39
- }, p = () => u();
40
- return g(() => {
41
- u(), window.addEventListener("resize", p);
42
- }), B(() => {
43
- window.removeEventListener("resize", p);
44
- }), R(
45
- () => d.tabs,
46
- () => u(),
39
+ }, f = () => c();
40
+ return T(() => {
41
+ c(), window.addEventListener("resize", f);
42
+ }), g(() => {
43
+ window.removeEventListener("resize", f);
44
+ }), B(
45
+ () => v.tabs,
46
+ () => c(),
47
47
  { flush: "post" }
48
- ), (t, a) => (i(), r("div", {
49
- class: b(["tabs-main-bar", [o(w), o(x)]])
48
+ ), (t, a) => (s(), l("div", {
49
+ class: y(["tabs-main-bar", [M.value, C.value]])
50
50
  }, [
51
- (i(!0), r(S, null, D(o(k), (e) => (i(), r("button", {
51
+ (s(!0), l(R, null, S(D(b), (e) => (s(), l("button", {
52
52
  key: e.key,
53
53
  ref_for: !0,
54
- ref: (y) => L(e.key, y),
54
+ ref: (p) => E(e.key, p),
55
55
  type: "button",
56
- class: b(["tabs-main-bar-item", { "tabs-main-bar-item_active": e.key === s.value }]),
57
- onClick: (y) => s.value = e.key
56
+ class: y(["tabs-main-bar-item", { "tabs-main-bar-item_active": e.key === o.value }]),
57
+ onClick: (p) => o.value = e.key
58
58
  }, [
59
59
  H(t.$slots, e.key, {
60
60
  tab: e,
61
- active: e.key === s.value
61
+ active: e.key === o.value
62
62
  }, () => [
63
63
  I(N(e.title), 1)
64
64
  ], !0)
65
65
  ], 10, X))), 128)),
66
- o(_) ? (i(), r("div", {
66
+ x.value ? (s(), l("div", {
67
67
  key: 0,
68
68
  class: "tabs-main-bar-indicator",
69
- style: V(o(E))
69
+ style: V(_.value)
70
70
  }, null, 4)) : F("", !0)
71
71
  ], 2));
72
72
  }