@vue-start/element-pro 0.2.7 → 0.2.8

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.
package/dist/index.es.js CHANGED
@@ -1,154 +1,91 @@
1
- import { defineComponent as s, createVNode as a, mergeProps as i, reactive as J, ref as g, toRaw as Q, isVNode as v } from "vue";
2
- import { ElRow as W, ElCol as X, ElLoading as Y, ElFormItem as E, ElForm as I, ElSelect as x, ElOption as Z, ElRadioGroup as k, ElRadioButton as _, ElRadio as $, ElCheckboxGroup as R, ElCheckbox as ee, ElInput as te, ElInputNumber as re, ElDatePicker as ne, ElTimePicker as oe, ElTreeSelect as ae, ElSwitch as ue, ElCascader as le, ElButton as y, ElTableColumn as h, ElTable as B, ElPagination as ce, ElDescriptions as de, ElDescriptionsItem as ie, ElDialog as D } from "element-plus";
3
- import { isString as se, keys as C, omit as c, map as P, size as me, get as F } from "lodash";
4
- import { createGrid as pe, createExpose as z, createForm as fe, createSearchForm as ye, createFormItemCompFn as ge, createExposeObj as T, useProForm as Ce, createFormList as Pe, createTable as be, createCurdForm as Fe, CurdCurrentMode as Se, useProCurd as b, createCurdList as Te, createCurdDesc as ve, CurdAction as f } from "@vue-start/pro";
5
- import { useEffect as K, generateId as Ee, setReactiveValue as Ie } from "@vue-start/hooks";
6
- const xe = pe(W, X), N = (e = "comp") => e + "-" + Ee(), ke = () => ({
7
- loading: {
8
- type: Boolean
9
- },
10
- target: {
11
- type: [String, Object]
12
- },
13
- body: {
14
- type: Boolean
15
- },
16
- fullscreen: {
17
- type: Boolean
18
- },
19
- lock: {
20
- type: Boolean
21
- },
22
- text: {
23
- type: String
24
- },
25
- spinner: {
26
- type: String
27
- },
28
- background: {
29
- type: String
30
- },
31
- customClass: {
32
- type: String
33
- }
34
- }), Re = s({
35
- props: {
36
- ...ke()
37
- },
38
- setup: (e, {
39
- slots: t
40
- }) => {
41
- const n = N();
42
- return K(() => {
43
- if (!e.loading)
44
- return;
45
- let o = e.target;
46
- if (t.default ? o = document.getElementById(n) : e.target && se(e.target) && (o = document.querySelector("#" + e.target)), !o)
47
- return;
48
- const u = Y.service({
49
- target: o,
50
- body: e.body,
51
- fullscreen: e.fullscreen,
52
- lock: e.lock,
53
- text: e.text,
54
- spinner: e.spinner,
55
- background: e.background,
56
- customClass: e.customClass
57
- });
58
- return () => {
59
- u && u.close();
60
- };
61
- }, () => e.loading), () => t.default ? a("div", {
62
- id: n
63
- }, [t.default()]) : null;
64
- }
65
- }), L = () => ({
1
+ import { createExpose as $, createFormItemCompFn as Q, createExposeObj as k, ProForm as P, ProSearchForm as F, ProFormList as h, ProTable as T, ProDesc as b, ProCurdDesc as x, ProCurdForm as E, ProCurdModal as I } from "@vue-start/pro";
2
+ import { ElFormItem as v, ElForm as C, ElSelect as R, ElOption as X, ElRadioGroup as B, ElRadioButton as Y, ElRadio as Z, ElCheckboxGroup as V, ElCheckbox as ee, ElInput as te, ElInputNumber as oe, ElDatePicker as ae, ElTimePicker as re, ElTreeSelect as ne, ElSwitch as le, ElCascader as ue, ElLoading as de, ElDialog as z, ElButton as A, ElPagination as M, ElPopover as O, ElTableColumn as w, ElTable as L, ElDescriptions as ce } from "element-plus";
3
+ import { defineComponent as m, createVNode as d, mergeProps as c, reactive as ie, ref as f, toRaw as pe, isVNode as N } from "vue";
4
+ import { keys as g, omit as i, isBoolean as G, map as y, isString as me, debounce as se, size as fe, pick as ge } from "lodash";
5
+ import { useEffect as H, generateId as ye, useWatch as S } from "@vue-start/hooks";
6
+ const D = () => ({
66
7
  name: {
67
8
  type: [String, Array]
68
9
  }
69
- }), G = s({
10
+ }), Pe = m({
70
11
  props: {
71
- ...E.props,
72
- ...L()
12
+ ...v.props,
13
+ ...D()
73
14
  },
74
15
  setup: (e, {
75
16
  slots: t
76
17
  }) => {
77
- const n = C(L());
78
- return () => a(E, i(c(e, ...n, "name", "prop"), {
18
+ const a = g(D());
19
+ return () => d(v, c(i(e, ...a, "name", "prop"), {
79
20
  prop: e.prop || e.name
80
21
  }), t);
81
22
  }
82
- }), S = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], he = s({
23
+ }), W = ["clearValidate", "resetFields", "scrollToField", "validate", "validateField", "submit"], Ve = m({
83
24
  props: {
84
- ...I.props
25
+ ...C.props,
26
+ hideRequiredMark: {
27
+ type: [Boolean, Object],
28
+ default: void 0
29
+ }
85
30
  },
86
31
  setup: (e, {
87
32
  slots: t,
88
- emit: n,
89
- expose: o
33
+ emit: a,
34
+ expose: r
90
35
  }) => {
91
- const u = e.model || J({}), l = g();
92
- return K(() => {
93
- !l.value || (l.value.submit = () => {
94
- var r;
95
- (r = l.value) == null || r.validate((d, m) => {
96
- d ? n("finish", Q(u)) : n("finishFailed", m);
36
+ const n = e.model || ie({}), u = f();
37
+ return H(() => {
38
+ !u.value || (u.value.submit = () => {
39
+ var o;
40
+ (o = u.value) == null || o.validate((l, p) => {
41
+ l ? a("finish", pe(n)) : a("finishFailed", p);
97
42
  });
98
43
  });
99
- }, []), o(z(S, l)), () => a(I, i({
100
- ref: l
101
- }, c(e, "model"), {
102
- model: u
44
+ }, []), r($(W, u)), () => d(C, c({
45
+ ref: u
46
+ }, i(e, "model"), {
47
+ hideRequiredAsterisk: G(e.hideRequiredMark) ? e.hideRequiredMark : e.hideRequiredAsterisk,
48
+ model: n
103
49
  }), t);
104
50
  }
105
- }), U = fe(he, xe, S), Be = ye(U, {
106
- needRules: {
107
- type: Boolean,
108
- default: !1
109
- },
110
- inline: {
111
- type: Boolean,
112
- default: !0
113
- }
114
- }, S), p = ge(G, (e, t, n) => ({
51
+ }), s = Q(Pe, (e, t, a) => ({
115
52
  modelValue: e,
116
53
  "onUpdate:modelValue": t,
117
54
  clearable: !0,
118
- disabled: n
119
- })), A = () => ({
55
+ disabled: a
56
+ })), U = () => ({
120
57
  options: Array
121
- }), De = s({
58
+ }), be = m({
122
59
  name: "PSelect",
123
60
  props: {
124
- ...x.props,
125
- ...A()
61
+ ...R.props,
62
+ ...U()
126
63
  },
127
64
  setup: (e, {
128
65
  slots: t,
129
- emit: n,
130
- expose: o
66
+ emit: a,
67
+ expose: r
131
68
  }) => {
132
- const u = g();
133
- o(T(u));
134
- const l = C(A());
135
- return () => a(x, i({
136
- ref: u
137
- }, c(e, l), {
138
- "onUpdate:modelValue": (r) => {
139
- n("update:modelValue", r || void 0);
69
+ const n = f();
70
+ r(k(n));
71
+ const u = g(U());
72
+ return () => d(R, c({
73
+ ref: n
74
+ }, i(e, u), {
75
+ "onUpdate:modelValue": (o) => {
76
+ a("update:modelValue", o || void 0);
140
77
  }
141
78
  }), {
142
79
  default: () => {
143
- var r, d;
144
- return [(r = t.start) == null ? void 0 : r.call(t), P(e.options, (m) => a(Z, i({
145
- key: m.value
146
- }, m), null)), (d = t.default) == null ? void 0 : d.call(t)];
80
+ var o, l;
81
+ return [(o = t.start) == null ? void 0 : o.call(t), y(e.options, (p) => d(X, c({
82
+ key: p.value
83
+ }, p), null)), (l = t.default) == null ? void 0 : l.call(t)];
147
84
  },
148
- ...c(t, "default")
85
+ ...i(t, "default")
149
86
  });
150
87
  }
151
- }), V = () => ({
88
+ }), j = () => ({
152
89
  options: {
153
90
  type: Array
154
91
  },
@@ -156,171 +93,310 @@ const xe = pe(W, X), N = (e = "comp") => e + "-" + Ee(), ke = () => ({
156
93
  type: String,
157
94
  default: "default"
158
95
  }
159
- }), Le = s({
96
+ }), ve = m({
160
97
  props: {
161
- ...k.props,
162
- ...V()
98
+ ...B.props,
99
+ ...j()
163
100
  },
164
101
  setup: (e, {
165
102
  slots: t,
166
- emit: n,
167
- expose: o
103
+ emit: a,
104
+ expose: r
168
105
  }) => {
169
- const u = g();
170
- o(T(u));
171
- const l = C(V());
172
- return () => a(k, i({
173
- ref: u
174
- }, c(e, l), {
175
- "onUpdate:modelValue": (r) => {
176
- n("update:modelValue", r);
106
+ const n = f();
107
+ r(k(n));
108
+ const u = g(j());
109
+ return () => d(B, c({
110
+ ref: n
111
+ }, i(e, u), {
112
+ "onUpdate:modelValue": (o) => {
113
+ a("update:modelValue", o);
177
114
  }
178
115
  }), {
179
- default: () => [P(e.options, (r) => e.buttonStyle === "button" ? a(_, i({
180
- key: r.value
181
- }, r, {
182
- label: r.value
116
+ default: () => [y(e.options, (o) => e.buttonStyle === "button" ? d(Y, c({
117
+ key: o.value
118
+ }, o, {
119
+ label: o.value
183
120
  }), {
184
- default: () => [r.label]
185
- }) : a($, i({
186
- key: r.value
187
- }, r, {
188
- label: r.value
121
+ default: () => [o.label]
122
+ }) : d(Z, c({
123
+ key: o.value
124
+ }, o, {
125
+ label: o.value
189
126
  }), {
190
- default: () => [r.label]
127
+ default: () => [o.label]
191
128
  }))],
192
129
  ...t
193
130
  });
194
131
  }
195
- }), w = () => ({
132
+ }), q = () => ({
196
133
  options: Array
197
- }), Ae = s({
134
+ }), Ce = m({
198
135
  props: {
199
- ...R.props,
200
- ...w()
136
+ ...V.props,
137
+ ...q()
201
138
  },
202
139
  setup: (e, {
203
140
  slots: t,
204
- emit: n,
205
- expose: o
141
+ emit: a,
142
+ expose: r
206
143
  }) => {
207
- const u = g();
208
- o(T(u));
209
- const l = C(w());
210
- return () => a(R, i({
211
- ref: u
212
- }, c(e, l), {
213
- "onUpdate:modelValue": (r) => {
214
- n("update:modelValue", r || void 0);
144
+ const n = f();
145
+ r(k(n));
146
+ const u = g(q());
147
+ return () => d(V, c({
148
+ ref: n
149
+ }, i(e, u), {
150
+ "onUpdate:modelValue": (o) => {
151
+ a("update:modelValue", o || void 0);
215
152
  }
216
153
  }), {
217
154
  default: () => {
218
- var r, d;
219
- return [(r = t.start) == null ? void 0 : r.call(t), P(e.options, (m) => a(ee, i(m, {
220
- label: m.value
155
+ var o, l;
156
+ return [(o = t.start) == null ? void 0 : o.call(t), y(e.options, (p) => d(ee, c(p, {
157
+ label: p.value
221
158
  }), {
222
- default: () => [m.label]
223
- })), (d = t.default) == null ? void 0 : d.call(t)];
159
+ default: () => [p.label]
160
+ })), (l = t.default) == null ? void 0 : l.call(t)];
224
161
  },
225
- ...c(t, "default")
162
+ ...i(t, "default")
226
163
  });
227
164
  }
228
- }), Je = p({
165
+ }), ze = s({
229
166
  InputComp: te,
230
167
  valueType: "text",
231
168
  name: "PFromText"
232
- }), Qe = p({
233
- InputComp: re,
169
+ }), Ae = s({
170
+ InputComp: oe,
234
171
  valueType: "digit",
235
172
  name: "PFormNumber"
236
- }), We = p({
237
- InputComp: ne,
173
+ }), Me = s({
174
+ InputComp: ae,
238
175
  valueType: "date",
239
176
  name: "PFormDate"
240
- }), Xe = p({
241
- InputComp: oe,
177
+ }), Oe = s({
178
+ InputComp: re,
242
179
  valueType: "time",
243
180
  name: "PFormTime"
244
- }), Ye = p({
245
- InputComp: De,
181
+ }), we = s({
182
+ InputComp: be,
246
183
  valueType: "select",
247
184
  name: "PFormSelect"
248
- }), Ze = p({
249
- InputComp: ae,
185
+ }), Le = s({
186
+ InputComp: ne,
250
187
  valueType: "treeSelect",
251
188
  name: "PFormTreeSelect"
252
- }), _e = p({
253
- InputComp: Ae,
189
+ }), Ne = s({
190
+ InputComp: Ce,
254
191
  valueType: "checkbox",
255
192
  name: "PFromCheckbox"
256
- }), $e = p({
257
- InputComp: Le,
193
+ }), De = s({
194
+ InputComp: ve,
258
195
  valueType: "radio",
259
196
  name: "PFromRadio"
260
- }), et = p({
261
- InputComp: ue,
197
+ }), Ue = s({
198
+ InputComp: le,
262
199
  valueType: "switch",
263
200
  name: "PFromSwitch"
264
- }), tt = p({
265
- InputComp: le,
201
+ }), je = s({
202
+ InputComp: ue,
266
203
  valueType: "cascader",
267
204
  name: "PFormCascader"
268
- }), rt = s({
205
+ }), _ = (e = "comp") => e + "-" + ye(), Se = () => ({
206
+ loading: {
207
+ type: Boolean
208
+ },
209
+ target: {
210
+ type: [String, Object]
211
+ },
212
+ body: {
213
+ type: Boolean
214
+ },
215
+ fullscreen: {
216
+ type: Boolean
217
+ },
218
+ lock: {
219
+ type: Boolean
220
+ },
221
+ text: {
222
+ type: String
223
+ },
224
+ spinner: {
225
+ type: String
226
+ },
227
+ background: {
228
+ type: String
229
+ },
230
+ customClass: {
231
+ type: String
232
+ }
233
+ }), ke = m({
269
234
  props: {
270
- ...y.props
235
+ ...Se()
271
236
  },
272
237
  setup: (e, {
273
- slots: t,
274
- emit: n
238
+ slots: t
275
239
  }) => {
276
- const {
277
- formRef: o
278
- } = Ce(), u = (l) => {
279
- var r, d;
280
- n("click", l), (d = (r = o.value) == null ? void 0 : r.submit) == null || d.call(r);
281
- };
282
- return () => a(y, i({
283
- onClick: u
284
- }, e), t);
240
+ const a = _();
241
+ return H(() => {
242
+ if (!e.loading)
243
+ return;
244
+ let r = e.target;
245
+ if (t.default ? r = document.getElementById(a) : e.target && me(e.target) && (r = document.querySelector("#" + e.target)), !r)
246
+ return;
247
+ const n = de.service({
248
+ target: r,
249
+ body: e.body,
250
+ fullscreen: e.fullscreen,
251
+ lock: e.lock,
252
+ text: e.text,
253
+ spinner: e.spinner,
254
+ background: e.background,
255
+ customClass: e.customClass
256
+ });
257
+ return () => {
258
+ n && n.close();
259
+ };
260
+ }, () => e.loading), () => t.default ? d("div", {
261
+ id: a
262
+ }, [t.default()]) : null;
285
263
  }
286
- }), O = Pe(G), M = () => ({
287
- addButtonText: {
264
+ }), K = () => ({
265
+ clsName: {
266
+ type: String,
267
+ default: "pro-modal"
268
+ },
269
+ visible: {
270
+ type: Boolean,
271
+ default: !1
272
+ },
273
+ cancelText: {
288
274
  type: String,
289
- default: "\u6DFB\u52A0\u4E00\u9879"
275
+ default: "\u53D6\u6D88"
290
276
  },
291
- addButtonProps: {
277
+ cancelButtonProps: {
292
278
  type: Object
293
279
  },
294
- minusButtonText: {
280
+ okText: {
295
281
  type: String,
296
- default: "\u5220\u9664"
282
+ default: "\u786E\u8BA4"
297
283
  },
298
- minusButtonProps: {
284
+ okButtonProps: {
299
285
  type: Object
286
+ },
287
+ confirmLoading: Boolean,
288
+ footer: {
289
+ type: Boolean,
290
+ default: !0
291
+ },
292
+ maskClosable: {
293
+ type: [Object, Boolean],
294
+ default: void 0
300
295
  }
301
- }), nt = s({
302
- name: "PFormList",
296
+ }), Fe = m({
303
297
  props: {
304
- ...O.props,
305
- ...M()
298
+ ...z.props,
299
+ ...K()
306
300
  },
307
301
  setup: (e, {
308
- slots: t
302
+ slots: t,
303
+ emit: a
309
304
  }) => {
310
- const n = C(M());
311
- return () => a(O, c(e, n), {
312
- itemMinus: () => a(y, e.minusButtonProps, {
313
- default: () => [e.minusButtonText]
314
- }),
315
- add: () => a(y, e.addButtonProps, {
316
- default: () => [e.addButtonText]
317
- }),
305
+ const r = f(e.visible);
306
+ S(() => {
307
+ r.value !== e.visible && (r.value = e.visible);
308
+ }, () => e.visible);
309
+ const n = () => {
310
+ var l;
311
+ if ((l = e.cancelButtonProps) != null && l.onClick) {
312
+ e.cancelButtonProps.onClick();
313
+ return;
314
+ }
315
+ r.value = !1, a("update:visible", !1);
316
+ }, u = () => {
317
+ var l;
318
+ if ((l = e.okButtonProps) != null && l.onClick) {
319
+ e.okButtonProps.onClick();
320
+ return;
321
+ }
322
+ a("ok");
323
+ }, o = g(K());
324
+ return () => d(z, c({
325
+ class: e.clsName
326
+ }, i(e, ...o, "modelValue"), {
327
+ closeOnClickModal: G(e.maskClosable) ? e.maskClosable : e.closeOnClickModal,
328
+ modelValue: r.value,
329
+ "onUpdate:modelValue": [(l) => r.value = l, (l) => {
330
+ a("update:visible", l);
331
+ }],
332
+ onClose: () => {
333
+ a("cancel");
334
+ }
335
+ }), {
336
+ footer: e.footer === !1 ? void 0 : () => d("div", {
337
+ class: `${e.clsName}-operate`
338
+ }, [d(A, c(i(e.cancelButtonProps, "onClick"), {
339
+ onClick: n
340
+ }), {
341
+ default: () => [e.cancelText]
342
+ }), d(A, c({
343
+ type: "primary",
344
+ loading: e.confirmLoading
345
+ }, i(e.okButtonProps, "onClick"), {
346
+ onClick: u
347
+ }), {
348
+ default: () => [e.okText]
349
+ })]),
318
350
  ...t
319
351
  });
320
352
  }
321
- }), q = s({
353
+ }), qe = m({
322
354
  props: {
323
- ...c(h.props, "label", "prop"),
355
+ ...M.props,
356
+ page: {
357
+ type: Number,
358
+ default: 1
359
+ }
360
+ },
361
+ setup: (e, {
362
+ slots: t,
363
+ emit: a
364
+ }) => {
365
+ const r = f(e.page), n = f(e.pageSize);
366
+ S(() => {
367
+ r.value !== e.page && (r.value = e.page);
368
+ }, () => e.page), S(() => {
369
+ n.value !== e.pageSize && (n.value = e.pageSize);
370
+ }, () => e.pageSize);
371
+ const u = se(() => {
372
+ a("composeChange", r.value, n.value);
373
+ }, 300), o = () => {
374
+ u(), a("update:page", r.value);
375
+ }, l = () => {
376
+ u(), a("update:pageSize", n.value);
377
+ };
378
+ return () => d(M, c({
379
+ currentPage: r.value,
380
+ "onUpdate:currentPage": (p) => r.value = p,
381
+ pageSize: n.value,
382
+ "onUpdate:pageSize": (p) => n.value = p,
383
+ onCurrentChange: o,
384
+ onSizeChange: l
385
+ }, i(e, "currentPage", "pageSize")), t);
386
+ }
387
+ }), Ke = m({
388
+ props: {
389
+ ...O.props
390
+ },
391
+ setup: (e, {
392
+ slots: t
393
+ }) => () => d(O, e, {
394
+ reference: t.default,
395
+ default: t.content
396
+ })
397
+ }), J = m({
398
+ props: {
399
+ ...i(w.props, "label", "prop"),
324
400
  title: {
325
401
  type: String
326
402
  },
@@ -334,25 +410,29 @@ const xe = pe(W, X), N = (e = "comp") => e + "-" + Ee(), ke = () => ({
334
410
  type: Function
335
411
  }
336
412
  },
337
- setup: (e) => () => a(h, i(c(e, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender", "children"), {
338
- label: v(e.title) ? void 0 : e.title,
339
- renderHeader: v(e.title) ? () => e.title : void 0,
413
+ setup: (e, {
414
+ slots: t
415
+ }) => () => d(w, c(i(e, "title", "label", "renderHeader", "prop", "dataIndex", "formatter", "customRender", "children"), {
416
+ label: N(e.title) ? void 0 : e.title,
417
+ renderHeader: N(e.title) ? () => e.title : void 0,
340
418
  prop: e.dataIndex,
341
- formatter: (t, n, o, u) => e.customRender ? e.customRender({
342
- value: o,
343
- text: o,
344
- record: t,
345
- column: n,
419
+ formatter: (a, r, n, u) => e.customRender ? e.customRender({
420
+ value: n,
421
+ text: n,
422
+ record: a,
423
+ column: r,
346
424
  index: u
347
- }) : o
425
+ }) : n
348
426
  }), {
349
- default: () => [me(e.children) > 0 && P(e.children, (t) => a(q, i({
350
- key: t.dataIndex
351
- }, t), null))]
427
+ default: () => [fe(e.children) > 0 && y(e.children, (a) => d(J, c({
428
+ key: a.dataIndex
429
+ }, a), t))],
430
+ default: t[e.dataIndex],
431
+ header: t[`${e.dataIndex}_header`]
352
432
  })
353
- }), H = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Ve = s({
433
+ }), he = ["clearSelection", "getSelectionRows", "toggleRowSelection", "toggleAllSelection", "toggleRowExpansion", "setCurrentRow", "clearSort", "clearFilter", "doLayout", "sort", "scrollTo", "setScrollTop", "setScrollLeft"], Te = m({
354
434
  props: {
355
- ...B.props,
435
+ ...L.props,
356
436
  columns: {
357
437
  type: Array
358
438
  },
@@ -365,147 +445,86 @@ const xe = pe(W, X), N = (e = "comp") => e + "-" + Ee(), ke = () => ({
365
445
  },
366
446
  setup: (e, {
367
447
  slots: t,
368
- expose: n
448
+ expose: a
369
449
  }) => {
370
- const o = g(), u = N("table");
371
- return n(z(H, o)), () => a(B, i({
372
- ref: o,
373
- id: u
374
- }, c(e, "columns", "dataSource", "loading"), {
450
+ const r = f(), n = _("table");
451
+ return a($(he, r)), () => d(L, c({
452
+ ref: r,
453
+ id: n
454
+ }, i(e, "columns", "dataSource", "loading"), {
375
455
  data: e.dataSource || e.data
376
456
  }), {
377
457
  default: () => {
378
- var l, r;
379
- return [(l = t.start) == null ? void 0 : l.call(t), P(e.columns, (d) => a(q, i({
380
- key: d.dataIndex
381
- }, d), null)), (r = t.default) == null ? void 0 : r.call(t), e.loading && a(Re, {
382
- target: u,
458
+ var u, o;
459
+ return [(u = t.start) == null ? void 0 : u.call(t), y(e.columns, (l) => d(J, c({
460
+ key: l.dataIndex
461
+ }, l), t)), (o = t.default) == null ? void 0 : o.call(t), e.loading && d(ke, {
462
+ target: n,
383
463
  loading: !0
384
464
  }, null)];
385
465
  },
386
- ...c(t, "default", "start")
387
- });
388
- }
389
- }), we = be(Ve, void 0, H), Oe = Fe(U, y, (e) => ({
390
- hideRequiredAsterisk: e.mode === Se.DETAIL
391
- }), S), Me = s({
392
- setup: () => {
393
- const {
394
- formProps: e
395
- } = b();
396
- return () => a(Oe, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
397
- }
398
- }), j = Te(Be, we), je = s({
399
- props: {
400
- ...j.props,
401
- paginationProps: {
402
- type: Object
403
- }
404
- },
405
- setup: (e, {
406
- slots: t
407
- }) => () => a(j, c(e, "paginationProps"), {
408
- pagination: (n, o, u) => a(ce, i(e.paginationProps, {
409
- total: o,
410
- currentPage: n.page,
411
- pageSize: n.pageSize,
412
- onSizeChange: (l) => {
413
- n.pageSize = l, u();
414
- },
415
- onCurrentChange: (l) => {
416
- n.page = l, u();
417
- }
418
- }), null),
419
- ...t
420
- })
421
- }), ot = s({
422
- setup: () => {
423
- const {
424
- listProps: e
425
- } = b();
426
- return () => a(je, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
427
- }
428
- }), ze = ve(de, ie), at = s({
429
- setup: () => {
430
- const {
431
- descProps: e
432
- } = b();
433
- return () => a(ze, c(e == null ? void 0 : e.value, "slots"), F(e == null ? void 0 : e.value, "slots"));
434
- }
435
- }), Ke = s({
436
- props: {
437
- ...D.props
438
- },
439
- setup: (e, {
440
- slots: t
441
- }) => {
442
- const {
443
- curdState: n,
444
- getOperate: o
445
- } = b(), u = () => {
446
- var r, d, m;
447
- switch (n.mode) {
448
- case f.ADD:
449
- return (r = o(f.ADD)) == null ? void 0 : r.label;
450
- case f.EDIT:
451
- return (d = o(f.EDIT)) == null ? void 0 : d.label;
452
- case f.DETAIL:
453
- return (m = o(f.DETAIL)) == null ? void 0 : m.label;
454
- }
455
- }, l = () => {
456
- n.mode = void 0, Ie(n.detailData, {}), n.detailLoading = !1, n.addAction = void 0;
457
- };
458
- return () => a(D, i({
459
- destroyOnClose: !0,
460
- title: u(),
461
- modelValue: !!n.mode,
462
- onClose: l
463
- }, e), t);
464
- }
465
- }), ut = s({
466
- setup: () => {
467
- const {
468
- modalProps: e
469
- } = b();
470
- return () => a(Ke, c(e == null ? void 0 : e.value, "slots"), {
471
- default: () => [a(Me, null, null)],
472
- ...F(e == null ? void 0 : e.value, "slots")
466
+ ...ge(t, "append", "empty")
473
467
  });
474
468
  }
475
469
  });
470
+ P.props = {
471
+ ...C.props,
472
+ ...P.props,
473
+ formMethods: { type: Array, default: W }
474
+ };
475
+ F.props = {
476
+ ...P.props,
477
+ ...F.props,
478
+ inline: { type: Boolean, default: !0 }
479
+ };
480
+ h.props = {
481
+ ...v.props,
482
+ ...h.props
483
+ };
484
+ T.props = {
485
+ ...Te.props,
486
+ ...T.props
487
+ };
488
+ b.props = {
489
+ ...ce.props,
490
+ ...b.props
491
+ };
492
+ x.props = {
493
+ ...b.props,
494
+ ...x.props
495
+ };
496
+ E.props = {
497
+ ...P.props,
498
+ ...E.props
499
+ };
500
+ I.props = {
501
+ ...Fe.props,
502
+ ...I.props
503
+ };
476
504
  export {
477
- S as FormMethods,
478
- Ae as ProCheckbox,
479
- ze as ProCurdDesc,
480
- at as ProCurdDescConnect,
481
- Oe as ProCurdForm,
482
- Me as ProCurdFormConnect,
483
- je as ProCurdList,
484
- ot as ProCurdListConnect,
485
- Ke as ProCurdModal,
486
- ut as ProCurdModalConnect,
487
- U as ProForm,
488
- tt as ProFormCascader,
489
- _e as ProFormCheckbox,
490
- We as ProFormDatePicker,
491
- G as ProFormItem,
492
- nt as ProFormList,
493
- $e as ProFormRadio,
494
- Ye as ProFormSelect,
495
- et as ProFormSwitch,
496
- Je as ProFormText,
497
- Qe as ProFormTextNumber,
498
- Xe as ProFormTimePicker,
499
- Ze as ProFormTreeSelect,
500
- xe as ProGrid,
501
- Re as ProLoading,
502
- Le as ProRadio,
503
- Be as ProSearchForm,
504
- De as ProSelect,
505
- rt as ProSubmitButton,
506
- we as ProTable,
507
- q as ProTableColumn,
508
- H as TableMethods,
509
- p as createFormItemComponent,
510
- N as createLoadingId
505
+ W as FormMethods,
506
+ Ce as ProCheckbox,
507
+ Ve as ProForm,
508
+ je as ProFormCascader,
509
+ Ne as ProFormCheckbox,
510
+ Me as ProFormDatePicker,
511
+ Pe as ProFormItem,
512
+ De as ProFormRadio,
513
+ we as ProFormSelect,
514
+ Ue as ProFormSwitch,
515
+ ze as ProFormText,
516
+ Ae as ProFormTextNumber,
517
+ Oe as ProFormTimePicker,
518
+ Le as ProFormTreeSelect,
519
+ ke as ProLoading,
520
+ Fe as ProModal,
521
+ qe as ProPagination,
522
+ Ke as ProPopover,
523
+ ve as ProRadio,
524
+ be as ProSelect,
525
+ Te as ProTable,
526
+ J as ProTableColumn,
527
+ he as TableMethods,
528
+ s as createFormItemComponent,
529
+ _ as createLoadingId
511
530
  };