@done-coding/admin-core 0.3.0 → 0.4.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 (106) hide show
  1. package/es/bridge/index.mjs +87 -47
  2. package/es/components/app-layout/AppBody.vue.mjs +7 -0
  3. package/es/components/app-layout/AppBody.vue2.mjs +89 -0
  4. package/es/components/app-layout/AppBreadcrumb.vue.mjs +7 -0
  5. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +58 -0
  6. package/es/components/app-layout/AppFooter.vue.mjs +7 -0
  7. package/es/components/app-layout/AppFooter.vue2.mjs +17 -0
  8. package/es/components/app-layout/AppHeader.vue.mjs +7 -0
  9. package/es/components/app-layout/AppHeader.vue2.mjs +99 -0
  10. package/es/components/app-layout/AppLayout.vue.mjs +7 -0
  11. package/es/components/app-layout/AppLayout.vue2.mjs +130 -0
  12. package/es/components/app-layout/AppPage.vue.mjs +7 -0
  13. package/es/components/app-layout/AppPage.vue2.mjs +39 -0
  14. package/es/components/app-layout/AppSidebar.vue.mjs +7 -0
  15. package/es/components/app-layout/AppSidebar.vue2.mjs +97 -0
  16. package/es/components/app-layout/index.mjs +32 -0
  17. package/es/components/display/ActionBtnGroup.vue.mjs +61 -0
  18. package/es/components/display/ActionBtnGroup.vue2.mjs +4 -0
  19. package/es/components/display/HeightProvider.vue.mjs +26 -26
  20. package/es/components/display/TabsHeader.vue.mjs +7 -0
  21. package/es/components/display/TabsHeader.vue2.mjs +76 -0
  22. package/es/components/display/TabsMain.vue.mjs +100 -5
  23. package/es/components/display/TabsMain.vue2.mjs +2 -95
  24. package/es/components/display/TabsNaturalFlow.vue.mjs +17 -0
  25. package/es/components/display/TabsNaturalFlow.vue2.mjs +4 -0
  26. package/es/components/display/TabsRefineFlow.vue.mjs +62 -0
  27. package/es/components/display/TabsRefineFlow.vue2.mjs +4 -0
  28. package/es/components/display/index.mjs +10 -8
  29. package/es/components/form/FormSearch.vue.mjs +2 -2
  30. package/es/components/form/FormSearch.vue2.mjs +107 -63
  31. package/es/components/form/form-search-utils.mjs +25 -0
  32. package/es/components/list-page/ListPage.vue.mjs +2 -2
  33. package/es/components/list-page/ListPage.vue2.mjs +82 -76
  34. package/es/components/misc/ActionBtn.vue.mjs +84 -65
  35. package/es/components/misc/ActionConfirm.vue.mjs +1 -1
  36. package/es/components/misc/ActionConfirm.vue2.mjs +77 -71
  37. package/es/components/misc/SelectModule.vue.mjs +55 -0
  38. package/es/components/misc/SelectModule.vue2.mjs +4 -0
  39. package/es/components/modal/ConfirmModal.vue.mjs +1 -1
  40. package/es/components/modal/ConfirmModal.vue2.mjs +13 -12
  41. package/es/components/modal/modal-shelf-hierarchy.mjs +4 -6
  42. package/es/components/table/TableMain.vue.mjs +3 -3
  43. package/es/components/table/TableMain.vue2.mjs +103 -102
  44. package/es/components/table/ToolbarButtons.vue.mjs +10 -40
  45. package/es/hooks/use-breakpoint.mjs +40 -0
  46. package/es/hooks/use-channel-viewport-height.mjs +18 -0
  47. package/es/index.mjs +165 -128
  48. package/es/inject/key.mjs +18 -8
  49. package/es/router/guard/index.mjs +31 -0
  50. package/es/router/guard/login.mjs +4 -0
  51. package/es/router/guard/permission.mjs +4 -0
  52. package/es/store/app.mjs +103 -0
  53. package/es/store/router-permission.mjs +65 -0
  54. package/es/store/user.mjs +52 -52
  55. package/es/style.css +1 -1
  56. package/package.json +3 -2
  57. package/types/bridge/index.d.ts +193 -89
  58. package/types/components/app-layout/AppBody.vue.d.ts +45 -0
  59. package/types/components/app-layout/AppBreadcrumb.vue.d.ts +25 -0
  60. package/types/components/app-layout/AppFooter.vue.d.ts +2 -0
  61. package/types/components/app-layout/AppHeader.vue.d.ts +55 -0
  62. package/types/components/app-layout/AppLayout.vue.d.ts +76 -0
  63. package/types/components/app-layout/AppPage.vue.d.ts +54 -0
  64. package/types/components/app-layout/AppSidebar.vue.d.ts +51 -0
  65. package/types/components/app-layout/index.d.ts +27 -0
  66. package/types/components/app-layout/types.d.ts +43 -0
  67. package/types/components/display/ActionBtnGroup.vue.d.ts +16 -0
  68. package/types/components/display/HeightProvider.vue.d.ts +10 -6
  69. package/types/components/display/TabsHeader.vue.d.ts +42 -0
  70. package/types/components/display/TabsMain.vue.d.ts +49 -7
  71. package/types/components/display/TabsNaturalFlow.vue.d.ts +16 -0
  72. package/types/components/display/TabsRefineFlow.vue.d.ts +53 -0
  73. package/types/components/display/index.d.ts +16 -13
  74. package/types/components/display/types.d.ts +85 -29
  75. package/types/components/form/form-search-utils.d.ts +24 -0
  76. package/types/components/form/types.d.ts +7 -1
  77. package/types/components/list-page/types.d.ts +1 -1
  78. package/types/components/misc/ActionBtn.vue.d.ts +17 -23
  79. package/types/components/misc/ActionConfirm.vue.d.ts +56 -27
  80. package/types/components/misc/SelectModule.vue.d.ts +2 -0
  81. package/types/components/misc/index.d.ts +11 -1
  82. package/types/components/misc/types.d.ts +35 -26
  83. package/types/components/modal/ConfirmModal.vue.d.ts +17 -0
  84. package/types/components/modal/modal-shelf-hierarchy.d.ts +1 -1
  85. package/types/components/table/types.d.ts +14 -12
  86. package/types/helpers/index.d.ts +10 -3
  87. package/types/hooks/index.d.ts +2 -0
  88. package/types/hooks/use-breakpoint.d.ts +4 -0
  89. package/types/hooks/use-channel-viewport-height.d.ts +28 -0
  90. package/types/index.d.ts +4 -1
  91. package/types/inject/key.d.ts +35 -10
  92. package/types/router/guard/index.d.ts +21 -0
  93. package/types/router/guard/login.d.ts +5 -0
  94. package/types/router/guard/permission.d.ts +5 -0
  95. package/types/router/guard/types.d.ts +15 -0
  96. package/types/router/index.d.ts +1 -0
  97. package/types/store/app.d.ts +149 -0
  98. package/types/store/index.d.ts +2 -0
  99. package/types/store/router-permission.d.ts +80 -0
  100. package/types/store/user.d.ts +11 -9
  101. /package/es/{helpers → bridge}/route.mjs +0 -0
  102. /package/es/{helpers → bridge}/state.mjs +0 -0
  103. /package/es/{helpers → bridge}/storage.mjs +0 -0
  104. /package/types/{helpers → bridge}/route.d.ts +0 -0
  105. /package/types/{helpers → bridge}/state.d.ts +0 -0
  106. /package/types/{helpers → bridge}/storage.d.ts +0 -0
@@ -1,7 +1,7 @@
1
- import { defineComponent as A, getCurrentInstance as b, ref as s, computed as P, openBlock as g, createBlock as v, withCtx as f, createVNode as T, unref as k, mergeProps as B, renderSlot as C } from "vue";
2
- import { ElButton as h } from "element-plus";
3
- import w from "./ActionConfirm.vue.mjs";
4
- const E = /* @__PURE__ */ A({
1
+ import { defineComponent as z, toRefs as E, getCurrentInstance as M, ref as p, computed as C, watch as R, openBlock as b, createBlock as x, unref as u, withCtx as d, createVNode as V, mergeProps as w, renderSlot as A } from "vue";
2
+ import { ElButton as I } from "element-plus";
3
+ import $ from "./ActionConfirm.vue.mjs";
4
+ const q = /* @__PURE__ */ z({
5
5
  inheritAttrs: !1,
6
6
  __name: "ActionBtn",
7
7
  props: {
@@ -24,14 +24,17 @@ const E = /* @__PURE__ */ A({
24
24
  autoInsertSpace: { type: Boolean },
25
25
  tag: {},
26
26
  confirmMode: {},
27
- confirmConfig: {}
27
+ confirmConfig: { type: [Object, Function] },
28
+ beforeOpen: { type: Function }
28
29
  },
29
30
  emits: ["click"],
30
- setup(x) {
31
- const t = x, n = b(), u = s(), r = s(!1), a = s(!1);
32
- let p;
33
- const m = P(() => {
34
- const e = t, o = {}, l = [
31
+ setup(_) {
32
+ const v = _, { confirmConfig: s, confirmMode: T, beforeOpen: f } = E(v), r = M(), o = p(!1), c = p(!1), l = p();
33
+ let m;
34
+ const F = C(
35
+ () => !!s.value || !!f.value
36
+ ), y = C(() => {
37
+ const e = v, t = {}, a = [
35
38
  "type",
36
39
  "size",
37
40
  "plain",
@@ -50,68 +53,84 @@ const E = /* @__PURE__ */ A({
50
53
  "icon",
51
54
  "loadingIcon"
52
55
  ];
53
- for (const i of l) e[i] !== void 0 && (o[i] = e[i]);
54
- return { ...n == null ? void 0 : n.attrs, ...o };
55
- }), _ = (e) => !!e && typeof e.then == "function", I = () => {
56
- var o;
57
- const e = (o = n == null ? void 0 : n.vnode.props) == null ? void 0 : o.onClick;
56
+ for (const n of a) e[n] !== void 0 && (t[n] = e[n]);
57
+ return { ...r == null ? void 0 : r.attrs, ...t };
58
+ }), L = (e) => !!e && typeof e.then == "function", O = () => {
59
+ var t;
60
+ const e = (t = r == null ? void 0 : r.vnode.props) == null ? void 0 : t.onClick;
58
61
  return e ? Array.isArray(e) ? e : [e] : [];
59
- }, d = () => {
60
- const e = I();
62
+ }, g = () => {
63
+ const e = O();
61
64
  if (!e.length) return;
62
- const o = p;
63
- let l;
65
+ const t = m;
66
+ let a;
64
67
  try {
65
- l = e.map((c) => c(o));
66
- } catch (c) {
67
- throw r.value = !1, c;
68
+ a = e.map((i) => i(t));
69
+ } catch (i) {
70
+ throw o.value = !1, i;
68
71
  }
69
- const i = l.filter(_);
70
- if (i.length)
71
- return r.value = !0, Promise.all(i).finally(() => {
72
- r.value = !1;
72
+ const n = a.filter(L);
73
+ if (n.length)
74
+ return o.value = !0, Promise.all(n).finally(() => {
75
+ o.value = !1;
73
76
  });
74
- }, y = (e) => {
75
- var o;
76
- r.value || a.value || (p = e, t.confirmConfig ? (a.value = !0, Promise.resolve((o = u.value) == null ? void 0 : o.run()).finally(() => {
77
- a.value = !1;
78
- })) : d());
77
+ }, P = g, k = async (e) => {
78
+ if (o.value || c.value) return;
79
+ m = e;
80
+ let t;
81
+ if (f.value) {
82
+ o.value = !0;
83
+ try {
84
+ t = await f.value();
85
+ } catch {
86
+ o.value = !1;
87
+ return;
88
+ }
89
+ o.value = !1;
90
+ } else
91
+ t = void 0;
92
+ s.value ? (l.value = typeof s.value == "function" ? s.value(t) : s.value, c.value = !0) : g();
93
+ };
94
+ return R(c, (e) => {
95
+ e || (l.value = void 0);
96
+ }), (e, t) => {
97
+ var a, n, i, B, h;
98
+ return F.value ? (b(), x($, {
99
+ key: 0,
100
+ show: c.value,
101
+ "onUpdate:show": t[0] || (t[0] = (S) => c.value = S),
102
+ mode: u(T) || "popconfirm",
103
+ title: (a = l.value) == null ? void 0 : a.title,
104
+ content: (n = l.value) == null ? void 0 : n.content,
105
+ "confirm-text": (i = l.value) == null ? void 0 : i.confirmText,
106
+ "cancel-text": (B = l.value) == null ? void 0 : B.cancelText,
107
+ type: (h = l.value) == null ? void 0 : h.type,
108
+ "submit-fn": u(P)
109
+ }, {
110
+ default: d(() => [
111
+ V(u(I), w(y.value, {
112
+ loading: o.value,
113
+ onClick: k
114
+ }), {
115
+ default: d(() => [
116
+ A(e.$slots, "default")
117
+ ]),
118
+ _: 3
119
+ }, 16, ["loading"])
120
+ ]),
121
+ _: 3
122
+ }, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type", "submit-fn"])) : (b(), x(u(I), w({ key: 1 }, y.value, {
123
+ loading: o.value,
124
+ onClick: k
125
+ }), {
126
+ default: d(() => [
127
+ A(e.$slots, "default")
128
+ ]),
129
+ _: 3
130
+ }, 16, ["loading"]));
79
131
  };
80
- return (e, o) => t.confirmConfig ? (g(), v(w, {
81
- key: 0,
82
- ref_key: "confirmRef",
83
- ref: u,
84
- mode: t.confirmMode || "popconfirm",
85
- title: t.confirmConfig.title,
86
- content: t.confirmConfig.content,
87
- "confirm-text": t.confirmConfig.confirmText,
88
- "cancel-text": t.confirmConfig.cancelText,
89
- type: t.confirmConfig.type,
90
- action: d
91
- }, {
92
- default: f(() => [
93
- T(k(h), B(m.value, {
94
- loading: r.value,
95
- onClick: y
96
- }), {
97
- default: f(() => [
98
- C(e.$slots, "default")
99
- ]),
100
- _: 3
101
- }, 16, ["loading"])
102
- ]),
103
- _: 3
104
- }, 8, ["mode", "title", "content", "confirm-text", "cancel-text", "type"])) : (g(), v(k(h), B({ key: 1 }, m.value, {
105
- loading: r.value,
106
- onClick: y
107
- }), {
108
- default: f(() => [
109
- C(e.$slots, "default")
110
- ]),
111
- _: 3
112
- }, 16, ["loading"]));
113
132
  }
114
133
  });
115
134
  export {
116
- E as default
135
+ q as default
117
136
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ActionConfirm.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1003e4cb"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5bb407c9"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,103 +1,95 @@
1
- import { defineComponent as S, ref as _, computed as x, openBlock as i, createBlock as u, unref as f, withCtx as s, createElementVNode as g, createElementBlock as C, resolveDynamicComponent as w, createCommentVNode as T, createVNode as h, createTextVNode as k, toDisplayString as B, renderSlot as N, h as b } from "vue";
2
- import { ElPopover as $, ElButton as E, ElMessageBox as j } from "element-plus";
3
- const q = { class: "action-confirm" }, F = {
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
+ import A from "../modal/ConfirmModal.vue.mjs";
4
+ const U = { class: "action-confirm" }, j = {
4
5
  key: 0,
5
6
  class: "action-confirm__title"
6
- }, G = {
7
+ }, q = {
7
8
  key: 1,
8
9
  class: "action-confirm__content"
9
- }, H = { class: "action-confirm__actions" }, O = /* @__PURE__ */ S({
10
+ }, G = { class: "action-confirm__actions" }, K = /* @__PURE__ */ _({
10
11
  __name: "ActionConfirm",
11
- props: {
12
+ props: /* @__PURE__ */ D({
12
13
  mode: {},
13
14
  title: {},
14
15
  content: {},
15
16
  confirmText: { default: "确定" },
16
17
  cancelText: { default: "取消" },
17
18
  type: {},
18
- action: {}
19
- },
20
- setup(a, { expose: P }) {
21
- const e = a, c = _(!1), l = _(!1);
22
- let n = null;
23
- const r = (t) => {
24
- if (t != null)
25
- return typeof t == "function" ? t() : t;
26
- }, m = (t) => {
27
- if (!(t == null || t === ""))
28
- return typeof t == "string" ? () => b("span", t) : () => t;
29
- }, d = x(() => m(r(e.title))), y = x(() => m(r(e.content))), V = async () => {
30
- l.value = !0;
19
+ submitFn: {}
20
+ }, {
21
+ show: { type: Boolean, default: !1 },
22
+ showModifiers: {}
23
+ }),
24
+ emits: ["update:show"],
25
+ setup(t) {
26
+ const n = t, i = P(t, "show"), a = $(!1), l = (e) => {
27
+ if (e != null)
28
+ return typeof e == "function" ? e() : e;
29
+ }, y = (e) => {
30
+ if (!(e == null || e === ""))
31
+ return typeof e == "string" ? () => r("span", e) : () => e;
32
+ }, p = s(() => y(l(n.title))), h = s(() => y(l(n.content))), B = async () => {
33
+ a.value = !0;
31
34
  try {
32
- await Promise.resolve(e.action());
35
+ await Promise.resolve(n.submitFn()), i.value = !1;
36
+ } catch {
33
37
  } finally {
34
- l.value = !1;
38
+ a.value = !1;
35
39
  }
36
- }, z = async () => {
37
- await V(), c.value = !1, n == null || n(!0), n = null;
38
- }, A = () => {
39
- c.value = !1, n == null || n(!1), n = null;
40
- }, D = async () => {
41
- const t = r(e.title), o = r(e.content), L = typeof o == "string" ? o : o ? b("div", o) : "";
40
+ }, g = () => {
41
+ i.value = !1;
42
+ }, M = s(() => {
43
+ const e = l(n.title);
44
+ if (!(e === void 0 || e === ""))
45
+ return typeof e == "string" ? e : () => r("span", e);
46
+ }), E = s(() => {
47
+ const e = l(n.content);
48
+ if (!(e === void 0 || e === ""))
49
+ return typeof e == "string" ? e : () => r("div", e);
50
+ }), F = async () => {
42
51
  try {
43
- return await j.confirm(L, {
44
- title: typeof t == "string" ? t : void 0,
45
- confirmButtonText: e.confirmText,
46
- cancelButtonText: e.cancelText,
47
- type: e.type === "danger" ? "warning" : void 0,
48
- beforeClose: async (M, v, p) => {
49
- if (M !== "confirm") return p();
50
- v.confirmButtonLoading = !0;
51
- try {
52
- await Promise.resolve(e.action());
53
- } finally {
54
- v.confirmButtonLoading = !1;
55
- }
56
- p();
57
- }
58
- }), !0;
52
+ await Promise.resolve(n.submitFn());
59
53
  } catch {
60
54
  return !1;
61
55
  }
62
56
  };
63
- return P({ run: () => e.mode === "messageConfirm" ? D() : (c.value = !0, new Promise((t) => {
64
- n = t;
65
- })) }), (t, o) => e.mode === "popconfirm" ? (i(), u(f($), {
57
+ return (e, w) => n.mode === "popconfirm" ? (o(), u(d(S), {
66
58
  key: 0,
67
- visible: c.value,
59
+ visible: i.value,
68
60
  width: 240,
69
61
  persistent: !1
70
62
  }, {
71
- reference: s(() => [
72
- N(t.$slots, "default", {}, void 0, !0)
63
+ reference: c(() => [
64
+ v(e.$slots, "default", {}, void 0, !0)
73
65
  ]),
74
- default: s(() => [
75
- g("div", q, [
76
- d.value ? (i(), C("div", F, [
77
- (i(), u(w(d.value)))
78
- ])) : T("", !0),
79
- y.value ? (i(), C("div", G, [
80
- (i(), u(w(y.value)))
81
- ])) : T("", !0),
82
- g("div", H, [
83
- h(f(E), {
66
+ default: c(() => [
67
+ C("div", U, [
68
+ p.value ? (o(), f("div", j, [
69
+ (o(), u(x(p.value)))
70
+ ])) : k("", !0),
71
+ h.value ? (o(), f("div", q, [
72
+ (o(), u(x(h.value)))
73
+ ])) : k("", !0),
74
+ C("div", G, [
75
+ m(d(N), {
84
76
  size: "small",
85
- disabled: l.value,
86
- onClick: A
77
+ disabled: a.value,
78
+ onClick: g
87
79
  }, {
88
- default: s(() => [
89
- k(B(a.cancelText), 1)
80
+ default: c(() => [
81
+ T(b(t.cancelText), 1)
90
82
  ]),
91
83
  _: 1
92
84
  }, 8, ["disabled"]),
93
- h(f(E), {
85
+ m(d(N), {
94
86
  size: "small",
95
- type: a.type,
96
- loading: l.value,
97
- onClick: z
87
+ type: t.type,
88
+ loading: a.value,
89
+ onClick: B
98
90
  }, {
99
- default: s(() => [
100
- k(B(a.confirmText), 1)
91
+ default: c(() => [
92
+ T(b(t.confirmText), 1)
101
93
  ]),
102
94
  _: 1
103
95
  }, 8, ["type", "loading"])
@@ -105,9 +97,23 @@ const q = { class: "action-confirm" }, F = {
105
97
  ])
106
98
  ]),
107
99
  _: 3
108
- }, 8, ["visible"])) : N(t.$slots, "default", { key: 1 }, void 0, !0);
100
+ }, 8, ["visible"])) : n.mode === "messageConfirm" ? (o(), f(z, { key: 1 }, [
101
+ v(e.$slots, "default", {}, void 0, !0),
102
+ m(A, {
103
+ show: i.value,
104
+ "onUpdate:show": w[0] || (w[0] = (V) => i.value = V),
105
+ title: M.value,
106
+ content: E.value,
107
+ "confirm-text": t.confirmText,
108
+ "cancel-text": t.cancelText,
109
+ type: t.type,
110
+ "on-confirm": F,
111
+ "on-cancel": g,
112
+ "use-loading": ""
113
+ }, null, 8, ["show", "title", "content", "confirm-text", "cancel-text", "type"])
114
+ ], 64)) : v(e.$slots, "default", { key: 2 }, void 0, !0);
109
115
  }
110
116
  });
111
117
  export {
112
- O as default
118
+ K as default
113
119
  };
@@ -0,0 +1,55 @@
1
+ import { defineComponent as s, inject as E, computed as d, openBlock as e, createBlock as n, unref as l, withCtx as i, createVNode as h, createElementBlock as a, Fragment as p, renderList as m } from "vue";
2
+ import { ElSelect as b, ElOption as _, ElOptionGroup as A } from "element-plus";
3
+ import { APP_LAYOUT_BRIDGE_KEY as L } from "../../inject/key.mjs";
4
+ import { FORM_CONFIG_SELECT_ALL_VALUE as S } from "../../helpers/form.mjs";
5
+ const w = /* @__PURE__ */ s({
6
+ name: "SelectModule",
7
+ inheritAttrs: !0,
8
+ __name: "SelectModule",
9
+ setup(k) {
10
+ const o = E(L);
11
+ if (!o)
12
+ throw new Error(
13
+ "[SelectModule] 必须在 AppLayout 内使用(缺 APP_LAYOUT_BRIDGE_KEY)"
14
+ );
15
+ const f = d(
16
+ () => o.generateRouteMetaRawTree(o.getRoutes(), {
17
+ filterFn: (r) => r.menuShow,
18
+ sortFn: (r, c) => r.menuSort - c.menuSort
19
+ })
20
+ );
21
+ return (r, c) => (e(), n(l(b), null, {
22
+ default: i(() => [
23
+ h(l(_), {
24
+ value: l(S),
25
+ label: "全部"
26
+ }, null, 8, ["value"]),
27
+ (e(!0), a(p, null, m(f.value, (t) => (e(), a(p, {
28
+ key: t.path
29
+ }, [
30
+ t.children.length ? (e(), n(l(A), {
31
+ key: 0,
32
+ label: t.title
33
+ }, {
34
+ default: i(() => [
35
+ (e(!0), a(p, null, m(t.children, (u) => (e(), n(l(_), {
36
+ key: u.path,
37
+ label: u.title,
38
+ value: u.path
39
+ }, null, 8, ["label", "value"]))), 128))
40
+ ]),
41
+ _: 2
42
+ }, 1032, ["label"])) : (e(), n(l(_), {
43
+ key: 1,
44
+ label: t.title,
45
+ value: t.path
46
+ }, null, 8, ["label", "value"]))
47
+ ], 64))), 128))
48
+ ]),
49
+ _: 1
50
+ }));
51
+ }
52
+ });
53
+ export {
54
+ w as default
55
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SelectModule.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -2,7 +2,7 @@ import o from "./ConfirmModal.vue2.mjs";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2f0c870e"]]);
5
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-dfc2f447"]]);
6
6
  export {
7
7
  a as default
8
8
  };
@@ -3,7 +3,7 @@ import "element-plus/es/components/base/style/css";
3
3
  import "element-plus/es/components/dialog/style/css";
4
4
  import "element-plus/es/components/icon/style/css";
5
5
  import "element-plus/es/components/button/style/css";
6
- import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as r, createElementVNode as c, renderSlot as u, resolveDynamicComponent as w, createElementBlock as m, Fragment as B, createTextVNode as d, toDisplayString as f, unref as y, createCommentVNode as x, createVNode as C } from "vue";
6
+ import { defineComponent as V, ref as $, computed as F, openBlock as l, createBlock as i, withCtx as d, createElementVNode as c, renderSlot as u, resolveDynamicComponent as w, createElementBlock as m, Fragment as B, createTextVNode as r, toDisplayString as f, unref as y, createCommentVNode as x, createVNode as C } from "vue";
7
7
  import { Close as L } from "@element-plus/icons-vue";
8
8
  const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z = { class: "content" }, A = ["reverse"], W = /* @__PURE__ */ V({
9
9
  inheritAttrs: !1,
@@ -23,7 +23,8 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
23
23
  reverse: { type: Boolean, default: !1 },
24
24
  closeOnPressEscape: { type: Boolean, default: !0 },
25
25
  closeOnClickModal: { type: Boolean, default: !0 },
26
- useLoading: { type: Boolean }
26
+ useLoading: { type: Boolean },
27
+ type: { default: "primary" }
27
28
  },
28
29
  emits: ["update:show"],
29
30
  setup(e, { emit: E }) {
@@ -66,20 +67,20 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
66
67
  "close-on-press-escape": e.closeOnPressEscape,
67
68
  onClose: b
68
69
  }, {
69
- default: r(() => [
70
+ default: d(() => [
70
71
  c("div", M, [
71
72
  c("div", I, [
72
73
  c("div", P, [
73
74
  u(n.$slots, "title", {}, () => [
74
75
  typeof e.title == "function" ? (l(), i(w(e.title), { key: 0 })) : (l(), m(B, { key: 1 }, [
75
- d(f(e.title), 1)
76
+ r(f(e.title), 1)
76
77
  ], 64))
77
78
  ], !0)
78
79
  ]),
79
80
  c("div", z, [
80
81
  u(n.$slots, "default", {}, () => [
81
82
  typeof e.content == "function" ? (l(), i(w(e.content), { key: 0 })) : (l(), m(B, { key: 1 }, [
82
- d(f(e.content), 1)
83
+ r(f(e.content), 1)
83
84
  ], 64))
84
85
  ], !0)
85
86
  ]),
@@ -98,22 +99,22 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
98
99
  btnHover: "",
99
100
  onClick: g
100
101
  }, {
101
- default: r(() => [
102
- d(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
102
+ default: d(() => [
103
+ r(f(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
103
104
  ]),
104
105
  _: 1
105
106
  })),
106
107
  C(k, {
107
- type: "primary",
108
+ type: e.type,
108
109
  class: "btn confirm-btn",
109
110
  loading: y(h),
110
111
  onClick: v
111
112
  }, {
112
- default: r(() => [
113
- d(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
113
+ default: d(() => [
114
+ r(f(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
114
115
  ]),
115
116
  _: 1
116
- }, 8, ["loading"])
117
+ }, 8, ["type", "loading"])
117
118
  ], !0)
118
119
  ], 8, A)
119
120
  ]),
@@ -123,7 +124,7 @@ const M = { class: "main" }, I = { class: "shim" }, P = { class: "title" }, z =
123
124
  onClick: t[0] || (t[0] = (j) => s())
124
125
  }, [
125
126
  C(H, { size: 22 }, {
126
- default: r(() => [
127
+ default: d(() => [
127
128
  C(y(L))
128
129
  ]),
129
130
  _: 1
@@ -1,4 +1,4 @@
1
- function l(o, e) {
1
+ function i(o, e) {
2
2
  if (o === "app" && e.length > 0) {
3
3
  console.error(
4
4
  `[ModalShelf] level="app" 必须最顶层,但其上存在: ${e.join(
@@ -8,14 +8,12 @@ function l(o, e) {
8
8
  return;
9
9
  }
10
10
  if (o === "page") {
11
- const r = e.filter((a) => a === "page" || a === "custom");
11
+ const r = e.filter((l) => l === "custom");
12
12
  r.length > 0 && console.error(
13
- `[ModalShelf] level="page" 之上不得套 page/custom,发现: ${r.join(
14
- ", "
15
- )}`
13
+ `[ModalShelf] level="page" 之上不得套 custom,发现: ${r.join(", ")}`
16
14
  );
17
15
  }
18
16
  }
19
17
  export {
20
- l as assertLevelHierarchy
18
+ i as assertLevelHierarchy
21
19
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableMain.vue2.mjs";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-d70ba841"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-feb76359"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };