@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,16 +1,12 @@
1
- import L from "./FormMain.vue.mjs";
2
- import { ElCol as T, ElButton as H, ElIcon as U } from "element-plus/es";
3
- import "element-plus/es/components/base/style/css";
4
- import "element-plus/es/components/col/style/css";
5
- import "element-plus/es/components/button/style/css";
6
- import "element-plus/es/components/icon/style/css";
7
- import { defineComponent as j, useAttrs as q, ref as k, computed as l, shallowRef as J, openBlock as f, createBlock as p, normalizeClass as K, unref as r, withCtx as a, withDirectives as O, createVNode as m, mergeProps as X, createSlots as Y, normalizeProps as R, guardReactiveProps as S, createElementVNode as Z, createTextVNode as y, toDisplayString as ee, createCommentVNode as te, renderList as oe, renderSlot as re, vShow as ae } from "vue";
8
- import { stringifyFormData as ne } from "./utils.mjs";
9
- import { getCurrentSpan as se, computeButtonColProps as le, computeItemsPerRow as ie } from "./form-search-utils.mjs";
10
- import { ArrowDown as ue, ArrowUp as me } from "@element-plus/icons-vue";
11
- import ce from "../display/WatchSize.vue.mjs";
12
- import { useBreakpoint as de } from "../../hooks/use-breakpoint.mjs";
13
- const fe = { class: "btn-box" }, Pe = /* @__PURE__ */ j({
1
+ import { defineComponent as z, useAttrs as G, ref as x, computed as i, shallowRef as L, openBlock as d, createBlock as f, normalizeClass as T, withCtx as a, withDirectives as H, createVNode as m, mergeProps as U, unref as l, createSlots as j, normalizeProps as S, guardReactiveProps as k, createElementVNode as q, createTextVNode as w, toDisplayString as J, createCommentVNode as K, renderList as O, renderSlot as X, vShow as Y } from "vue";
2
+ import { stringifyFormData as Z } from "./utils.mjs";
3
+ import { getCurrentSpan as _, computeButtonColProps as ee, computeItemsPerRow as te } from "./form-search-utils.mjs";
4
+ import { ElCol as oe, ElButton as g, ElIcon as re } from "element-plus";
5
+ import { ArrowDown as ae, ArrowUp as le } from "@element-plus/icons-vue";
6
+ import se from "./FormMain.vue.mjs";
7
+ import ne from "../display/WatchSize.vue.mjs";
8
+ import { useBreakpoint as ie } from "../../hooks/use-breakpoint.mjs";
9
+ const ue = { class: "btn-box" }, ge = /* @__PURE__ */ z({
14
10
  name: "FormSearch",
15
11
  inheritAttrs: !1,
16
12
  __name: "FormSearch",
@@ -28,151 +24,149 @@ const fe = { class: "btn-box" }, Pe = /* @__PURE__ */ j({
28
24
  lg: 8,
29
25
  xl: 6
30
26
  }) },
31
- rowGutter: {}
27
+ rowGutter: {},
28
+ layoutScale: {}
32
29
  },
33
30
  emits: ["search", "heightChange", "visibleChange"],
34
- setup(i, { expose: P, emit: _ }) {
35
- const o = i, c = _, E = q(), h = k(!1), { activeBreakpoint: F } = de(), n = k(!0), B = l(() => o.data), v = l(() => {
31
+ setup(u, { expose: R, emit: P }) {
32
+ const o = u, c = P, F = G(), h = x(!1), { activeBreakpoint: B } = ie(), s = x(!0), M = i(() => o.data), v = i(() => {
36
33
  if (o.maxRows <= 0) return 1 / 0;
37
- const e = se(o.layout, F.value), t = ie(e), u = t > 1 ? 1 : 0;
38
- return Math.max(0, o.maxRows * t - u);
39
- }), M = l(() => o.maxRows <= 0 ? !1 : o.list.filter(
34
+ const e = _(o.layout, B.value), t = te(e), r = t > 1 ? 1 : 0;
35
+ return Math.max(0, o.maxRows * t - r);
36
+ }), V = i(() => o.maxRows <= 0 ? !1 : o.list.filter(
40
37
  (t) => t.hide !== !0
41
- ).length > v.value), V = l(() => {
38
+ ).length > v.value), E = i(() => {
42
39
  let e = 0;
43
40
  for (let t = 0; t < o.list.length; t++)
44
- o.list[t].hide !== !0 && (n.value && o.maxRows > 0 && t >= v.value || e++);
41
+ o.list[t].hide !== !0 && (s.value && o.maxRows > 0 && t >= v.value || e++);
45
42
  return e;
46
- }), I = l(() => le(o.layout, V.value)), D = l(() => {
47
- if (!n.value || o.maxRows <= 0)
43
+ }), D = i(() => ee(o.layout, E.value)), I = i(() => {
44
+ if (!s.value || o.maxRows <= 0)
48
45
  return o.list;
49
46
  const e = v.value;
50
47
  return o.list.map(
51
- (t, u) => u >= e ? { ...t, hide: !0 } : t
48
+ (t, r) => r >= e ? { ...t, hide: !0 } : t
52
49
  );
53
- }), C = (e = !n.value) => {
54
- n.value = e;
55
- }, $ = (e) => {
50
+ }), y = (e = !s.value) => {
51
+ s.value = e;
52
+ }, A = (e) => {
56
53
  c("heightChange", e);
57
- }, s = J(), b = (e) => ({
54
+ }, n = L(), b = (e) => ({
58
55
  ...o.staticQuery || {},
59
- ...ne(e, o.list)
60
- }), x = () => {
56
+ ...Z(e, o.list)
57
+ }), C = () => {
61
58
  var e;
62
- (e = s.value) == null || e.resetFields(), c("search", b(o.data), "reset");
63
- }, w = (e = "search") => {
59
+ (e = n.value) == null || e.resetFields(), c("search", b(o.data), "reset");
60
+ }, p = (e = "search") => {
64
61
  var t;
65
- (t = s.value) == null || t.validate().then(() => {
62
+ (t = n.value) == null || t.validate().then(() => {
66
63
  c("search", b(o.data), e);
67
64
  });
68
- }, A = (e) => {
69
- w(e);
70
- }, N = {
65
+ }, N = (e) => {
66
+ p(e);
67
+ }, W = {
71
68
  validate: () => {
72
- if (s.value)
73
- return s.value.validate();
69
+ if (n.value)
70
+ return n.value.validate();
74
71
  throw new Error("实例化未完成");
75
72
  },
76
73
  resetFields: () => {
77
74
  var e;
78
- return (e = s.value) == null ? void 0 : e.resetFields();
75
+ return (e = n.value) == null ? void 0 : e.resetFields();
79
76
  },
80
77
  clearValidate: (e) => {
81
78
  var t;
82
- return (t = s.value) == null ? void 0 : t.clearValidate(e);
79
+ return (t = n.value) == null ? void 0 : t.clearValidate(e);
83
80
  },
84
- triggerReset: x,
85
- triggerSearch: () => w(),
86
- toggleCollapse: C,
87
- isCollapsed: l(() => n.value)
81
+ triggerReset: C,
82
+ triggerSearch: () => p(),
83
+ toggleCollapse: y,
84
+ isCollapsed: i(() => s.value)
88
85
  };
89
- P(N);
90
- const W = (e) => {
86
+ R(W);
87
+ const $ = (e) => {
91
88
  h.value = e, c("visibleChange", e);
92
89
  };
93
- return (e, t) => {
94
- const u = U, g = H, Q = T, z = L;
95
- return f(), p(ce, {
96
- class: K(["form-search", {
97
- "form-search_show": r(h)
98
- }]),
99
- onHeightChange: $
100
- }, {
101
- default: a(() => [
102
- O(m(z, X({
103
- ref_key: "formMain",
104
- ref: s,
105
- list: r(D),
106
- data: r(B),
107
- "row-gutter": i.rowGutter
108
- }, r(E), {
109
- layout: i.layout,
110
- labelPosition: i.labelPosition,
111
- labelWidth: i.labelWidth,
112
- onSubmit: A,
113
- onVisibleChange: W
114
- }), Y({
115
- default: a(() => [
116
- m(Q, R(S(r(I))), {
117
- default: a(() => [
118
- Z("div", fe, [
119
- r(M) ? (f(), p(g, {
120
- key: 0,
121
- type: "primary",
122
- link: "",
123
- onMousedown: t[0] || (t[0] = (d) => C())
124
- }, {
125
- default: a(() => [
126
- m(u, { class: "btn-box-expand-icon" }, {
127
- default: a(() => [
128
- r(n) ? (f(), p(r(ue), { key: 0 })) : (f(), p(r(me), { key: 1 }))
129
- ]),
130
- _: 1
131
- }),
132
- y(" " + ee(r(n) ? "展开更多" : "收起更多"), 1)
133
- ]),
134
- _: 1
135
- })) : te("", !0),
136
- m(g, {
137
- type: "warning",
138
- onMousedown: x
139
- }, {
140
- default: a(() => [...t[2] || (t[2] = [
141
- y("重置", -1)
142
- ])]),
143
- _: 1
144
- }),
145
- m(g, {
146
- type: "primary",
147
- onMousedown: t[1] || (t[1] = (d) => w())
148
- }, {
149
- default: a(() => [...t[3] || (t[3] = [
150
- y("查询", -1)
151
- ])]),
152
- _: 1
153
- })
154
- ])
155
- ]),
156
- _: 1
157
- }, 16)
158
- ]),
159
- _: 2
160
- }, [
161
- oe(i.list, (d) => ({
162
- name: d.key,
163
- fn: a((G) => [
164
- re(e.$slots, d.key, R(S(G)), void 0, !0)
165
- ])
166
- }))
167
- ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]), [
168
- [ae, r(h)]
169
- ])
170
- ]),
171
- _: 3
172
- }, 8, ["class"]);
173
- };
90
+ return (e, t) => (d(), f(ne, {
91
+ class: T(["form-search", {
92
+ "form-search_show": h.value
93
+ }]),
94
+ onHeightChange: A
95
+ }, {
96
+ default: a(() => [
97
+ H(m(se, U({
98
+ ref_key: "formMain",
99
+ ref: n,
100
+ list: I.value,
101
+ data: M.value,
102
+ "row-gutter": u.rowGutter
103
+ }, l(F), {
104
+ layout: u.layout,
105
+ labelPosition: u.labelPosition,
106
+ labelWidth: u.labelWidth,
107
+ onSubmit: N,
108
+ onVisibleChange: $
109
+ }), j({
110
+ default: a(() => [
111
+ m(l(oe), S(k(D.value)), {
112
+ default: a(() => [
113
+ q("div", ue, [
114
+ V.value ? (d(), f(l(g), {
115
+ key: 0,
116
+ type: "primary",
117
+ link: "",
118
+ onMousedown: t[0] || (t[0] = (r) => y())
119
+ }, {
120
+ default: a(() => [
121
+ m(l(re), { class: "btn-box-expand-icon" }, {
122
+ default: a(() => [
123
+ s.value ? (d(), f(l(ae), { key: 0 })) : (d(), f(l(le), { key: 1 }))
124
+ ]),
125
+ _: 1
126
+ }),
127
+ w(" " + J(s.value ? "展开更多" : "收起更多"), 1)
128
+ ]),
129
+ _: 1
130
+ })) : K("", !0),
131
+ m(l(g), {
132
+ type: "warning",
133
+ onMousedown: C
134
+ }, {
135
+ default: a(() => [...t[2] || (t[2] = [
136
+ w("重置", -1)
137
+ ])]),
138
+ _: 1
139
+ }),
140
+ m(l(g), {
141
+ type: "primary",
142
+ onMousedown: t[1] || (t[1] = (r) => p())
143
+ }, {
144
+ default: a(() => [...t[3] || (t[3] = [
145
+ w("查询", -1)
146
+ ])]),
147
+ _: 1
148
+ })
149
+ ])
150
+ ]),
151
+ _: 1
152
+ }, 16)
153
+ ]),
154
+ _: 2
155
+ }, [
156
+ O(u.list, (r) => ({
157
+ name: r.key,
158
+ fn: a((Q) => [
159
+ X(e.$slots, r.key, S(k(Q)), void 0, !0)
160
+ ])
161
+ }))
162
+ ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]), [
163
+ [Y, h.value]
164
+ ])
165
+ ]),
166
+ _: 3
167
+ }, 8, ["class"]));
174
168
  }
175
169
  });
176
170
  export {
177
- Pe as default
171
+ ge as default
178
172
  };
@@ -1,9 +1,6 @@
1
- import { ElSelect as E, ElOption as S } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/select/style/css";
4
- import "element-plus/es/components/option/style/css";
5
- import { defineComponent as k, useAttrs as w, ref as f, computed as n, onMounted as B, watch as F, openBlock as m, createBlock as h, mergeProps as _, unref as r, withCtx as v, createElementBlock as x, Fragment as y, renderList as D, normalizeClass as z, renderSlot as A } from "vue";
6
- const j = /* @__PURE__ */ k({
1
+ import { defineComponent as C, useAttrs as O, ref as v, computed as n, onMounted as k, watch as S, openBlock as s, createBlock as f, unref as u, mergeProps as w, withCtx as h, createElementBlock as B, Fragment as E, renderList as F, normalizeClass as x, renderSlot as y } from "vue";
2
+ import { ElSelect as D, ElOption as z } from "element-plus";
3
+ const P = /* @__PURE__ */ C({
7
4
  name: "FormSelect",
8
5
  __name: "FormSelect",
9
6
  props: {
@@ -14,52 +11,49 @@ const j = /* @__PURE__ */ k({
14
11
  getOptions: {}
15
12
  },
16
13
  emits: ["update:modelValue", "detailChange"],
17
- setup(l, { emit: b }) {
18
- const t = l, d = b, M = w(), u = f([]), i = f([]), s = n(() => !!t.remoteMethod), O = n(() => t.getOptions ? u.value : t.options), c = n(() => s.value ? i.value : O.value), V = n(() => c.value.find((e) => e.value === t.modelValue)), p = async (e) => {
14
+ setup(o, { emit: b }) {
15
+ const t = o, d = b, M = O(), m = v([]), i = v([]), r = n(() => !!t.remoteMethod), V = n(() => t.getOptions ? m.value : t.options), c = n(() => r.value ? i.value : V.value), g = n(() => c.value.find((e) => e.value === t.modelValue)), p = async (e) => {
19
16
  i.value = await t.remoteMethod(e);
20
17
  };
21
- return B(() => {
18
+ return k(() => {
22
19
  var e;
23
20
  t.remoteMethod ? p() : (e = t.getOptions) == null || e.call(t).then((a) => {
24
- u.value = a;
21
+ m.value = a;
25
22
  });
26
- }), F(
27
- V,
23
+ }), S(
24
+ g,
28
25
  (e) => {
29
26
  d("detailChange", e);
30
27
  },
31
28
  {
32
29
  immediate: !0
33
30
  }
34
- ), (e, a) => {
35
- const g = S, C = E;
36
- return m(), h(C, _({
37
- modelValue: l.modelValue,
38
- remote: r(s),
39
- filterable: r(s),
40
- remoteMethod: l.remoteMethod && p
41
- }, r(M), {
42
- "onUpdate:modelValue": a[0] || (a[0] = (o) => d("update:modelValue", o))
43
- }), {
44
- default: v(() => [
45
- (m(!0), x(y, null, D(r(c), (o) => (m(), h(g, {
46
- key: o.value,
47
- class: z(l.itemCls),
48
- label: o.label,
49
- value: o.value,
50
- disabled: o.disabled
51
- }, {
52
- default: v(() => [
53
- A(e.$slots, "option", { data: o })
54
- ]),
55
- _: 2
56
- }, 1032, ["class", "label", "value", "disabled"]))), 128))
57
- ]),
58
- _: 3
59
- }, 16, ["modelValue", "remote", "filterable", "remoteMethod"]);
60
- };
31
+ ), (e, a) => (s(), f(u(D), w({
32
+ modelValue: o.modelValue,
33
+ remote: r.value,
34
+ filterable: r.value,
35
+ remoteMethod: o.remoteMethod && p
36
+ }, u(M), {
37
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => d("update:modelValue", l))
38
+ }), {
39
+ default: h(() => [
40
+ (s(!0), B(E, null, F(c.value, (l) => (s(), f(u(z), {
41
+ key: l.value,
42
+ class: x(o.itemCls),
43
+ label: l.label,
44
+ value: l.value,
45
+ disabled: l.disabled
46
+ }, {
47
+ default: h(() => [
48
+ y(e.$slots, "option", { data: l })
49
+ ]),
50
+ _: 2
51
+ }, 1032, ["class", "label", "value", "disabled"]))), 128))
52
+ ]),
53
+ _: 3
54
+ }, 16, ["modelValue", "remote", "filterable", "remoteMethod"]));
61
55
  }
62
56
  });
63
57
  export {
64
- j as default
58
+ P as default
65
59
  };
@@ -1,10 +1,8 @@
1
- import { ElButton as l } from "element-plus/es";
2
- import "element-plus/es/components/base/style/css";
3
- import "element-plus/es/components/button/style/css";
4
- import { defineComponent as p, computed as u, openBlock as f, createBlock as d, mergeProps as B, unref as e, withCtx as y, createTextVNode as b, toDisplayString as g } from "vue";
5
- import { useFormSubmit as x } from "./use-form-submit.mjs";
6
- import F from "lodash/omit";
7
- const h = /* @__PURE__ */ p({
1
+ import { defineComponent as c, computed as l, openBlock as p, createBlock as u, unref as o, mergeProps as f, withCtx as d, createTextVNode as y, toDisplayString as B } from "vue";
2
+ import { ElButton as b } from "element-plus";
3
+ import { useFormSubmit as g } from "./use-form-submit.mjs";
4
+ import x from "lodash/omit";
5
+ const T = /* @__PURE__ */ c({
8
6
  __name: "FormSubmitBtn",
9
7
  props: {
10
8
  size: {},
@@ -30,29 +28,26 @@ const h = /* @__PURE__ */ p({
30
28
  submitFn: {}
31
29
  },
32
30
  emits: ["success", "fail"],
33
- setup(n, { emit: a }) {
34
- const o = n, i = a, s = u(
35
- () => F(o, ["formMainInstance", "submitText", "submitFn"])
36
- ), { submitting: m, submit: r } = x({
37
- getFormMainInstance: () => o.formMainInstance,
38
- submitFn: (t) => o.submitFn(t),
39
- onSuccess: (t) => i("success", t),
40
- onFail: (t) => i("fail", t)
31
+ setup(n, { emit: i }) {
32
+ const e = n, a = i, s = l(
33
+ () => x(e, ["formMainInstance", "submitText", "submitFn"])
34
+ ), { submitting: m, submit: r } = g({
35
+ getFormMainInstance: () => e.formMainInstance,
36
+ submitFn: (t) => e.submitFn(t),
37
+ onSuccess: (t) => a("success", t),
38
+ onFail: (t) => a("fail", t)
41
39
  });
42
- return (t, _) => {
43
- const c = l;
44
- return f(), d(c, B(e(s), {
45
- loading: e(m),
46
- onClick: e(r)
47
- }), {
48
- default: y(() => [
49
- b(g(n.submitText), 1)
50
- ]),
51
- _: 1
52
- }, 16, ["loading", "onClick"]);
53
- };
40
+ return (t, F) => (p(), u(o(b), f(s.value, {
41
+ loading: o(m),
42
+ onClick: o(r)
43
+ }), {
44
+ default: d(() => [
45
+ y(B(n.submitText), 1)
46
+ ]),
47
+ _: 1
48
+ }, 16, ["loading", "onClick"]));
54
49
  }
55
50
  });
56
51
  export {
57
- h as default
52
+ T as default
58
53
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FormSubmitPanel.vue2.mjs";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-450cc756"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93bc9096"]]);
5
5
  export {
6
- c as default
6
+ p as default
7
7
  };
@@ -1,11 +1,11 @@
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 W, useAttrs as E, shallowRef as R, ref as T, computed as r, watch as F, 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 P, toDisplayString as S, createCommentVNode as h } 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";
5
5
  import { useFormSubmit as X } from "./use-form-submit.mjs";
6
- import F from "../display/ActionBtn.vue.mjs";
6
+ import C from "../display/ActionBtn.vue.mjs";
7
7
  import { parseFormData as Y, generateFormData as Z } from "./utils.mjs";
8
- const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E({
8
+ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ W({
9
9
  name: "FormSubmitPanel",
10
10
  inheritAttrs: !1,
11
11
  __name: "FormSubmitPanel",
@@ -15,6 +15,7 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
15
15
  span: 24
16
16
  }) },
17
17
  rowGutter: {},
18
+ layoutScale: {},
18
19
  stringifyData: {},
19
20
  submitText: {},
20
21
  submitFn: {},
@@ -30,8 +31,8 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
30
31
  rootClass: {}
31
32
  },
32
33
  emits: ["cancel", "fail", "success", "parseDataChange"],
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(() => [
34
+ setup(a, { emit: D }) {
35
+ const t = a, o = D, k = E(), f = R(), s = T({}), x = (e) => e, b = r(() => f.value), w = r(() => t.operationAffix ? K : "div"), A = r(() => t.operationAffix ? typeof t.operationAffix == "object" ? t.operationAffix : { position: "bottom" } : {}), $ = r(() => [
35
36
  `form-submit-panel_${t.operationPosition}`,
36
37
  {
37
38
  "form-submit-panel_no-divider": !t.divider,
@@ -40,15 +41,15 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
40
41
  t.rootClass
41
42
  ]), d = () => t.stringifyData ? Y(t.stringifyData, t.list) : Z(t.list), p = () => o("cancel"), y = () => {
42
43
  s.value = d();
43
- }, B = (e) => o("success", e), g = (e) => o("fail", e), { submitting: N, submit: V } = X({
44
+ }, B = (e) => o("success", e), v = (e) => o("fail", e), { submitting: M, submit: N } = X({
44
45
  getFormMainInstance: () => b.value,
45
46
  submitFn: (e) => t.submitFn(e),
46
47
  onSuccess: B,
47
- onFail: g
48
+ onFail: v
48
49
  });
49
- return P(s, (e) => {
50
+ return F(s, (e) => {
50
51
  o("parseDataChange", e);
51
- }), P(
52
+ }), F(
52
53
  [() => t.stringifyData, () => t.list],
53
54
  () => {
54
55
  s.value = d();
@@ -56,64 +57,64 @@ const _ = { class: "form-submit-panel-operation-inner" }, lt = /* @__PURE__ */ E
56
57
  {
57
58
  immediate: !0
58
59
  }
59
- ), (e, tt) => (i(), j("div", {
60
- class: z(["form-submit-panel", A.value])
60
+ ), (e, tt) => (n(), j("div", {
61
+ class: z(["form-submit-panel", $.value])
61
62
  }, [
62
63
  G(Q, c({
63
64
  ref_key: "formMain",
64
65
  ref: f,
65
66
  class: "form-submit-panel-form",
66
67
  list: a.list,
67
- data: x(n(s)),
68
+ data: x(s.value),
68
69
  "row-gutter": a.rowGutter
69
- }, n(k), {
70
+ }, i(k), {
70
71
  layout: a.layout,
71
72
  labelPosition: a.labelPosition,
72
73
  labelWidth: a.labelWidth
73
74
  }), H({ _: 2 }, [
74
- I(a.list, (v) => ({
75
- name: v.key,
76
- fn: l((W) => [
77
- m(e.$slots, v.key, L(O(W)), void 0, !0)
75
+ I(a.list, (g) => ({
76
+ name: g.key,
77
+ fn: l((V) => [
78
+ m(e.$slots, g.key, L(O(V)), void 0, !0)
78
79
  ])
79
80
  }))
80
81
  ]), 1040, ["list", "data", "row-gutter", "layout", "labelPosition", "labelWidth"]),
81
- (i(), u(q($.value), c(w.value, { class: "form-submit-panel-operation" }), {
82
+ (n(), u(q(w.value), c(A.value, { class: "form-submit-panel-operation" }), {
82
83
  default: l(() => [
83
84
  J("div", _, [
84
85
  m(e.$slots, "cancelBtn", { cancel: p }, () => [
85
- a.cancelBtn ? (i(), u(n(F), {
86
+ a.cancelBtn ? (n(), u(i(C), {
86
87
  key: 0,
87
88
  onClick: p
88
89
  }, {
89
90
  default: l(() => [
90
- h(C(a.cancelBtn), 1)
91
+ P(S(a.cancelBtn), 1)
91
92
  ]),
92
93
  _: 1
93
- })) : D("", !0)
94
+ })) : h("", !0)
94
95
  ], !0),
95
96
  m(e.$slots, "resetBtn", { reset: y }, () => [
96
- a.resetBtn ? (i(), u(n(F), {
97
+ a.resetBtn ? (n(), u(i(C), {
97
98
  key: 0,
98
99
  type: "warning",
99
100
  onClick: y
100
101
  }, {
101
102
  default: l(() => [
102
- h(C(a.resetBtn), 1)
103
+ P(S(a.resetBtn), 1)
103
104
  ]),
104
105
  _: 1
105
- })) : D("", !0)
106
+ })) : h("", !0)
106
107
  ], !0),
107
108
  e.$slots.submitBtn ? m(e.$slots, "submitBtn", {
108
109
  key: 0,
109
- submit: n(V),
110
- submitting: n(N)
111
- }, void 0, !0) : (i(), u(U, c({ key: 1 }, a.submitBtnProps, {
110
+ submit: i(N),
111
+ submitting: i(M)
112
+ }, void 0, !0) : (n(), u(U, c({ key: 1 }, a.submitBtnProps, {
112
113
  "submit-fn": a.submitFn,
113
114
  "submit-text": a.submitText,
114
115
  "form-main-instance": b.value,
115
116
  onSuccess: B,
116
- onFail: g
117
+ onFail: v
117
118
  }), null, 16, ["submit-fn", "submit-text", "form-main-instance"]))
118
119
  ])
119
120
  ]),