@done-coding/admin-core 0.8.3-alpha.0 → 0.9.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 (89) hide show
  1. package/es/bridge/config-hook.mjs +37 -0
  2. package/es/bridge/index.mjs +157 -62
  3. package/es/bridge/plugin.mjs +29 -0
  4. package/es/bridge/theme.mjs +62 -0
  5. package/es/components/app-layout/AppBody.vue.mjs +1 -1
  6. package/es/components/app-layout/AppBody.vue2.mjs +47 -49
  7. package/es/components/app-layout/AppBreadcrumb.vue.mjs +1 -1
  8. package/es/components/app-layout/AppBreadcrumb.vue2.mjs +35 -41
  9. package/es/components/app-layout/AppFooter.vue.mjs +2 -2
  10. package/es/components/app-layout/AppFooter.vue2.mjs +8 -8
  11. package/es/components/app-layout/AppHeader.vue.mjs +1 -1
  12. package/es/components/app-layout/AppHeader.vue2.mjs +60 -69
  13. package/es/components/app-layout/AppLayout.vue.mjs +2 -2
  14. package/es/components/app-layout/AppLayout.vue2.mjs +95 -93
  15. package/es/components/app-layout/AppSidebar.vue.mjs +2 -2
  16. package/es/components/app-layout/AppSidebar.vue2.mjs +79 -82
  17. package/es/components/app-layout/AppTheme.vue.mjs +7 -0
  18. package/es/components/app-layout/AppTheme.vue2.mjs +38 -0
  19. package/es/components/data-view/DataListView.vue.mjs +2 -2
  20. package/es/components/data-view/DataListView.vue2.mjs +36 -36
  21. package/es/components/display/ActionConfirm.vue2.mjs +16 -16
  22. package/es/components/display/HeightProvider.vue.mjs +10 -10
  23. package/es/components/display/TabsHeader.vue.mjs +4 -4
  24. package/es/components/display/TabsHeader.vue2.mjs +34 -34
  25. package/es/components/display/TabsMain.vue.mjs +40 -39
  26. package/es/components/display/TabsRefineFlow.vue.mjs +30 -28
  27. package/es/components/form/FormItem.vue.mjs +1 -1
  28. package/es/components/form/FormItem.vue2.mjs +75 -81
  29. package/es/components/form/FormMain.vue.mjs +81 -88
  30. package/es/components/form/FormRadioGroup.vue.mjs +42 -49
  31. package/es/components/form/FormSearch.vue.mjs +1 -1
  32. package/es/components/form/FormSearch.vue2.mjs +116 -123
  33. package/es/components/form/FormSelect.vue.mjs +34 -40
  34. package/es/components/form/FormSubmitBtn.vue.mjs +23 -28
  35. package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
  36. package/es/components/form/FormSubmitPanel.vue2.mjs +16 -16
  37. package/es/components/form/FormTree.vue.mjs +16 -21
  38. package/es/components/form/FormVerifyCode.vue.mjs +37 -43
  39. package/es/components/form/FormVerifyImage.vue.mjs +2 -2
  40. package/es/components/form/FormVerifyImage.vue2.mjs +36 -41
  41. package/es/components/list-page/ListPage.vue.mjs +2 -2
  42. package/es/components/list-page/ListPage.vue2.mjs +134 -139
  43. package/es/components/menu/MenuItemSub.vue.mjs +41 -48
  44. package/es/components/menu/MenuTree.vue.mjs +58 -65
  45. package/es/components/misc/AutoRefresh.vue.mjs +2 -2
  46. package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
  47. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  48. package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
  49. package/es/components/modal/ConfirmModal.vue.mjs +3 -3
  50. package/es/components/modal/ConfirmModal.vue2.mjs +93 -100
  51. package/es/components/modal/DetailModal.vue.mjs +38 -41
  52. package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
  53. package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
  54. package/es/components/panel/PanelMain.vue.mjs +2 -2
  55. package/es/components/panel/PanelMain.vue2.mjs +67 -74
  56. package/es/components/table/TableMain.vue.mjs +2 -2
  57. package/es/components/table/TableMain.vue2.mjs +221 -229
  58. package/es/components/table/TableToolbar.vue.mjs +2 -2
  59. package/es/components/table/TableToolbar.vue2.mjs +115 -126
  60. package/es/hooks/use-admin-theme-apply.mjs +84 -0
  61. package/es/hooks/use-admin-viewport-apply.mjs +27 -0
  62. package/es/index.mjs +125 -117
  63. package/es/inject/key.mjs +7 -4
  64. package/es/store/app.mjs +75 -84
  65. package/es/style.css +1 -1
  66. package/es/utils/theme-scale.mjs +37 -0
  67. package/package.json +2 -4
  68. package/types/bridge/config-hook.d.ts +91 -0
  69. package/types/bridge/index.d.ts +108 -8
  70. package/types/bridge/plugin.d.ts +39 -0
  71. package/types/bridge/theme.d.ts +66 -0
  72. package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
  73. package/types/components/app-layout/types.d.ts +1 -1
  74. package/types/components/form/FormItem.vue.d.ts +12 -12
  75. package/types/components/form/FormTree.vue.d.ts +50 -50
  76. package/types/components/menu/MenuTree.vue.d.ts +10 -10
  77. package/types/components/modal/ModalShelf.vue.d.ts +1 -1
  78. package/types/components/table/TableMain.vue.d.ts +1 -1
  79. package/types/hooks/activated.d.ts +2 -2
  80. package/types/hooks/feel-size.d.ts +1 -1
  81. package/types/hooks/index.d.ts +2 -0
  82. package/types/hooks/menus-dispatch.d.ts +5 -5
  83. package/types/hooks/use-admin-theme-apply.d.ts +17 -0
  84. package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
  85. package/types/hooks/use-breakpoint.d.ts +1 -1
  86. package/types/inject/key.d.ts +18 -0
  87. package/types/store/app.d.ts +138 -59
  88. package/types/utils/index.d.ts +1 -0
  89. package/types/utils/theme-scale.d.ts +35 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, useAttrs as M, shallowRef as R, ref as T, computed as r, watch as P, openBlock as i, createElementBlock as j, normalizeClass as z, createVNode as G, mergeProps as c, unref as n, createSlots as H, renderList as I, withCtx as l, renderSlot as m, normalizeProps as L, guardReactiveProps as O, createBlock as u, resolveDynamicComponent as q, createElementVNode as J, createTextVNode as h, toDisplayString as C, createCommentVNode as D } from "vue";
1
+ import { defineComponent as E, useAttrs as M, shallowRef as R, ref as T, computed as r, watch as P, openBlock as n, createElementBlock as j, normalizeClass as z, createVNode as G, mergeProps as c, unref as i, createSlots as H, renderList as I, withCtx as l, renderSlot as m, normalizeProps as L, guardReactiveProps as O, createBlock as u, resolveDynamicComponent as q, createElementVNode as J, createTextVNode as h, toDisplayString as C, createCommentVNode as D } from "vue";
2
2
  import { ElAffix as K } from "element-plus";
3
3
  import Q from "./FormMain.vue.mjs";
4
4
  import U from "./FormSubmitBtn.vue.mjs";
@@ -40,11 +40,11 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
40
40
  t.rootClass
41
41
  ]), d = () => t.stringifyData ? Y(t.stringifyData, t.list) : Z(t.list), p = () => o("cancel"), y = () => {
42
42
  s.value = d();
43
- }, B = (e) => o("success", e), g = (e) => o("fail", e), { submitting: N, submit: V } = X({
43
+ }, B = (e) => o("success", e), v = (e) => o("fail", e), { submitting: N, submit: V } = X({
44
44
  getFormMainInstance: () => b.value,
45
45
  submitFn: (e) => t.submitFn(e),
46
46
  onSuccess: B,
47
- onFail: g
47
+ onFail: v
48
48
  });
49
49
  return P(s, (e) => {
50
50
  o("parseDataChange", e);
@@ -56,7 +56,7 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
56
56
  {
57
57
  immediate: !0
58
58
  }
59
- ), (e, tt) => (i(), j("div", {
59
+ ), (e, tt) => (n(), j("div", {
60
60
  class: z(["form-submit-panel", A.value])
61
61
  }, [
62
62
  G(Q, c({
@@ -64,25 +64,25 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
64
64
  ref: f,
65
65
  class: "form-submit-panel-form",
66
66
  list: a.list,
67
- data: x(n(s)),
67
+ data: x(s.value),
68
68
  "row-gutter": a.rowGutter
69
- }, n(k), {
69
+ }, i(k), {
70
70
  layout: a.layout,
71
71
  labelPosition: a.labelPosition,
72
72
  labelWidth: a.labelWidth
73
73
  }), H({ _: 2 }, [
74
- I(a.list, (v) => ({
75
- name: v.key,
74
+ I(a.list, (g) => ({
75
+ name: g.key,
76
76
  fn: l((W) => [
77
- m(e.$slots, v.key, L(O(W)), void 0, !0)
77
+ m(e.$slots, g.key, L(O(W)), void 0, !0)
78
78
  ])
79
79
  }))
80
80
  ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]),
81
- (i(), u(q($.value), c(w.value, { class: "form-submit-panel-operation" }), {
81
+ (n(), u(q($.value), c(w.value, { class: "form-submit-panel-operation" }), {
82
82
  default: l(() => [
83
83
  J("div", _, [
84
84
  m(e.$slots, "cancelBtn", { cancel: p }, () => [
85
- a.cancelBtn ? (i(), u(n(F), {
85
+ a.cancelBtn ? (n(), u(i(F), {
86
86
  key: 0,
87
87
  onClick: p
88
88
  }, {
@@ -93,7 +93,7 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
93
93
  })) : D("", !0)
94
94
  ], !0),
95
95
  m(e.$slots, "resetBtn", { reset: y }, () => [
96
- a.resetBtn ? (i(), u(n(F), {
96
+ a.resetBtn ? (n(), u(i(F), {
97
97
  key: 0,
98
98
  type: "warning",
99
99
  onClick: y
@@ -106,14 +106,14 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
106
106
  ], !0),
107
107
  e.$slots.submitBtn ? m(e.$slots, "submitBtn", {
108
108
  key: 0,
109
- submit: n(V),
110
- submitting: n(N)
111
- }, void 0, !0) : (i(), u(U, c({ key: 1 }, a.submitBtnProps, {
109
+ submit: i(V),
110
+ submitting: i(N)
111
+ }, void 0, !0) : (n(), u(U, c({ key: 1 }, a.submitBtnProps, {
112
112
  "submit-fn": a.submitFn,
113
113
  "submit-text": a.submitText,
114
114
  "form-main-instance": b.value,
115
115
  onSuccess: B,
116
- onFail: g
116
+ onFail: v
117
117
  }), null, 16, ["submit-fn", "submit-text", "form-main-instance"]))
118
118
  ])
119
119
  ]),
@@ -1,8 +1,6 @@
1
- import { ElTree as c } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/tree/style/css";
4
- import { defineComponent as m, openBlock as r, createBlock as u } from "vue";
5
- const i = /* @__PURE__ */ m({
1
+ import { defineComponent as n, openBlock as u, createBlock as c, unref as r } from "vue";
2
+ import { ElTree as m } from "element-plus";
3
+ const s = /* @__PURE__ */ n({
6
4
  __name: "FormTree",
7
5
  props: {
8
6
  modelValue: {},
@@ -11,24 +9,21 @@ const i = /* @__PURE__ */ m({
11
9
  defaultExpandAll: { type: Boolean }
12
10
  },
13
11
  emits: ["update:modelValue"],
14
- setup(e, { emit: o }) {
15
- const l = o, a = (d, { checkedKeys: t }) => {
16
- l("update:modelValue", t);
17
- };
18
- return (d, t) => {
19
- const n = c;
20
- return r(), u(n, {
21
- ref: "elTree",
22
- data: e.tree,
23
- showCheckbox: e.showCheckbox,
24
- nodeKey: "id",
25
- defaultCheckedKeys: e.modelValue,
26
- defaultExpandAll: e.defaultExpandAll,
27
- onCheck: a
28
- }, null, 8, ["data", "showCheckbox", "defaultCheckedKeys", "defaultExpandAll"]);
12
+ setup(e, { emit: a }) {
13
+ const t = a, o = (d, { checkedKeys: l }) => {
14
+ t("update:modelValue", l);
29
15
  };
16
+ return (d, l) => (u(), c(r(m), {
17
+ ref: "elTree",
18
+ data: e.tree,
19
+ showCheckbox: e.showCheckbox,
20
+ nodeKey: "id",
21
+ defaultCheckedKeys: e.modelValue,
22
+ defaultExpandAll: e.defaultExpandAll,
23
+ onCheck: o
24
+ }, null, 8, ["data", "showCheckbox", "defaultCheckedKeys", "defaultExpandAll"]));
30
25
  }
31
26
  });
32
27
  export {
33
- i as default
28
+ s as default
34
29
  };
@@ -1,10 +1,7 @@
1
- import { ElInput as B, ElButton as g } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/input/style/css";
4
- import "element-plus/es/components/button/style/css";
5
- import { defineComponent as h, ref as u, computed as x, onBeforeUnmount as _, watch as E, openBlock as n, createBlock as I, withCtx as r, createVNode as T, unref as a, createElementBlock as p, toDisplayString as c } from "vue";
1
+ import { defineComponent as b, ref as u, computed as k, onBeforeUnmount as g, watch as h, openBlock as d, createBlock as x, unref as m, withCtx as r, createVNode as B, createElementBlock as f, toDisplayString as p } from "vue";
2
+ import { ElInput as E, ElButton as T } from "element-plus";
6
3
  import { timeCountDown as z } from "../../utils/time.mjs";
7
- const K = { key: 0 }, U = { key: 1 }, A = /* @__PURE__ */ h({
4
+ const I = { key: 0 }, K = { key: 1 }, F = /* @__PURE__ */ b({
8
5
  __name: "FormVerifyCode",
9
6
  props: {
10
7
  modelValue: {},
@@ -16,57 +13,54 @@ const K = { key: 0 }, U = { key: 1 }, A = /* @__PURE__ */ h({
16
13
  btnText: { default: "发送验证码" }
17
14
  },
18
15
  emits: ["update:modelValue"],
19
- setup(o, { emit: f }) {
20
- const l = o, y = f, t = u(0), d = u(!1), i = x(() => t.value > 0);
16
+ setup(t, { emit: c }) {
17
+ const a = t, v = c, l = u(0), o = u(!1), i = k(() => l.value > 0);
21
18
  let e;
22
- const V = () => {
23
- d.value = !0, console.log("发送验证码"), l.api(l.params).then(() => {
24
- t.value = l.hz, e == null || e(), e = z(
25
- t.value,
19
+ const y = () => {
20
+ o.value = !0, console.log("发送验证码"), a.api(a.params).then(() => {
21
+ l.value = a.hz, e == null || e(), e = z(
22
+ l.value,
26
23
  (s) => {
27
- t.value = s;
24
+ l.value = s;
28
25
  },
29
26
  () => {
30
27
  console.log("倒计时结束");
31
28
  }
32
29
  );
33
30
  }).finally(() => {
34
- d.value = !1;
31
+ o.value = !1;
35
32
  });
36
33
  };
37
- return _(() => {
34
+ return g(() => {
38
35
  e == null || e();
39
- }), E(
40
- () => l.resetKey,
36
+ }), h(
37
+ () => a.resetKey,
41
38
  () => {
42
- e == null || e(), t.value = 0;
39
+ e == null || e(), l.value = 0;
43
40
  }
44
- ), (s, m) => {
45
- const b = g, v = B;
46
- return n(), I(v, {
47
- modelValue: o.modelValue,
48
- disabled: o.disabled,
49
- "onUpdate:modelValue": m[0] || (m[0] = (k) => y("update:modelValue", k))
50
- }, {
51
- suffix: r(() => [
52
- T(b, {
53
- type: "primary",
54
- link: "",
55
- loading: a(d),
56
- disabled: a(i) || o.disabled,
57
- onClick: V
58
- }, {
59
- default: r(() => [
60
- a(i) ? (n(), p("span", K, c(a(t)) + "s后可重新发送", 1)) : (n(), p("span", U, c(o.btnText), 1))
61
- ]),
62
- _: 1
63
- }, 8, ["loading", "disabled"])
64
- ]),
65
- _: 1
66
- }, 8, ["modelValue", "disabled"]);
67
- };
41
+ ), (s, n) => (d(), x(m(E), {
42
+ modelValue: t.modelValue,
43
+ disabled: t.disabled,
44
+ "onUpdate:modelValue": n[0] || (n[0] = (V) => v("update:modelValue", V))
45
+ }, {
46
+ suffix: r(() => [
47
+ B(m(T), {
48
+ type: "primary",
49
+ link: "",
50
+ loading: o.value,
51
+ disabled: i.value || t.disabled,
52
+ onClick: y
53
+ }, {
54
+ default: r(() => [
55
+ i.value ? (d(), f("span", I, p(l.value) + "s后可重新发送", 1)) : (d(), f("span", K, p(t.btnText), 1))
56
+ ]),
57
+ _: 1
58
+ }, 8, ["loading", "disabled"])
59
+ ]),
60
+ _: 1
61
+ }, 8, ["modelValue", "disabled"]));
68
62
  }
69
63
  });
70
64
  export {
71
- A as default
65
+ F as default
72
66
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormVerifyImage.vue2.mjs";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a4baf877"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-669b7ad9"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1,8 +1,6 @@
1
- import { ElInput as x } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/input/style/css";
4
- import { defineComponent as V, ref as r, computed as s, onMounted as _, openBlock as k, createBlock as U, normalizeStyle as u, unref as o, withCtx as I, createElementVNode as c } from "vue";
5
- const R = ["disabled"], $ = ["src"], d = "9px", E = /* @__PURE__ */ V({
1
+ import { defineComponent as y, ref as m, computed as n, onMounted as h, openBlock as x, createBlock as V, unref as _, normalizeStyle as s, withCtx as k, createElementVNode as u } from "vue";
2
+ import { ElInput as U } from "element-plus";
3
+ const R = ["disabled"], $ = ["src"], d = "9px", B = /* @__PURE__ */ y({
6
4
  __name: "FormVerifyImage",
7
5
  props: {
8
6
  modelValue: {},
@@ -12,49 +10,46 @@ const R = ["disabled"], $ = ["src"], d = "9px", E = /* @__PURE__ */ V({
12
10
  autoRevokeUrl: { type: Boolean }
13
11
  },
14
12
  emits: ["update:modelValue"],
15
- setup(a, { emit: f }) {
16
- const e = a, p = f, t = r(!1), l = r(""), g = s(() => ({
13
+ setup(a, { emit: c }) {
14
+ const e = a, f = c, l = m(!1), t = m(""), p = n(() => ({
17
15
  left: `calc(100% + ${d})`,
18
16
  width: `${e.imgWidth}px`
19
- })), v = s(() => ({
17
+ })), v = n(() => ({
20
18
  width: `calc(100% - ${d} - ${e.imgWidth}px)`
21
- })), i = () => {
22
- t.value || (console.log("获取图片验证码"), t.value = !0, l.value && e.autoRevokeUrl && URL.revokeObjectURL(l.value), e.api(e.params).then((n) => {
23
- l.value = n;
19
+ })), o = () => {
20
+ l.value || (console.log("获取图片验证码"), l.value = !0, t.value && e.autoRevokeUrl && URL.revokeObjectURL(t.value), e.api(e.params).then((i) => {
21
+ t.value = i;
24
22
  }).finally(() => {
25
- t.value = !1;
23
+ l.value = !1;
26
24
  }));
27
25
  };
28
- return _(() => {
29
- i();
30
- }), (n, m) => {
31
- const y = x;
32
- return k(), U(y, {
33
- placeholder: "验证码",
34
- modelValue: a.modelValue,
35
- class: "form-verify-image",
36
- style: u(o(v)),
37
- "onUpdate:modelValue": m[0] || (m[0] = (h) => p("update:modelValue", h))
38
- }, {
39
- suffix: I(() => [
40
- c("div", {
41
- class: "form-verify-image-suffix",
42
- style: u(o(g)),
43
- disabled: o(t),
44
- onClick: i
45
- }, [
46
- c("img", {
47
- class: "form-verify-image-suffix-main",
48
- src: o(l),
49
- alt: ""
50
- }, null, 8, $)
51
- ], 12, R)
52
- ]),
53
- _: 1
54
- }, 8, ["modelValue", "style"]);
55
- };
26
+ return h(() => {
27
+ o();
28
+ }), (i, r) => (x(), V(_(U), {
29
+ placeholder: "验证码",
30
+ modelValue: a.modelValue,
31
+ class: "form-verify-image",
32
+ style: s(v.value),
33
+ "onUpdate:modelValue": r[0] || (r[0] = (g) => f("update:modelValue", g))
34
+ }, {
35
+ suffix: k(() => [
36
+ u("div", {
37
+ class: "form-verify-image-suffix",
38
+ style: s(p.value),
39
+ disabled: l.value,
40
+ onClick: o
41
+ }, [
42
+ u("img", {
43
+ class: "form-verify-image-suffix-main",
44
+ src: t.value,
45
+ alt: ""
46
+ }, null, 8, $)
47
+ ], 12, R)
48
+ ]),
49
+ _: 1
50
+ }, 8, ["modelValue", "style"]));
56
51
  }
57
52
  });
58
53
  export {
59
- E as default
54
+ B as default
60
55
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ListPage.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d70424b6"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fc41e3d4"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };