@vue-start/element-pro 0.2.7 → 0.2.9

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