@done-coding/admin-core 0.8.2 → 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 (94) 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 +24 -35
  35. package/es/components/form/FormSubmitPanel.vue.mjs +2 -2
  36. package/es/components/form/FormSubmitPanel.vue2.mjs +75 -55
  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/form/use-form-submit.mjs +21 -0
  42. package/es/components/list-page/ListPage.vue.mjs +2 -2
  43. package/es/components/list-page/ListPage.vue2.mjs +134 -139
  44. package/es/components/menu/MenuItemSub.vue.mjs +41 -48
  45. package/es/components/menu/MenuTree.vue.mjs +58 -65
  46. package/es/components/misc/AutoRefresh.vue.mjs +2 -2
  47. package/es/components/misc/AutoRefresh.vue2.mjs +44 -51
  48. package/es/components/misc/AutoRefreshGroup.vue.mjs +2 -2
  49. package/es/components/misc/AutoRefreshGroup.vue2.mjs +37 -43
  50. package/es/components/modal/ConfirmModal.vue.mjs +3 -3
  51. package/es/components/modal/ConfirmModal.vue2.mjs +93 -100
  52. package/es/components/modal/DetailModal.vue.mjs +38 -41
  53. package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
  54. package/es/components/panel/PanelEditSwitch.vue2.mjs +50 -55
  55. package/es/components/panel/PanelMain.vue.mjs +2 -2
  56. package/es/components/panel/PanelMain.vue2.mjs +67 -74
  57. package/es/components/table/TableMain.vue.mjs +2 -2
  58. package/es/components/table/TableMain.vue2.mjs +221 -229
  59. package/es/components/table/TableToolbar.vue.mjs +2 -2
  60. package/es/components/table/TableToolbar.vue2.mjs +115 -126
  61. package/es/hooks/use-admin-theme-apply.mjs +84 -0
  62. package/es/hooks/use-admin-viewport-apply.mjs +27 -0
  63. package/es/index.mjs +125 -117
  64. package/es/inject/key.mjs +7 -4
  65. package/es/store/app.mjs +75 -84
  66. package/es/style.css +1 -1
  67. package/es/utils/theme-scale.mjs +37 -0
  68. package/package.json +2 -4
  69. package/types/bridge/config-hook.d.ts +91 -0
  70. package/types/bridge/index.d.ts +110 -10
  71. package/types/bridge/plugin.d.ts +39 -0
  72. package/types/bridge/theme.d.ts +66 -0
  73. package/types/components/app-layout/AppTheme.vue.d.ts +2 -0
  74. package/types/components/app-layout/types.d.ts +1 -1
  75. package/types/components/form/FormItem.vue.d.ts +12 -12
  76. package/types/components/form/FormSubmitPanel.vue.d.ts +4 -0
  77. package/types/components/form/FormTree.vue.d.ts +50 -50
  78. package/types/components/form/types.d.ts +17 -0
  79. package/types/components/form/use-form-submit.d.ts +25 -0
  80. package/types/components/menu/MenuTree.vue.d.ts +10 -10
  81. package/types/components/modal/ModalShelf.vue.d.ts +1 -1
  82. package/types/components/table/TableMain.vue.d.ts +1 -1
  83. package/types/hooks/activated.d.ts +2 -2
  84. package/types/hooks/feel-size.d.ts +1 -1
  85. package/types/hooks/index.d.ts +2 -0
  86. package/types/hooks/menus-dispatch.d.ts +5 -5
  87. package/types/hooks/use-admin-theme-apply.d.ts +17 -0
  88. package/types/hooks/use-admin-viewport-apply.d.ts +15 -0
  89. package/types/hooks/use-breakpoint.d.ts +1 -1
  90. package/types/inject/key.d.ts +18 -0
  91. package/types/store/app.d.ts +138 -59
  92. package/types/store/user.d.ts +3 -3
  93. package/types/utils/index.d.ts +1 -0
  94. package/types/utils/theme-scale.d.ts +35 -0
@@ -1,10 +1,11 @@
1
- import { defineComponent as V, useAttrs as W, shallowRef as E, ref as R, computed as l, watch as B, openBlock as o, createElementBlock as T, normalizeClass as j, createVNode as g, mergeProps as m, unref as r, createSlots as z, renderList as G, withCtx as s, renderSlot as c, normalizeProps as H, guardReactiveProps as M, createBlock as u, resolveDynamicComponent as I, createElementVNode as L, createTextVNode as P, toDisplayString as h, createCommentVNode as x } from "vue";
2
- import { ElAffix as O } from "element-plus";
3
- import q from "./FormMain.vue.mjs";
4
- import J from "./FormSubmitBtn.vue.mjs";
5
- import D from "../display/ActionBtn.vue.mjs";
6
- import { parseFormData as K, generateFormData as Q } from "./utils.mjs";
7
- const U = { class: "form-submit-panel-operation-inner" }, nt = /* @__PURE__ */ V({
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
+ import { ElAffix as K } from "element-plus";
3
+ import Q from "./FormMain.vue.mjs";
4
+ import U from "./FormSubmitBtn.vue.mjs";
5
+ import { useFormSubmit as X } from "./use-form-submit.mjs";
6
+ import F from "../display/ActionBtn.vue.mjs";
7
+ import { parseFormData as Y, generateFormData as Z } from "./utils.mjs";
8
+ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E({
8
9
  name: "FormSubmitPanel",
9
10
  inheritAttrs: !1,
10
11
  __name: "FormSubmitPanel",
@@ -23,78 +24,97 @@ const U = { class: "form-submit-panel-operation-inner" }, nt = /* @__PURE__ */ V
23
24
  cancelBtn: {},
24
25
  resetBtn: {},
25
26
  operationPosition: { default: "bottom-center" },
26
- operationAffix: { type: [Boolean, Object], default: !1 }
27
+ operationAffix: { type: [Boolean, Object], default: !1 },
28
+ divider: { type: Boolean, default: !0 },
29
+ bare: { type: Boolean, default: !1 },
30
+ rootClass: {}
27
31
  },
28
32
  emits: ["cancel", "fail", "success", "parseDataChange"],
29
- setup(t, { emit: v }) {
30
- const a = t, n = v, k = W(), f = E(), i = R({}), C = (e) => e, S = l(() => f.value), w = l(() => a.operationAffix ? O : "div"), A = l(() => a.operationAffix ? typeof a.operationAffix == "object" ? a.operationAffix : { position: "bottom" } : {}), d = () => a.stringifyData ? K(a.stringifyData, a.list) : Q(a.list), b = () => n("cancel"), p = () => {
31
- i.value = d();
32
- }, F = (e) => n("success", e), $ = (e) => n("fail", e);
33
- return B(i, (e) => {
34
- n("parseDataChange", e);
35
- }), B(
36
- [() => a.stringifyData, () => a.list],
33
+ setup(a, { emit: S }) {
34
+ const t = a, o = S, k = M(), f = R(), s = T({}), x = (e) => e, b = r(() => f.value), $ = r(() => t.operationAffix ? K : "div"), w = r(() => t.operationAffix ? typeof t.operationAffix == "object" ? t.operationAffix : { position: "bottom" } : {}), A = r(() => [
35
+ `form-submit-panel_${t.operationPosition}`,
36
+ {
37
+ "form-submit-panel_no-divider": !t.divider,
38
+ "form-submit-panel_bare": t.bare
39
+ },
40
+ t.rootClass
41
+ ]), d = () => t.stringifyData ? Y(t.stringifyData, t.list) : Z(t.list), p = () => o("cancel"), y = () => {
42
+ s.value = d();
43
+ }, B = (e) => o("success", e), v = (e) => o("fail", e), { submitting: N, submit: V } = X({
44
+ getFormMainInstance: () => b.value,
45
+ submitFn: (e) => t.submitFn(e),
46
+ onSuccess: B,
47
+ onFail: v
48
+ });
49
+ return P(s, (e) => {
50
+ o("parseDataChange", e);
51
+ }), P(
52
+ [() => t.stringifyData, () => t.list],
37
53
  () => {
38
- i.value = d();
54
+ s.value = d();
39
55
  },
40
56
  {
41
57
  immediate: !0
42
58
  }
43
- ), (e, X) => (o(), T("div", {
44
- class: j(["form-submit-panel", `form-submit-panel_${t.operationPosition}`])
59
+ ), (e, tt) => (n(), j("div", {
60
+ class: z(["form-submit-panel", A.value])
45
61
  }, [
46
- g(q, m({
62
+ G(Q, c({
47
63
  ref_key: "formMain",
48
64
  ref: f,
49
65
  class: "form-submit-panel-form",
50
- list: t.list,
51
- data: C(r(i)),
52
- "row-gutter": t.rowGutter
53
- }, r(k), {
54
- layout: t.layout,
55
- labelPosition: t.labelPosition,
56
- labelWidth: t.labelWidth
57
- }), z({ _: 2 }, [
58
- G(t.list, (y) => ({
59
- name: y.key,
60
- fn: s((N) => [
61
- c(e.$slots, y.key, H(M(N)), void 0, !0)
66
+ list: a.list,
67
+ data: x(s.value),
68
+ "row-gutter": a.rowGutter
69
+ }, i(k), {
70
+ layout: a.layout,
71
+ labelPosition: a.labelPosition,
72
+ labelWidth: a.labelWidth
73
+ }), H({ _: 2 }, [
74
+ I(a.list, (g) => ({
75
+ name: g.key,
76
+ fn: l((W) => [
77
+ m(e.$slots, g.key, L(O(W)), void 0, !0)
62
78
  ])
63
79
  }))
64
80
  ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]),
65
- (o(), u(I(w.value), m(A.value, { class: "form-submit-panel-operation" }), {
66
- default: s(() => [
67
- L("div", U, [
68
- c(e.$slots, "cancelBtn", { cancel: b }, () => [
69
- t.cancelBtn ? (o(), u(r(D), {
81
+ (n(), u(q($.value), c(w.value, { class: "form-submit-panel-operation" }), {
82
+ default: l(() => [
83
+ J("div", _, [
84
+ m(e.$slots, "cancelBtn", { cancel: p }, () => [
85
+ a.cancelBtn ? (n(), u(i(F), {
70
86
  key: 0,
71
- onClick: b
87
+ onClick: p
72
88
  }, {
73
- default: s(() => [
74
- P(h(t.cancelBtn), 1)
89
+ default: l(() => [
90
+ h(C(a.cancelBtn), 1)
75
91
  ]),
76
92
  _: 1
77
- })) : x("", !0)
93
+ })) : D("", !0)
78
94
  ], !0),
79
- c(e.$slots, "resetBtn", { reset: p }, () => [
80
- t.resetBtn ? (o(), u(r(D), {
95
+ m(e.$slots, "resetBtn", { reset: y }, () => [
96
+ a.resetBtn ? (n(), u(i(F), {
81
97
  key: 0,
82
98
  type: "warning",
83
- onClick: p
99
+ onClick: y
84
100
  }, {
85
- default: s(() => [
86
- P(h(t.resetBtn), 1)
101
+ default: l(() => [
102
+ h(C(a.resetBtn), 1)
87
103
  ]),
88
104
  _: 1
89
- })) : x("", !0)
105
+ })) : D("", !0)
90
106
  ], !0),
91
- g(J, m(t.submitBtnProps, {
92
- "submit-fn": t.submitFn,
93
- "submit-text": t.submitText,
94
- "form-main-instance": S.value,
95
- onSuccess: F,
96
- onFail: $
97
- }), null, 16, ["submit-fn", "submit-text", "form-main-instance"])
107
+ e.$slots.submitBtn ? m(e.$slots, "submitBtn", {
108
+ key: 0,
109
+ submit: i(V),
110
+ submitting: i(N)
111
+ }, void 0, !0) : (n(), u(U, c({ key: 1 }, a.submitBtnProps, {
112
+ "submit-fn": a.submitFn,
113
+ "submit-text": a.submitText,
114
+ "form-main-instance": b.value,
115
+ onSuccess: B,
116
+ onFail: v
117
+ }), null, 16, ["submit-fn", "submit-text", "form-main-instance"]))
98
118
  ])
99
119
  ]),
100
120
  _: 3
@@ -103,5 +123,5 @@ const U = { class: "form-submit-panel-operation-inner" }, nt = /* @__PURE__ */ V
103
123
  }
104
124
  });
105
125
  export {
106
- nt as default
126
+ lt as default
107
127
  };
@@ -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
  };
@@ -0,0 +1,21 @@
1
+ import { ref as m } from "vue";
2
+ function i(a) {
3
+ const e = m(!1);
4
+ return { submitting: e, submit: async () => {
5
+ var t, c;
6
+ e.value = !0;
7
+ try {
8
+ const r = a.getFormMainInstance();
9
+ await r.validate();
10
+ const u = r.stringify();
11
+ await a.submitFn(u), (t = a.onSuccess) == null || t.call(a, u);
12
+ } catch (r) {
13
+ (c = a.onFail) == null || c.call(a, r);
14
+ } finally {
15
+ e.value = !1;
16
+ }
17
+ } };
18
+ }
19
+ export {
20
+ i as useFormSubmit
21
+ };
@@ -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
  };