cc1-form 1.0.0 → 1.0.2

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/cc1-form.js CHANGED
@@ -1,6 +1,6 @@
1
- import pe, { defineComponent as H, ref as P, reactive as oe, resolveComponent as X, createBlock as g, openBlock as p, unref as c, withCtx as y, createElementBlock as C, createCommentVNode as x, Fragment as I, renderList as B, renderSlot as V, normalizeClass as le, createVNode as E, mergeProps as S, toHandlers as ne, resolveDynamicComponent as se, onMounted as re, createElementVNode as L, createTextVNode as U, normalizeStyle as fe, toDisplayString as Q, resolveDirective as me, withDirectives as he } from "vue";
2
- import { ElMessage as be, ElLoading as ye, ElForm as Y, ElFormItem as K, ElInput as Z, ElSwitch as ee, ElSelect as q, ElOption as A, ElTreeSelect as ie, ElDatePicker as de, ElDialog as te, ElButton as j, ElDropdown as ge, ElDropdownMenu as we, ElDropdownItem as J, ElTable as ve, ElTableColumn as G, ElPagination as ke } from "element-plus";
3
- class F {
1
+ import { defineComponent as N, ref as j, reactive as X, resolveComponent as W, createBlock as g, openBlock as f, unref as d, withCtx as h, createElementBlock as w, createCommentVNode as C, Fragment as $, renderList as F, renderSlot as k, normalizeClass as Q, createVNode as v, mergeProps as D, toHandlers as A, resolveDynamicComponent as Z, onMounted as ee, createElementVNode as U, createTextVNode as V, normalizeStyle as se, toDisplayString as J, resolveDirective as ne, withDirectives as re } from "vue";
2
+ import { ElMessage as ie, ElLoading as de, ElForm as K, ElFormItem as _, ElInput as H, ElSwitch as G, ElSelect as M, ElOption as R, ElTreeSelect as te, ElDatePicker as le, ElDialog as q, ElButton as S, ElDropdown as ue, ElDropdownMenu as fe, ElDropdownItem as P, ElTable as pe, ElTableColumn as B, ElPagination as ce } from "element-plus";
3
+ class O {
4
4
  /**
5
5
  * 路由
6
6
  */
@@ -24,13 +24,13 @@ class F {
24
24
  * @param data 数据
25
25
  * @returns 是否显示
26
26
  */
27
- static isFun = (u, i) => typeof u == "function" ? u(i) : u;
27
+ static isFun = (i, r) => typeof i == "function" ? i(r) : i;
28
28
  /**
29
29
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
30
30
  */
31
31
  static getRouterParams = () => {
32
- const u = this.router.currentRoute.value.query || {}, i = this.router.currentRoute.value.params || {};
33
- return Object.keys(u).length ? u : Object.keys(i).length ? i : {};
32
+ const i = this.router.currentRoute.value.query || {}, r = this.router.currentRoute.value.params || {};
33
+ return Object.keys(i).length ? i : Object.keys(r).length ? r : {};
34
34
  };
35
35
  /**
36
36
  * 模块赋值
@@ -40,11 +40,11 @@ class F {
40
40
  * 加载模块
41
41
  * @param module
42
42
  */
43
- static loadModule = async (u) => {
44
- if (!F.moduleObj[u])
45
- throw new Error(`模块${u}未加载,请赋值如:TSys.moduleObj = { ${u}: ()=>import('${u}') }`);
46
- const i = await F.moduleObj[u]();
47
- return i.default ?? i;
43
+ static loadModule = async (i) => {
44
+ if (!O.moduleObj[i])
45
+ throw new Error(`模块${i}未加载,请赋值如:TSys.moduleObj = { ${i}: ()=>import('${i}') }`);
46
+ const r = await O.moduleObj[i]();
47
+ return r.default ?? r;
48
48
  };
49
49
  /**
50
50
  * 提示信息对象管理
@@ -60,19 +60,19 @@ class F {
60
60
  * @param type 消息类型
61
61
  * @param options 其他选项
62
62
  */
63
- static showMessage(u, i, s = {}) {
64
- const m = Date.now();
65
- if (!this.tipMessages[u] || m - this.tipMessages[u] > this.tipMessagesGap) {
66
- this.tipMessages[u] = m;
67
- const h = Object.assign(
63
+ static showMessage(i, r, n = {}) {
64
+ const c = Date.now();
65
+ if (!this.tipMessages[i] || c - this.tipMessages[i] > this.tipMessagesGap) {
66
+ this.tipMessages[i] = c;
67
+ const m = Object.assign(
68
68
  {
69
- message: u,
70
- type: i
69
+ message: i,
70
+ type: r
71
71
  },
72
- s
72
+ n
73
73
  );
74
- be(h), setTimeout(() => {
75
- delete this.tipMessages[u];
74
+ ie(m), setTimeout(() => {
75
+ delete this.tipMessages[i];
76
76
  }, this.tipMessagesGap);
77
77
  }
78
78
  }
@@ -81,16 +81,16 @@ class F {
81
81
  * @param content
82
82
  * @param options
83
83
  */
84
- static fail = (u, i = {}) => {
85
- this.showMessage(u, "error", i);
84
+ static fail = (i, r = {}) => {
85
+ this.showMessage(i, "error", r);
86
86
  };
87
87
  /**
88
88
  * 成功提示
89
89
  * @param content
90
90
  * @param options
91
91
  */
92
- static success = (u, i = {}) => {
93
- this.showMessage(u, "success", i);
92
+ static success = (i, r = {}) => {
93
+ this.showMessage(i, "success", r);
94
94
  };
95
95
  static loadingObj = null;
96
96
  static loadingTimer = null;
@@ -99,11 +99,11 @@ class F {
99
99
  * @param show
100
100
  * @param text
101
101
  */
102
- static loading = (u = !0, i = "加载中") => {
102
+ static loading = (i = !0, r = "加载中") => {
103
103
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
104
- u ? this.loadingObj = ye.service({
104
+ i ? this.loadingObj = de.service({
105
105
  lock: !0,
106
- text: i,
106
+ text: r,
107
107
  background: "rgba(0, 0, 0, 0.3)"
108
108
  }) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
109
109
  }, 50);
@@ -113,17 +113,17 @@ class F {
113
113
  * @param url 地址
114
114
  * @param isCenter 是否居中
115
115
  */
116
- static openUrl = (u, i = !0) => {
117
- if (i) {
118
- let s = screen.width / 2 - 500, m = screen.height / 2 - 800 / 2 - 30;
116
+ static openUrl = (i, r = !0) => {
117
+ if (r) {
118
+ let n = screen.width / 2 - 500, c = screen.height / 2 - 800 / 2 - 30;
119
119
  window.open(
120
- u,
120
+ i,
121
121
  "_blank",
122
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + m + ", left=" + s
122
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + c + ", left=" + n
123
123
  );
124
124
  } else
125
125
  window.open(
126
- u,
126
+ i,
127
127
  "DescriptiveWindowName" + StrUtil.getId(),
128
128
  "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0"
129
129
  );
@@ -133,37 +133,37 @@ class F {
133
133
  * @param param
134
134
  * @returns
135
135
  */
136
- static getImgPic = (u) => new Promise(async (i, s) => {
137
- let m = document.getElementById(u.id);
138
- const h = await F.loadModule("html2canvas");
136
+ static getImgPic = (i) => new Promise(async (r, n) => {
137
+ let c = document.getElementById(i.id);
138
+ const m = await O.loadModule("html2canvas");
139
139
  try {
140
- h(m, {
140
+ m(c, {
141
141
  logging: !1,
142
142
  allowTaint: !0,
143
143
  scale: window.devicePixelRatio,
144
- width: u.windowWidth,
145
- height: u.windowHeight,
146
- windowWidth: u.windowWidth,
147
- windowHeight: u.windowHeight,
144
+ width: i.windowWidth,
145
+ height: i.windowHeight,
146
+ windowWidth: i.windowWidth,
147
+ windowHeight: i.windowHeight,
148
148
  useCORS: !0,
149
149
  backgroundColor: "#ffffff00"
150
- }).then(function(d) {
151
- let r = d.toDataURL("image/png");
152
- i(r);
150
+ }).then(function(s) {
151
+ let e = s.toDataURL("image/png");
152
+ r(e);
153
153
  });
154
- } catch (d) {
155
- s(d);
154
+ } catch (s) {
155
+ n(s);
156
156
  }
157
157
  });
158
158
  /**
159
159
  * 下载文件
160
160
  */
161
- static async download(u, i = "download.png") {
162
- const s = document.createElement("a");
163
- s.style.display = "none", s.href = u, s.setAttribute("download", i), typeof s.download > "u" && s.setAttribute("target", "_blank"), document.body.appendChild(s), s.click(), document.body.removeChild(s), window.URL.revokeObjectURL(u);
161
+ static async download(i, r = "download.png") {
162
+ const n = document.createElement("a");
163
+ n.style.display = "none", n.href = i, n.setAttribute("download", r), typeof n.download > "u" && n.setAttribute("target", "_blank"), document.body.appendChild(n), n.click(), document.body.removeChild(n), window.URL.revokeObjectURL(i);
164
164
  }
165
165
  }
166
- class _ {
166
+ class L {
167
167
  /**
168
168
  * 自定义组件
169
169
  */
@@ -174,10 +174,10 @@ class _ {
174
174
  * @param field
175
175
  * @returns
176
176
  */
177
- static findOptions = (u, i) => {
178
- const s = u.column.find((h) => h.key === i), m = (h) => h.replace(/-([a-z])/g, (d, r) => r.toUpperCase());
179
- if (s)
180
- return s.options[m(s.type)];
177
+ static findOptions = (i, r) => {
178
+ const n = i.column.find((m) => m.key === r), c = (m) => m.replace(/-([a-z])/g, (s, e) => e.toUpperCase());
179
+ if (n)
180
+ return n.options[c(n.type)];
181
181
  };
182
182
  /**
183
183
  * 更新组件数据
@@ -195,9 +195,9 @@ class _ {
195
195
  }))
196
196
  )
197
197
  */
198
- static setOptionsData = (u, i, s) => {
199
- const m = _.findOptions(u, i);
200
- m && (m.data = s);
198
+ static setOptionsData = (i, r, n) => {
199
+ const c = L.findOptions(i, r);
200
+ c && (c.data = n);
201
201
  };
202
202
  static form = {
203
203
  openBefore: {
@@ -208,13 +208,13 @@ class _ {
208
208
  * @param treeData 树形数据
209
209
  * @param option 组件配置
210
210
  */
211
- parentId: (u, i, s, m) => {
212
- u ? i.type === F.EDialog.Insert ? (i.form.parentId = u._id, i.form.sort = u.children.length + 1) : i.form.parentId = u.parentId.substring(u.parentId.lastIndexOf(",") + 1) : (i.form.parentId = "0", i.form.sort = s.length + 1), _.setOptionsData(m, "parentId", [{ _id: "0", title: "根", children: s }]);
211
+ parentId: (i, r, n, c) => {
212
+ i ? r.type === O.EDialog.Insert ? (r.form.parentId = i._id, r.form.sort = i.children.length + 1) : r.form.parentId = i.parentId.substring(i.parentId.lastIndexOf(",") + 1) : (r.form.parentId = "0", r.form.sort = n.length + 1), L.setOptionsData(c, "parentId", [{ _id: "0", title: "根", children: n }]);
213
213
  }
214
214
  }
215
215
  };
216
216
  }
217
- const Ce = { class: "row curd-row" }, Ve = /* @__PURE__ */ H({
217
+ const me = { class: "row curd-row" }, he = /* @__PURE__ */ N({
218
218
  __name: "column",
219
219
  props: {
220
220
  /**
@@ -224,146 +224,146 @@ const Ce = { class: "row curd-row" }, Ve = /* @__PURE__ */ H({
224
224
  default: {}
225
225
  }
226
226
  },
227
- setup(f, { expose: u }) {
228
- const i = F.isFun, s = F.EDialog, m = P(), h = f, d = oe({
227
+ setup(p, { expose: i }) {
228
+ const r = O.isFun, n = O.EDialog, c = j(), m = p, s = X({
229
229
  rules: {},
230
230
  show: !1,
231
231
  showContent: !1,
232
232
  loading: !1,
233
- type: s.Insert,
233
+ type: n.Insert,
234
234
  form: {},
235
235
  formDefault: {},
236
236
  formColumn: [],
237
- getDisabled: (r) => r.disabled?.[d.type === s.Insert ? "create" : "update"],
237
+ getDisabled: (e) => e.disabled?.[s.type === n.Insert ? "create" : "update"],
238
238
  initColumnForm: () => {
239
- const r = h.option;
240
- d.formColumn = [];
241
- const e = [], n = h.option.form?.maxSpan || 12, t = h.option.form?.defaultSpan || n;
242
- let o = [];
243
- const l = (a) => {
244
- if (d.formDefault[a.key] = a.value, a.isForm) {
245
- a.form = a.form || { span: t }, a.form.span = a.form.span ?? t;
246
- let w = a.form.span, O = o.reduce(($, M) => $ + M.span, w);
247
- const b = o.length;
248
- o.push({ item: a, span: w }), (b === 1 && o[0].span === 0 || O >= n || w === 0 && b > 1) && (e.push(o), o = []), a.rules && (d.rules[a.key] = a.rules);
239
+ const e = m.option;
240
+ s.formColumn = [];
241
+ const a = [], o = m.option.form?.maxSpan || 12, u = m.option.form?.defaultSpan || o;
242
+ let t = [];
243
+ const l = (b) => {
244
+ if (s.formDefault[b.key] = b.value, b.isForm) {
245
+ b.form = b.form || { span: u }, b.form.span = b.form.span ?? u;
246
+ let x = b.form.span, y = t.reduce((z, T) => z + T.span, x);
247
+ const E = t.length;
248
+ t.push({ item: b, span: x }), (E === 1 && t[0].span === 0 || y >= o || x === 0 && E > 1) && (a.push(t), t = []), b.rules && (s.rules[b.key] = b.rules);
249
249
  }
250
250
  };
251
- r.column.forEach((a) => {
252
- a.isForm = !0, l(a);
253
- }), o.length > 0 && e.push(o), d.formColumn = e;
251
+ e.column.forEach((b) => {
252
+ b.isForm = !0, l(b);
253
+ }), t.length > 0 && a.push(t), s.formColumn = a;
254
254
  }
255
255
  });
256
- return d.initColumnForm(), u({
257
- ref: m,
258
- conf: d
259
- }), (r, e) => {
260
- const n = X("FormList");
261
- return p(), g(c(Y), {
256
+ return s.initColumnForm(), i({
257
+ ref: c,
258
+ conf: s
259
+ }), (e, a) => {
260
+ const o = W("FormList");
261
+ return f(), g(d(K), {
262
262
  ref_key: "ruleFormRef",
263
- ref: m,
264
- model: d.form,
265
- rules: d.rules
263
+ ref: c,
264
+ model: s.form,
265
+ rules: s.rules
266
266
  }, {
267
- default: y(() => [
268
- d.showContent ? (p(!0), C(I, { key: 0 }, B(d.formColumn, (t) => (p(), C("div", Ce, [
269
- V(r.$slots, "form-start", {
270
- row: d.form
267
+ default: h(() => [
268
+ s.showContent ? (f(!0), w($, { key: 0 }, F(s.formColumn, (u) => (f(), w("div", me, [
269
+ k(e.$slots, "form-start", {
270
+ row: s.form
271
271
  }),
272
- (p(!0), C(I, null, B(t, (o) => (p(), C(I, null, [
273
- c(i)(o.item.show?.form, d.form) ? (p(), C("div", {
272
+ (f(!0), w($, null, F(u, (t) => (f(), w($, null, [
273
+ d(r)(t.item.show?.form, s.form) ? (f(), w("div", {
274
274
  key: 0,
275
- class: le(o.item.form.span > 0 ? `col-${o.item.form.span}` : "col")
275
+ class: Q(t.item.form.span > 0 ? `col-${t.item.form.span}` : "col")
276
276
  }, [
277
- E(c(K), {
278
- label: o.item.label,
279
- prop: o.item.key,
280
- "label-width": o.item.form?.labelWidth || "100px"
277
+ v(d(_), {
278
+ label: t.item.label,
279
+ prop: t.item.key,
280
+ "label-width": t.item.form?.labelWidth || "100px"
281
281
  }, {
282
- default: y(() => [
283
- V(r.$slots, "form-" + o.item.key + "-start", {
284
- row: d.form,
285
- item: o.item
282
+ default: h(() => [
283
+ k(e.$slots, "form-" + t.item.key + "-start", {
284
+ row: s.form,
285
+ item: t.item
286
286
  }),
287
- V(r.$slots, "form-" + o.item.key, {
288
- row: d.form,
289
- item: o.item
287
+ k(e.$slots, "form-" + t.item.key, {
288
+ row: s.form,
289
+ item: t.item
290
290
  }, () => [
291
- o.item.type === "input" ? (p(), g(c(Z), S({
291
+ t.item.type === "input" ? (f(), g(d(H), D({
292
292
  key: 0,
293
- modelValue: d.form[o.item.key],
294
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
295
- }, { ref_for: !0 }, o.item.options?.input, ne(o.item.options?.input?.on), {
296
- disabled: d.getDisabled(o.item)
297
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "switch" ? (p(), g(c(ee), S({
293
+ modelValue: s.form[t.item.key],
294
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
295
+ }, { ref_for: !0 }, t.item.options?.input, A(t.item.options?.input?.on), {
296
+ disabled: s.getDisabled(t.item)
297
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.item.type === "switch" ? (f(), g(d(G), D({
298
298
  key: 1,
299
- modelValue: d.form[o.item.key],
300
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
301
- }, { ref_for: !0 }, o.item.options?.switch, {
302
- disabled: d.getDisabled(o.item)
303
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "select" ? (p(), g(c(q), S({
299
+ modelValue: s.form[t.item.key],
300
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
301
+ }, { ref_for: !0 }, t.item.options?.switch, {
302
+ disabled: s.getDisabled(t.item)
303
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.item.type === "select" ? (f(), g(d(M), D({
304
304
  key: 2,
305
- modelValue: d.form[o.item.key],
306
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
307
- }, { ref_for: !0 }, o.item.options?.select, {
308
- disabled: d.getDisabled(o.item),
305
+ modelValue: s.form[t.item.key],
306
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
307
+ }, { ref_for: !0 }, t.item.options?.select, {
308
+ disabled: s.getDisabled(t.item),
309
309
  style: { width: "100%" }
310
310
  }), {
311
- default: y(() => [
312
- (p(!0), C(I, null, B(o.item.options?.select?.data, (l) => (p(), g(c(A), {
311
+ default: h(() => [
312
+ (f(!0), w($, null, F(t.item.options?.select?.data, (l) => (f(), g(d(R), {
313
313
  key: l.value,
314
314
  label: l.label,
315
315
  value: l.value
316
316
  }, null, 8, ["label", "value"]))), 128))
317
317
  ]),
318
318
  _: 2
319
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "list" ? (p(), g(n, S({
319
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.item.type === "list" ? (f(), g(o, D({
320
320
  key: 3,
321
- row: d.form,
322
- field: o.item.key
323
- }, { ref_for: !0 }, o.item.options?.list, {
324
- disabled: d.getDisabled(o.item),
321
+ row: s.form,
322
+ field: t.item.key
323
+ }, { ref_for: !0 }, t.item.options?.list, {
324
+ disabled: s.getDisabled(t.item),
325
325
  style: { width: "100%" }
326
- }), null, 16, ["row", "field", "disabled"])) : o.item.type === "tree-select" ? (p(), g(c(ie), S({
326
+ }), null, 16, ["row", "field", "disabled"])) : t.item.type === "tree-select" ? (f(), g(d(te), D({
327
327
  key: 4,
328
- modelValue: d.form[o.item.key],
329
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
330
- }, { ref_for: !0 }, o.item.options?.treeSelect, {
331
- disabled: d.getDisabled(o.item),
328
+ modelValue: s.form[t.item.key],
329
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
330
+ }, { ref_for: !0 }, t.item.options?.treeSelect, {
331
+ disabled: s.getDisabled(t.item),
332
332
  style: { width: "100%" }
333
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : o.item.type === "datetime" ? (p(), g(c(de), S({
333
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.item.type === "datetime" ? (f(), g(d(le), D({
334
334
  key: 5,
335
- modelValue: d.form[o.item.key],
336
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
337
- }, { ref_for: !0 }, o.item.options?.datetime, {
338
- disabled: d.getDisabled(o.item)
339
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c(_).customComponent[o.item.type] ? (p(), g(se(c(_).customComponent[o.item.type]), S({
335
+ modelValue: s.form[t.item.key],
336
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
337
+ }, { ref_for: !0 }, t.item.options?.datetime, {
338
+ disabled: s.getDisabled(t.item)
339
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d(L).customComponent[t.item.type] ? (f(), g(Z(d(L).customComponent[t.item.type]), D({
340
340
  key: 6,
341
- modelValue: d.form[o.item.key],
342
- "onUpdate:modelValue": (l) => d.form[o.item.key] = l
343
- }, { ref_for: !0 }, o.item.options?.[o.item.type], {
344
- disabled: d.getDisabled(o.item)
345
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : x("", !0)
341
+ modelValue: s.form[t.item.key],
342
+ "onUpdate:modelValue": (l) => s.form[t.item.key] = l
343
+ }, { ref_for: !0 }, t.item.options?.[t.item.type], {
344
+ disabled: s.getDisabled(t.item)
345
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
346
346
  ]),
347
- V(r.$slots, "form-" + o.item.key + "-end", {
348
- row: d.form,
349
- item: o.item
347
+ k(e.$slots, "form-" + t.item.key + "-end", {
348
+ row: s.form,
349
+ item: t.item
350
350
  })
351
351
  ]),
352
352
  _: 2
353
353
  }, 1032, ["label", "prop", "label-width"])
354
- ], 2)) : x("", !0)
354
+ ], 2)) : C("", !0)
355
355
  ], 64))), 256)),
356
- V(r.$slots, "form-end", {
357
- row: d.form
356
+ k(e.$slots, "form-end", {
357
+ row: s.form
358
358
  })
359
- ]))), 256)) : x("", !0)
359
+ ]))), 256)) : C("", !0)
360
360
  ]),
361
361
  _: 3
362
362
  }, 8, ["model", "rules"]);
363
363
  };
364
364
  }
365
365
  });
366
- class z {
366
+ class I {
367
367
  /**
368
368
  * 获取id函数-可以直接覆盖
369
369
  */
@@ -373,12 +373,12 @@ class z {
373
373
  * @param field 字段名
374
374
  * @param row 行数据
375
375
  */
376
- static setId = (u, i, s) => {
377
- i[u] || (i[u] = []), i[u].forEach((m) => {
378
- s.forEach((h) => {
379
- let d = h.default ?? "";
380
- h.type === "number" && (d = h.default ?? 0), h.type === "boolean" && (d = h.default ?? !1), h.type === "time" && (d = h.default ?? /* @__PURE__ */ new Date()), m[h.value] === void 0 && (m[h.value] = d);
381
- }), m._id || (m._id = z.getIdFun());
376
+ static setId = (i, r, n) => {
377
+ r[i] || (r[i] = []), r[i].forEach((c) => {
378
+ n.forEach((m) => {
379
+ let s = m.default ?? "";
380
+ m.type === "number" && (s = m.default ?? 0), m.type === "boolean" && (s = m.default ?? !1), m.type === "time" && (s = m.default ?? /* @__PURE__ */ new Date()), c[m.value] === void 0 && (c[m.value] = s);
381
+ }), c._id || (c._id = I.getIdFun());
382
382
  });
383
383
  };
384
384
  /**
@@ -388,17 +388,17 @@ class z {
388
388
  * @param itemFields 元素字段-如:[{label:'',value:''}]
389
389
  * @param callback 回调函数
390
390
  */
391
- static add = (u, i, s, m) => {
392
- const h = JSONUtil.cp(s);
393
- z.setId(u, i, s), i[u].push(
394
- h.reduce(
395
- (d, r) => {
396
- let e = r.default ?? "";
397
- return r.type === "number" && (e = r.default ?? 0), r.type === "boolean" && (e = r.default ?? !1), r.type === "time" && (e = r.default ?? /* @__PURE__ */ new Date()), d[r.value] = e, d;
391
+ static add = (i, r, n, c) => {
392
+ const m = JSONUtil.cp(n);
393
+ I.setId(i, r, n), r[i].push(
394
+ m.reduce(
395
+ (s, e) => {
396
+ let a = e.default ?? "";
397
+ return e.type === "number" && (a = e.default ?? 0), e.type === "boolean" && (a = e.default ?? !1), e.type === "time" && (a = e.default ?? /* @__PURE__ */ new Date()), s[e.value] = a, s;
398
398
  },
399
- { _id: z.getIdFun() }
399
+ { _id: I.getIdFun() }
400
400
  )
401
- ), m?.(i);
401
+ ), c?.(r);
402
402
  };
403
403
  /**
404
404
  * 删除数组元素
@@ -407,8 +407,8 @@ class z {
407
407
  * @param item 元素-如:{_id:''}
408
408
  * @param callback 回调函数
409
409
  */
410
- static remove = (u, i, s, m) => {
411
- i[u] = i[u].filter((h) => h._id !== s._id), m?.(i);
410
+ static remove = (i, r, n, c) => {
411
+ r[i] = r[i].filter((m) => m._id !== n._id), c?.(r);
412
412
  };
413
413
  /**
414
414
  * 获取没有id的数据
@@ -416,21 +416,21 @@ class z {
416
416
  * @param childernField 子级字段-如:list、children
417
417
  * @returns 没有id的数据
418
418
  */
419
- static getNoIdData = (u, i) => {
420
- const s = JSONUtil.cp(u);
421
- return s.forEach((m) => {
422
- m._id && delete m._id, i && m[i] && z.getNoIdData(m[i], i);
423
- }), s;
419
+ static getNoIdData = (i, r) => {
420
+ const n = JSONUtil.cp(i);
421
+ return n.forEach((c) => {
422
+ c._id && delete c._id, r && c[r] && I.getNoIdData(c[r], r);
423
+ }), n;
424
424
  };
425
425
  }
426
- const Ee = {
426
+ const be = {
427
427
  key: 0,
428
428
  class: "column",
429
429
  style: { width: "100%", gap: "10px" }
430
- }, De = {
430
+ }, ye = {
431
431
  class: "row items-center",
432
432
  style: { gap: "10px", width: "100%" }
433
- }, ue = /* @__PURE__ */ H({
433
+ }, oe = /* @__PURE__ */ N({
434
434
  __name: "list",
435
435
  props: {
436
436
  row: {
@@ -465,291 +465,152 @@ const Ee = {
465
465
  }
466
466
  },
467
467
  emits: ["change"],
468
- setup(f, { emit: u }) {
469
- const i = f, s = oe({
468
+ setup(p, { emit: i }) {
469
+ const r = p, n = X({
470
470
  show: !1,
471
- add: (h, d, r) => {
472
- z.add(h, d, r, () => {
473
- m("change");
471
+ add: (m, s, e) => {
472
+ I.add(m, s, e, () => {
473
+ c("change");
474
474
  });
475
475
  },
476
- remove: (h, d, r) => {
477
- z.remove(h, d, r, () => {
478
- m("change");
476
+ remove: (m, s, e) => {
477
+ I.remove(m, s, e, () => {
478
+ c("change");
479
479
  });
480
480
  }
481
481
  });
482
- re(() => {
483
- z.setId(i.field, i.row, i.itemFields), s.show = !0;
482
+ ee(() => {
483
+ I.setId(r.field, r.row, r.itemFields), n.show = !0;
484
484
  });
485
- const m = u;
486
- return (h, d) => {
487
- const r = X("el-button"), e = X("el-input");
488
- return s.show ? (p(), C("div", Ee, [
489
- V(h.$slots, "list-start", { row: f.row }),
490
- L("div", null, [
491
- E(r, {
485
+ const c = i;
486
+ return (m, s) => {
487
+ const e = W("el-button"), a = W("el-input");
488
+ return n.show ? (f(), w("div", be, [
489
+ k(m.$slots, "list-start", { row: p.row }),
490
+ U("div", null, [
491
+ v(e, {
492
492
  link: "",
493
493
  type: "primary",
494
- onClick: d[0] || (d[0] = (n) => s.add(f.field, f.row, f.itemFields))
494
+ onClick: s[0] || (s[0] = (o) => n.add(p.field, p.row, p.itemFields))
495
495
  }, {
496
- default: y(() => [...d[2] || (d[2] = [
497
- U("添加", -1)
496
+ default: h(() => [...s[2] || (s[2] = [
497
+ V("添加", -1)
498
498
  ])]),
499
499
  _: 1
500
500
  })
501
501
  ]),
502
- (p(!0), C(I, null, B(f.row[f.field], (n) => (p(), C("div", De, [
503
- V(h.$slots, "item-start", {
504
- item: n,
505
- row: f.row
502
+ (f(!0), w($, null, F(p.row[p.field], (o) => (f(), w("div", ye, [
503
+ k(m.$slots, "item-start", {
504
+ item: o,
505
+ row: p.row
506
506
  }),
507
- (p(!0), C(I, null, B(f.itemFields, (t) => (p(), g(e, {
508
- modelValue: n[t.value],
509
- "onUpdate:modelValue": (o) => n[t.value] = o,
510
- style: fe({ width: f.inputWidth }),
511
- class: le(f.inputClass),
512
- placeholder: t[f.label] || t[f.value],
513
- onChange: d[1] || (d[1] = (o) => m("change"))
507
+ (f(!0), w($, null, F(p.itemFields, (u) => (f(), g(a, {
508
+ modelValue: o[u.value],
509
+ "onUpdate:modelValue": (t) => o[u.value] = t,
510
+ style: se({ width: p.inputWidth }),
511
+ class: Q(p.inputClass),
512
+ placeholder: u[p.label] || u[p.value],
513
+ onChange: s[1] || (s[1] = (t) => c("change"))
514
514
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
515
- V(h.$slots, "item-end", {
516
- item: n,
517
- row: f.row
515
+ k(m.$slots, "item-end", {
516
+ item: o,
517
+ row: p.row
518
518
  }),
519
- E(r, {
519
+ v(e, {
520
520
  link: "",
521
521
  type: "danger",
522
- onClick: (t) => s.remove(f.field, f.row, n)
522
+ onClick: (u) => n.remove(p.field, p.row, o)
523
523
  }, {
524
- default: y(() => [...d[3] || (d[3] = [
525
- U("删除", -1)
524
+ default: h(() => [...s[3] || (s[3] = [
525
+ V("删除", -1)
526
526
  ])]),
527
527
  _: 1
528
528
  }, 8, ["onClick"])
529
529
  ]))), 256)),
530
- V(h.$slots, "list-end", { row: f.row })
531
- ])) : x("", !0);
530
+ k(m.$slots, "list-end", { row: p.row })
531
+ ])) : C("", !0);
532
532
  };
533
533
  }
534
534
  });
535
- class xe {
535
+ class ge {
536
536
  /**
537
537
  * 导出Excel
538
538
  * @param data 数据
539
539
  * @param columns 列
540
540
  * @param fileName 文件名
541
541
  */
542
- static exportToExcel = async (u, i, s) => {
543
- const m = await F.loadModule("xlsx"), h = u.map((e) => {
544
- const n = {};
545
- return i.forEach((t) => {
546
- n[t.label] = e[t.key];
547
- }), n;
548
- }), d = m.utils.json_to_sheet(h), r = m.utils.book_new();
549
- m.utils.book_append_sheet(r, d, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, m.writeFile(r, `${s}.xlsx`);
542
+ static exportToExcel = async (i, r, n) => {
543
+ const c = await O.loadModule("xlsx"), m = i.map((a) => {
544
+ const o = {};
545
+ return r.forEach((u) => {
546
+ o[u.label] = a[u.key];
547
+ }), o;
548
+ }), s = c.utils.json_to_sheet(m), e = c.utils.book_new();
549
+ c.utils.book_append_sheet(e, s, "Sheet1"), n ? typeof n == "function" && (n = n()) : n = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, c.writeFile(e, `${n}.xlsx`);
550
550
  };
551
551
  }
552
- var W = { exports: {} }, Ue = W.exports, ae;
553
- function $e() {
554
- return ae || (ae = 1, (function(f, u) {
555
- (function(i, s) {
556
- s(u, pe);
557
- })(Ue, function(i, s) {
558
- const m = "__scopeObjFun";
559
- class h {
560
- static map = {};
561
- static get(e, n) {
562
- const t = h, o = s.getCurrentInstance();
563
- return o ? (t.map[e] || (t.map[e] = { value: n(), refs: /* @__PURE__ */ new Set() }), t.map[e].refs.add(o), s.onUnmounted(() => {
564
- t.map[e]?.refs.delete(o), t.map[e]?.refs.size === 0 && delete t.map[e];
565
- }), t.map[e].value) : n();
566
- }
567
- }
568
- const d = window.Scope || class {
569
- static setConf = (r, e) => {
570
- e || typeof r == "string" || (e = r, r = "conf");
571
- const n = s.getCurrentInstance();
572
- let t = e;
573
- if (typeof t != "function" && (t = () => e), n) {
574
- let o = n[m];
575
- o || (o = []), o.push({ key: r, fun: t }), n[m] = o;
576
- }
577
- };
578
- static getConf = (r, e) => {
579
- r ? typeof r == "number" && (e = r, r = "conf") : r = "conf", e || (e = 1);
580
- let n = s.getCurrentInstance(), t = 0, o = () => null;
581
- for (; n = n.parent; ) {
582
- const l = n[m];
583
- if (l) for (let a = 0; a < l.length; a++) {
584
- const w = l[a];
585
- if (w.key === r && (t++, o = w.fun, t === e)) return w.fun();
586
- }
587
- }
588
- return o();
589
- };
590
- static CEventBean = null;
591
- static CEventBeanDeactivated = !1;
592
- static Event = () => {
593
- if (!this.CEventBean) return null;
594
- const r = s.getCurrentInstance(), e = new this.CEventBean();
595
- return e.vm = () => () => r.isDeactivated ? this.CEventBeanDeactivated : !r.isUnmounted, e;
596
- };
597
- static TimerBean = null;
598
- static TimerBeanDeactivated = "pause";
599
- static Timer = () => {
600
- if (!this.TimerBean) return null;
601
- const r = new this.TimerBean(), e = s.getCurrentInstance();
602
- return r.vm = () => () => e.isDeactivated ? this.TimerBeanDeactivated : !e.isUnmounted, r;
603
- };
604
- };
605
- window.TimerBean && (d.TimerBean = window.TimerBean), window.CEventBean && (d.CEventBean = window.CEventBean), window.Scope || (window.Scope = d), i.CRouter = class {
606
- static init = (r) => {
607
- const e = r.root || "/src/views";
608
- if (!r.modules) throw new Error("modules is required");
609
- const n = r.modules, t = {}, o = r.diffModules || {}, l = {}, a = r.pathHook || ((k) => k), w = (k, v) => {
610
- Object.keys(v).forEach((D) => {
611
- let R = D.replace(e, "").replace(".vue", "");
612
- const T = r.mapKeyPathHook?.(R) || D;
613
- k[T] = { path: a(R), component: v[D], useNum: 0 };
614
- });
615
- };
616
- w(t, n), w(l, o), ((k, v) => {
617
- for (const D in v) D in k || (k[D] = v[D]);
618
- })(t, l);
619
- const O = r.children || [], b = [], $ = (k) => {
620
- const v = Object.keys(t);
621
- for (let D = 0; D < v.length; D++) if (t[v[D]].path === k) return t[v[D]];
622
- };
623
- if (O.length) {
624
- const k = (v) => {
625
- if (v.children = v.children || [], v.childrenList && v.childrenList.forEach((R) => {
626
- const T = $(R);
627
- T && (v.children.push({ path: R, component: T.component }), T.useNum++);
628
- }), v.children && v.children.forEach((R) => {
629
- k(R);
630
- }), v.component) {
631
- const R = $(v.component);
632
- R && (v.component = R.component, R.useNum++);
633
- }
634
- if (v.childrenReg) {
635
- const R = (D = v.childrenReg, Array.isArray(D) ? D.map((T) => T instanceof RegExp ? T : new RegExp(T)) : D instanceof RegExp ? [D] : D ? [new RegExp(D)] : []);
636
- Object.keys(t).forEach((T) => {
637
- R.some((ce) => ce.test(T)) && (v.children.push({ path: T, component: t[T].component }), t[T].useNum++);
638
- });
639
- }
640
- var D;
641
- };
642
- for (let v = 0; v < O.length; v++) {
643
- const D = O[v];
644
- k(D), b.push(D);
645
- }
646
- }
647
- Object.keys(t).forEach((k) => {
648
- t[k].useNum === 0 && b.push({ path: k, component: t[k].component });
649
- });
650
- const M = (k) => {
651
- k.path = t[k.path].path, r.setInfoHook?.(k), k.children && k.children.forEach((v) => {
652
- M(v);
653
- });
654
- };
655
- b.forEach((k) => {
656
- M(k);
657
- });
658
- const N = {};
659
- return Object.keys(t).forEach((k) => {
660
- N[t[k].path] = t[k];
661
- }), { array: b, map: N };
662
- };
663
- }, i.CVue3 = class {
664
- static onDispose = (r) => {
665
- const e = s.getCurrentInstance();
666
- let n = e.vnode.el?.parentElement?.parentElement, t = !1;
667
- const o = setInterval(() => {
668
- if (t) return void clearInterval(o);
669
- const l = e.vnode.el?.parentElement?.parentElement;
670
- return n === void 0 && (n = l), n && !l ? (clearInterval(o), void r()) : void 0;
671
- }, 50);
672
- s.onUnmounted(() => {
673
- t = !0, r();
674
- });
675
- };
676
- static createCom = (r) => {
677
- let e = r.domOrIdOrClass || document.body;
678
- typeof e == "string" && (e = document.querySelector(e));
679
- const n = (...l) => {
680
- t.unmount(), t = void 0, l.forEach((a) => {
681
- a && e.removeChild(a);
682
- }), e.removeChild(o);
683
- };
684
- r.props || (r.props = {}), r.props.remove = n;
685
- let t = s.createApp(r.component, r.props);
686
- const o = document.createElement("div");
687
- return r.beforeMount && r.beforeMount(t), t.mount(o), r.first ? e.insertBefore(o, e.firstChild) : e.appendChild(o), { vm: t, remove: n };
688
- };
689
- }, i.Minxins = h, i.Scope = d;
690
- });
691
- })(W, W.exports)), W.exports;
692
- }
693
- var Oe = $e();
694
- const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
552
+ const we = { class: "dialog-footer" }, ke = /* @__PURE__ */ N({
695
553
  __name: "switchConfirm",
696
- setup(f, { expose: u }) {
697
- const i = P(!1), s = P("确认修改"), m = P("确认要修改状态吗?");
698
- let h = null, d = null;
699
- const r = (t) => (t?.title && (s.value = t.title), t?.content && (m.value = t.content), i.value = !0, new Promise((o, l) => {
700
- h = o, d = l;
701
- })), e = () => {
702
- i.value = !1, h?.(!0), h = null, d = null;
703
- }, n = () => {
704
- i.value = !1, d?.(new Error("用户取消操作")), h = null, d = null;
554
+ setup(p, { expose: i }) {
555
+ const r = j(!1), n = j("确认修改"), c = j("确认要修改状态吗?");
556
+ let m = null, s = null;
557
+ const e = (u) => (u?.title && (n.value = u.title), u?.content && (c.value = u.content), r.value = !0, new Promise((t, l) => {
558
+ m = t, s = l;
559
+ })), a = () => {
560
+ r.value = !1, m?.(!0), m = null, s = null;
561
+ }, o = () => {
562
+ r.value = !1, s?.(new Error("用户取消操作")), m = null, s = null;
705
563
  };
706
- return u({
707
- open: r
708
- }), (t, o) => (p(), g(c(te), {
709
- modelValue: i.value,
710
- "onUpdate:modelValue": o[0] || (o[0] = (l) => i.value = l),
711
- title: s.value,
564
+ return i({
565
+ open: e
566
+ }), (u, t) => (f(), g(d(q), {
567
+ modelValue: r.value,
568
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => r.value = l),
569
+ title: n.value,
712
570
  "close-on-click-modal": !1,
713
571
  width: "400px"
714
572
  }, {
715
- footer: y(() => [
716
- L("span", Se, [
717
- E(c(j), { onClick: n }, {
718
- default: y(() => [...o[1] || (o[1] = [
719
- U("取消", -1)
573
+ footer: h(() => [
574
+ U("span", we, [
575
+ v(d(S), { onClick: o }, {
576
+ default: h(() => [...t[1] || (t[1] = [
577
+ V("取消", -1)
720
578
  ])]),
721
579
  _: 1
722
580
  }),
723
- E(c(j), {
581
+ v(d(S), {
724
582
  type: "primary",
725
- onClick: e
583
+ onClick: a
726
584
  }, {
727
- default: y(() => [...o[2] || (o[2] = [
728
- U("确认", -1)
585
+ default: h(() => [...t[2] || (t[2] = [
586
+ V("确认", -1)
729
587
  ])]),
730
588
  _: 1
731
589
  })
732
590
  ])
733
591
  ]),
734
- default: y(() => [
735
- L("div", null, Q(m.value), 1)
592
+ default: h(() => [
593
+ U("div", null, J(c.value), 1)
736
594
  ]),
737
595
  _: 1
738
596
  }, 8, ["modelValue", "title"]));
739
597
  }
740
- }), Fe = { class: "col relative cc1-form-box" }, je = {
598
+ }), ve = { class: "col relative cc1-form-box" }, Ce = {
741
599
  class: "absolute row fit",
742
600
  style: { overflow: "hidden" }
743
- }, Le = { class: "col column" }, Te = {
601
+ }, Ve = { class: "col column" }, De = {
744
602
  key: 0,
745
603
  class: "relative curd-search"
746
- }, Re = { class: "mb-20 flex justify-between items-center" }, Be = {
604
+ }, Ee = { class: "mb-20 flex justify-between items-center" }, Ue = {
747
605
  class: "flex items-center",
748
606
  style: { gap: "10px" }
749
- }, Me = { key: 0 }, ze = { key: 1 }, _e = { key: 2 }, Ne = { class: "export-btn" }, Pe = {
607
+ }, xe = { key: 0 }, $e = { key: 1 }, Oe = { key: 2 }, Se = { class: "export-btn" }, Fe = {
750
608
  class: "flex items-center",
751
609
  style: { gap: "10px" }
752
- }, Ae = { class: "col fit-width relative" }, We = { class: "absolute column fit" }, Ke = { class: "row justify-end mt-20 mb-20" }, qe = { class: "row curd-row" }, He = { class: "dialog-footer" }, Je = { class: "dialog-footer" }, Ge = /* @__PURE__ */ H({
610
+ }, Ie = { class: "col fit-width relative" }, Le = { class: "absolute column fit" }, je = { class: "row justify-end mt-20 mb-20" }, ze = { class: "row curd-row" }, Te = {
611
+ class: "row form-item-content",
612
+ style: { width: "100%" }
613
+ }, Re = { class: "col" }, _e = { class: "dialog-footer" }, Me = { class: "dialog-footer" }, Ne = /* @__PURE__ */ N({
753
614
  __name: "index",
754
615
  props: {
755
616
  /**
@@ -759,8 +620,8 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
759
620
  default: {}
760
621
  }
761
622
  },
762
- setup(f, { expose: u }) {
763
- const i = F.EDialog, s = f, m = P(), h = P(), d = Oe.Scope.Timer(), r = F.isFun, e = oe({
623
+ setup(p, { expose: i }) {
624
+ const r = O.EDialog, n = p, c = j(), m = j(), s = O.isFun, e = X({
764
625
  search: {
765
626
  column: {
766
627
  list: []
@@ -768,29 +629,29 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
768
629
  form: {},
769
630
  formDefault: {},
770
631
  getFormData: () => {
771
- let n = {};
772
- s.option.column.forEach((o) => {
773
- (typeof o.show?.search == "function" ? o.show?.search(e.search.form) : o.show?.search) && (n[o.key] = e.search.form[o.key]);
632
+ let a = {};
633
+ n.option.column.forEach((u) => {
634
+ (typeof u.show?.search == "function" ? u.show?.search(e.search.form) : u.show?.search) && (a[u.key] = e.search.form[u.key]);
774
635
  });
775
- const t = s.option.search?.before?.(n);
776
- return t && (n = t), n;
636
+ const o = n.option.search?.before?.(a);
637
+ return o && (a = o), a;
777
638
  },
778
639
  reset: () => {
779
- const n = e.search.formDefault;
780
- Object.keys(n).forEach((t) => {
781
- s.option.search?.resetMode === "default" ? n[t] = e.search.formDefault[t] : n[t] = void 0;
782
- }), e.search.form = JSONUtil.cp(n), e.page.num = 1, e.table.getList();
640
+ const a = e.search.formDefault;
641
+ Object.keys(a).forEach((o) => {
642
+ n.option.search?.resetMode === "default" ? a[o] = e.search.formDefault[o] : a[o] = void 0;
643
+ }), e.search.form = JSONUtil.cp(a), e.page.num = 1, e.table.getList();
783
644
  },
784
645
  submit: () => {
785
646
  e.page.num = 1, e.table.getList();
786
647
  }
787
648
  },
788
649
  page: {
789
- size: s.option.page?.size || 10,
790
- sizeList: s.option.page?.sizeList || [10, 20, 50, 100],
650
+ size: n.option.page?.size || 10,
651
+ sizeList: n.option.page?.sizeList || [10, 20, 50, 100],
791
652
  num: 1,
792
653
  total: 0,
793
- layout: s.option.page?.layout || "total, sizes, prev, pager, next, jumper"
654
+ layout: n.option.page?.layout || "total, sizes, prev, pager, next, jumper"
794
655
  },
795
656
  table: {
796
657
  loading: !1,
@@ -798,19 +659,19 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
798
659
  expand: {
799
660
  isExpand: !1,
800
661
  rowKeys: [],
801
- change: (n, t) => {
662
+ change: (a, o) => {
802
663
  },
803
664
  all: () => {
804
665
  if (e.table.expand.isExpand)
805
666
  e.table.expand.rowKeys = [];
806
667
  else {
807
- const n = (t) => {
808
- let o = [];
809
- return t.forEach((l) => {
810
- o.push(l._id), l.children && l.children.length > 0 && (o = o.concat(n(l.children)));
811
- }), o;
668
+ const a = (o) => {
669
+ let u = [];
670
+ return o.forEach((t) => {
671
+ u.push(t._id), t.children && t.children.length > 0 && (u = u.concat(a(t.children)));
672
+ }), u;
812
673
  };
813
- e.table.expand.rowKeys = n(e.table.data);
674
+ e.table.expand.rowKeys = a(e.table.data);
814
675
  }
815
676
  e.table.expand.isExpand = !e.table.expand.isExpand;
816
677
  }
@@ -836,56 +697,56 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
836
697
  },
837
698
  getList: async () => {
838
699
  e.table.loading = !0;
839
- const n = s.option.api.list, t = await n({
700
+ const a = n.option.api.list, o = await a({
840
701
  size: e.page.size,
841
702
  num: e.page.num,
842
703
  ...e.search.getFormData(),
843
- final(a, w, O) {
704
+ final(l, b, x) {
844
705
  e.table.loading = !1;
845
706
  }
846
- }), o = t.data || { list: t };
847
- let l = Array.isArray(o.list) ? o.list : o;
848
- e.table.data = s.option.data ? await s.option.data(l) : l, e.page.total = o.total || 0;
707
+ }), u = o.data || { list: o };
708
+ let t = Array.isArray(u.list) ? u.list : u;
709
+ e.table.data = n.option.data ? await n.option.data(t) : t, e.page.total = u.total || 0;
849
710
  },
850
711
  selection: {
851
712
  list: [],
852
- change: (n) => {
853
- e.table.selection.list = n;
713
+ change: (a) => {
714
+ e.table.selection.list = a;
854
715
  }
855
716
  },
856
717
  exportFun: {
857
- start: async (n) => {
858
- let t = await e.table.exportFun[n](), o = s.option.column;
859
- const l = JSONUtil.cp({
860
- data: t,
861
- columns: o
862
- }), a = s.option.tools?.export || {};
863
- a.before && a.before(l), xe.exportToExcel(l.data, l.columns, a.fileName);
718
+ start: async (a) => {
719
+ let o = await e.table.exportFun[a](), u = n.option.column;
720
+ const t = JSONUtil.cp({
721
+ data: o,
722
+ columns: u
723
+ }), l = n.option.tools?.export || {};
724
+ l.before && l.before(t), ge.exportToExcel(t.data, t.columns, l.fileName);
864
725
  },
865
726
  select: () => {
866
727
  if (e.table.selection.list.length === 0)
867
- throw F.fail("请选择要导出的数据"), new Error("请选择要导出的数据");
728
+ throw O.fail("请选择要导出的数据"), new Error("请选择要导出的数据");
868
729
  return e.table.selection.list;
869
730
  },
870
731
  page: () => {
871
732
  if (e.table.data.length === 0)
872
- throw F.fail("暂无数据"), new Error("暂无数据");
733
+ throw O.fail("暂无数据"), new Error("暂无数据");
873
734
  return e.table.data;
874
735
  },
875
736
  all: async () => {
876
737
  e.table.loading = !0;
877
- const n = s.option.api.list, { data: t } = await n({
738
+ const a = n.option.api.list, { data: o } = await a({
878
739
  size: 999999,
879
740
  num: 1,
880
- final(o, l, a) {
741
+ final(u, t, l) {
881
742
  e.table.loading = !1;
882
743
  }
883
744
  });
884
- return t.list;
745
+ return o.list;
885
746
  }
886
747
  },
887
- export: (n) => {
888
- e.table.exportFun.start(n);
748
+ export: (a) => {
749
+ e.table.exportFun.start(a);
889
750
  }
890
751
  },
891
752
  update: {
@@ -894,11 +755,11 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
894
755
  show: !1,
895
756
  showContent: !1,
896
757
  loading: !1,
897
- type: i.Insert,
758
+ type: r.Insert,
898
759
  form: {},
899
760
  formDefault: {},
900
761
  formColumn: [],
901
- getDisabled: (n) => n.disabled?.[e.update.type === i.Insert ? "create" : "update"],
762
+ getDisabled: (a) => a.disabled?.[e.update.type === r.Insert ? "create" : "update"],
902
763
  edit: {
903
764
  /**
904
765
  * 编辑原数据
@@ -907,46 +768,46 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
907
768
  /**
908
769
  * 将form填入数据和data比对差异数据返回
909
770
  */
910
- getApiData: (n) => {
911
- if (s.option.form?.editAll)
912
- return n;
913
- let t = {
771
+ getApiData: (a) => {
772
+ if (n.option.form?.editAll)
773
+ return a;
774
+ let o = {
914
775
  _id: e.update.edit.data._id
915
776
  };
916
- return Object.keys(e.update.edit.data).forEach((o) => {
917
- n[o] !== e.update.edit.data[o] && (t[o] = n[o]);
918
- }), t;
777
+ return Object.keys(e.update.edit.data).forEach((u) => {
778
+ a[u] !== e.update.edit.data[u] && (o[u] = a[u]);
779
+ }), o;
919
780
  }
920
781
  },
921
- open: (n, t) => {
782
+ open: (a, o) => {
922
783
  e.update.showContent || FunUtil.throttle(async () => {
923
- e.update.type = n;
924
- const o = n === i.Insert;
925
- e.update.edit.data = t, e.update.title = o ? "新增" : "编辑", e.update.form = JSONUtil.cp(o ? e.update.formDefault : t), await s.option.form?.openBefore?.(t, e.update), e.update.show = !0, e.update.showContent = !0, s.option.form?.openAfter?.(t, e.update);
784
+ e.update.type = a;
785
+ const u = a === r.Insert;
786
+ e.update.edit.data = o, e.update.title = u ? "新增" : "编辑", e.update.form = JSONUtil.cp(u ? e.update.formDefault : o), await n.option.form?.openBefore?.(o, e.update), e.update.show = !0, e.update.showContent = !0, n.option.form?.openAfter?.(o, e.update);
926
787
  });
927
788
  },
928
789
  submit: () => {
929
790
  FunUtil.throttle(async () => {
930
- await h.value?.validate(async (o, l) => new Promise((a, w) => {
931
- o || (F.fail("请检查表单数据"), w(!1)), a();
791
+ await m.value?.validate(async (u, t) => new Promise((l, b) => {
792
+ u || (O.fail("请检查表单数据"), b(!1)), l();
932
793
  })), e.update.loading = !0;
933
- const n = e.update.type === i.Insert ? s.option.api.create : s.option.api.update;
934
- let t = JSONUtil.cp(e.update.form);
935
- delete t.children, await s.option.form?.submitBefore?.(t, e.update), Object.keys(t).forEach((o) => {
936
- if (typeof t[o] == "string" && t[o].indexOf("T") > -1) {
937
- const l = new Date(t[o]).getTime();
938
- !isNaN(l) && l > (/* @__PURE__ */ new Date("1971-01-01")).getTime() && (t[o] = l);
794
+ const a = e.update.type === r.Insert ? n.option.api.create : n.option.api.update;
795
+ let o = JSONUtil.cp(e.update.form);
796
+ delete o.children, await n.option.form?.submitBefore?.(o, e.update), Object.keys(o).forEach((u) => {
797
+ if (typeof o[u] == "string" && o[u].indexOf("T") > -1) {
798
+ const t = new Date(o[u]).getTime();
799
+ !isNaN(t) && t > (/* @__PURE__ */ new Date("1971-01-01")).getTime() && (o[u] = t);
939
800
  }
940
- }), await n({
941
- ...t,
942
- final(o, l, a) {
801
+ }), await a({
802
+ ...o,
803
+ final(u, t, l) {
943
804
  e.update.loading = !1;
944
805
  }
945
- }), e.update.close(), await e.table.getList(), s.option.form?.submitAfter?.(t, e.update);
806
+ }), e.update.close(), await e.table.getList(), n.option.form?.submitAfter?.(o, e.update);
946
807
  });
947
808
  },
948
809
  close: () => {
949
- e.update.show = !1, d.once(() => {
810
+ e.update.show = !1, setTimeout(() => {
950
811
  e.update.showContent = !1;
951
812
  }, 350);
952
813
  }
@@ -959,23 +820,23 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
959
820
  close: () => {
960
821
  e.remove.show = !1;
961
822
  },
962
- open: (n) => {
963
- if (n.length === 0) {
964
- F.fail("请选择要删除的数据");
823
+ open: (a) => {
824
+ if (a.length === 0) {
825
+ O.fail("请选择要删除的数据");
965
826
  return;
966
827
  }
967
- e.remove.items = n, e.remove.show = !0;
828
+ e.remove.items = a, e.remove.show = !0;
968
829
  },
969
830
  submit: () => {
970
831
  FunUtil.throttle(async () => {
971
832
  e.table.loading = !0;
972
- const n = s.option.api.delete;
973
- await n({
974
- _id: e.remove.items.map((t) => t._id),
975
- final(t, o, l) {
833
+ const a = n.option.api.delete;
834
+ await a({
835
+ _id: e.remove.items.map((o) => o._id),
836
+ final(o, u, t) {
976
837
  e.table.loading = !1;
977
838
  }
978
- }), F.success("操作成功"), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
839
+ }), O.success("操作成功"), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
979
840
  });
980
841
  }
981
842
  },
@@ -983,12 +844,12 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
983
844
  e.initCurdConfig(), e.initColumnOptions(), e.initColumnForm();
984
845
  },
985
846
  initCurdConfig: () => {
986
- const t = {
847
+ const o = {
987
848
  tools: {
988
849
  search: !0,
989
850
  reset: !0,
990
851
  expand: !1,
991
- add: (l) => l === void 0,
852
+ add: (t) => t === void 0,
992
853
  update: !0,
993
854
  delete: !0,
994
855
  export: {
@@ -1001,9 +862,9 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1001
862
  emptyText: "暂无数据",
1002
863
  highlightCurrentRow: !0
1003
864
  }
1004
- }, o = s.option;
1005
- Object.keys(t).forEach((l) => {
1006
- o[l] = ObjectUtil.deepMerge(t[l], o[l] || {});
865
+ }, u = n.option;
866
+ Object.keys(o).forEach((t) => {
867
+ u[t] = ObjectUtil.deepMerge(o[t], u[t] || {});
1007
868
  });
1008
869
  },
1009
870
  /**
@@ -1012,27 +873,27 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1012
873
  * @returns
1013
874
  */
1014
875
  initColumnOptions: () => {
1015
- const n = s.option, t = (o) => {
1016
- const a = {
876
+ const a = n.option, o = (u) => {
877
+ const l = {
1017
878
  options: {
1018
879
  switch: {
1019
880
  activeValue: !0,
1020
881
  activeLabel: "开启",
1021
882
  inactiveValue: !1,
1022
883
  inactiveLabel: "关闭",
1023
- tableBeforeChange: async (O, b) => {
1024
- const $ = o.options?.switch;
884
+ tableBeforeChange: async (x, y) => {
885
+ const E = u.options?.switch;
1025
886
  try {
1026
- return await m.value?.open({
887
+ return await c.value?.open({
1027
888
  title: "确认修改",
1028
- content: `确认要${b[O] === $.activeValue ? $.inactiveLabel : $.activeLabel}吗?`
1029
- }), e.table.loading = !0, await s.option.api.update({
1030
- _id: b._id,
1031
- [O]: b[O] === $.activeValue ? $.inactiveValue : $.activeValue,
1032
- final(M, N, k) {
889
+ content: `确认要${y[x] === E.activeValue ? E.inactiveLabel : E.activeLabel}吗?`
890
+ }), e.table.loading = !0, await n.option.api.update({
891
+ _id: y._id,
892
+ [x]: y[x] === E.activeValue ? E.inactiveValue : E.activeValue,
893
+ final(z, T, Y) {
1033
894
  e.table.loading = !1;
1034
895
  }
1035
- }), F.success("操作成功"), e.table.getList(), !0;
896
+ }), O.success("操作成功"), e.table.getList(), !0;
1036
897
  } catch {
1037
898
  return !1;
1038
899
  }
@@ -1067,213 +928,213 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1067
928
  table: 0,
1068
929
  form: 0
1069
930
  }
1070
- }, w = o;
1071
- Object.keys(a).forEach((O) => {
1072
- w[O] = ObjectUtil.deepMerge(a[O], w[O] || {});
931
+ }, b = u;
932
+ Object.keys(l).forEach((x) => {
933
+ b[x] = ObjectUtil.deepMerge(l[x], b[x] || {});
1073
934
  });
1074
935
  };
1075
- n.column.forEach(t), n.table?.column?.forEach(t);
936
+ a.column.forEach(o), a.table?.column?.forEach(o);
1076
937
  },
1077
938
  initColumnForm: () => {
1078
- const n = s.option;
939
+ const a = n.option;
1079
940
  e.update.formColumn = [], e.table.column.show = {
1080
941
  list: [],
1081
942
  listSource: []
1082
943
  };
1083
- const t = [], o = s.option.form?.maxSpan || 12, l = s.option.form?.defaultSpan || o / 2;
1084
- let a = [];
1085
- const w = (b) => {
1086
- if (e.update.formDefault[b.key] = b.value, b.table.table && (b.show.table && e.table.column.show.list.push(b.key), b.table.table && e.table.column.show.listSource.push(b.key)), b.isForm) {
1087
- b.form = b.form || { span: l }, b.form.span = b.form.span ?? l;
1088
- let $ = b.form.span, M = a.reduce((k, v) => k + v.span, $);
1089
- const N = a.length;
1090
- a.push({ item: b, span: $ }), (N === 1 && a[0].span === 0 || M >= o || $ === 0 && N > 1) && (t.push(a), a = []), b.rules && (e.update.rules[b.key] = b.rules);
944
+ const o = [], u = n.option.form?.maxSpan || 12, t = n.option.form?.defaultSpan || u / 2;
945
+ let l = [];
946
+ const b = (y) => {
947
+ if (e.update.formDefault[y.key] = y.value, y.table.table && (y.show.table && e.table.column.show.list.push(y.key), y.table.table && e.table.column.show.listSource.push(y.key)), y.isForm) {
948
+ y.form = y.form || { span: t }, y.form.span = y.form.span ?? t;
949
+ let E = y.form.span, z = l.reduce((Y, ae) => Y + ae.span, E);
950
+ const T = l.length;
951
+ l.push({ item: y, span: E }), (T === 1 && l[0].span === 0 || z >= u || E === 0 && T > 1) && (o.push(l), l = []), y.rules && (e.update.rules[y.key] = y.rules);
1091
952
  }
1092
953
  };
1093
- n.column.forEach((b) => {
1094
- b.isForm = !0, w(b);
1095
- }), s.option.table?.column?.forEach((b) => {
1096
- b.isForm = !1, w(b);
1097
- }), e.search.column.list = n.column.concat(n.table?.column || []), e.table.column.list = e.search.column.list.filter((b) => b.table?.table), e.search.column.list.sort((b, $) => b.sort?.search - $.sort?.search), e.table.column.list.sort((b, $) => b.sort?.table - $.sort?.table), a.length > 0 && t.push(a), e.update.formColumn = t;
1098
- const O = s.option.search?.formDefault;
1099
- O && Object.keys(O).forEach((b) => {
1100
- e.search.formDefault[b] = O[b];
1101
- }), n.column.forEach((b) => {
1102
- b.show?.search || (e.search.formDefault[b.key] = void 0);
954
+ a.column.forEach((y) => {
955
+ y.isForm = !0, b(y);
956
+ }), n.option.table?.column?.forEach((y) => {
957
+ y.isForm = !1, b(y);
958
+ }), e.search.column.list = a.column.concat(a.table?.column || []), e.table.column.list = e.search.column.list.filter((y) => y.table?.table), e.search.column.list.sort((y, E) => y.sort?.search - E.sort?.search), e.table.column.list.sort((y, E) => y.sort?.table - E.sort?.table), l.length > 0 && o.push(l), e.update.formColumn = o;
959
+ const x = n.option.search?.formDefault;
960
+ x && Object.keys(x).forEach((y) => {
961
+ e.search.formDefault[y] = x[y];
962
+ }), a.column.forEach((y) => {
963
+ y.show?.search || (e.search.formDefault[y.key] = void 0);
1103
964
  }), e.search.form = JSONUtil.cp(e.search.formDefault);
1104
965
  }
1105
966
  });
1106
- return e.init(), re(() => {
967
+ return e.init(), ee(() => {
1107
968
  e.table.getList();
1108
- }), u({
969
+ }), i({
1109
970
  conf: e
1110
- }), (n, t) => {
1111
- const o = me("loading");
1112
- return p(), C("div", Fe, [
1113
- L("div", je, [
1114
- V(n.$slots, "box-left"),
1115
- L("div", Le, [
1116
- f.option.search?.show !== !1 ? (p(), C("div", Te, [
1117
- E(c(Y), {
971
+ }), (a, o) => {
972
+ const u = ne("loading");
973
+ return f(), w("div", ve, [
974
+ U("div", Ce, [
975
+ k(a.$slots, "box-left"),
976
+ U("div", Ve, [
977
+ p.option.search?.show !== !1 ? (f(), w("div", De, [
978
+ v(d(K), {
1118
979
  model: e.search.form,
1119
980
  inline: ""
1120
981
  }, {
1121
- default: y(() => [
1122
- V(n.$slots, "search-start", {
982
+ default: h(() => [
983
+ k(a.$slots, "search-start", {
1123
984
  row: e.search.form
1124
985
  }),
1125
- (p(!0), C(I, null, B(e.search.column.list, (l) => (p(), C(I, {
1126
- key: l.key
986
+ (f(!0), w($, null, F(e.search.column.list, (t) => (f(), w($, {
987
+ key: t.key
1127
988
  }, [
1128
- (typeof l.show?.search == "function" ? l.show?.search(e.search.form) : l.show?.search) ? (p(), g(c(K), {
989
+ (typeof t.show?.search == "function" ? t.show?.search(e.search.form) : t.show?.search) ? (f(), g(d(_), {
1129
990
  key: 0,
1130
- label: l.label
991
+ label: t.label
1131
992
  }, {
1132
- default: y(() => [
1133
- V(n.$slots, "search-" + l.key, {
993
+ default: h(() => [
994
+ k(a.$slots, "search-" + t.key, {
1134
995
  row: e.search.form
1135
996
  }, () => [
1136
- l.type === "input" ? (p(), g(c(Z), {
997
+ t.type === "input" ? (f(), g(d(H), {
1137
998
  key: 0,
1138
- modelValue: e.search.form[l.key],
1139
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1140
- placeholder: `请输入${l.label}`,
999
+ modelValue: e.search.form[t.key],
1000
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
1001
+ placeholder: `请输入${t.label}`,
1141
1002
  clearable: "",
1142
- disabled: l.disabled?.search
1143
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : l.type === "switch" ? (p(), g(c(q), {
1003
+ disabled: t.disabled?.search
1004
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (f(), g(d(M), {
1144
1005
  key: 1,
1145
- modelValue: e.search.form[l.key],
1146
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1147
- placeholder: `请选择${l.label}`,
1006
+ modelValue: e.search.form[t.key],
1007
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
1008
+ placeholder: `请选择${t.label}`,
1148
1009
  clearable: "",
1149
- disabled: l.disabled?.search
1010
+ disabled: t.disabled?.search
1150
1011
  }, {
1151
- default: y(() => [
1152
- (p(), g(c(A), {
1153
- key: l.options?.switch?.activeValue,
1154
- label: l.options?.switch?.activeLabel,
1155
- value: l.options?.switch?.activeValue
1012
+ default: h(() => [
1013
+ (f(), g(d(R), {
1014
+ key: t.options?.switch?.activeValue,
1015
+ label: t.options?.switch?.activeLabel,
1016
+ value: t.options?.switch?.activeValue
1156
1017
  }, null, 8, ["label", "value"])),
1157
- (p(), g(c(A), {
1158
- key: l.options?.switch?.inactiveValue,
1159
- label: l.options?.switch?.inactiveLabel,
1160
- value: l.options?.switch?.inactiveValue
1018
+ (f(), g(d(R), {
1019
+ key: t.options?.switch?.inactiveValue,
1020
+ label: t.options?.switch?.inactiveLabel,
1021
+ value: t.options?.switch?.inactiveValue
1161
1022
  }, null, 8, ["label", "value"]))
1162
1023
  ]),
1163
1024
  _: 2
1164
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : l.type === "select" ? (p(), g(c(q), {
1025
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "select" ? (f(), g(d(M), {
1165
1026
  key: 2,
1166
- modelValue: e.search.form[l.key],
1167
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1168
- placeholder: `请选择${l.label}`,
1027
+ modelValue: e.search.form[t.key],
1028
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
1029
+ placeholder: `请选择${t.label}`,
1169
1030
  clearable: "",
1170
- disabled: l.disabled?.search
1031
+ disabled: t.disabled?.search
1171
1032
  }, {
1172
- default: y(() => [
1173
- (p(!0), C(I, null, B(l.options?.select?.data, (a) => (p(), g(c(A), {
1174
- key: a.value,
1175
- label: a.label,
1176
- value: a.value
1033
+ default: h(() => [
1034
+ (f(!0), w($, null, F(t.options?.select?.data, (l) => (f(), g(d(R), {
1035
+ key: l.value,
1036
+ label: l.label,
1037
+ value: l.value
1177
1038
  }, null, 8, ["label", "value"]))), 128))
1178
1039
  ]),
1179
1040
  _: 2
1180
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : x("", !0)
1041
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : C("", !0)
1181
1042
  ])
1182
1043
  ]),
1183
1044
  _: 2
1184
- }, 1032, ["label"])) : x("", !0)
1045
+ }, 1032, ["label"])) : C("", !0)
1185
1046
  ], 64))), 128)),
1186
- V(n.$slots, "search-center", {
1047
+ k(a.$slots, "search-center", {
1187
1048
  row: e.search.form
1188
1049
  }),
1189
- E(c(K), null, {
1190
- default: y(() => [
1191
- f.option.tools?.search ? (p(), g(c(j), {
1050
+ v(d(_), null, {
1051
+ default: h(() => [
1052
+ p.option.tools?.search ? (f(), g(d(S), {
1192
1053
  key: 0,
1193
1054
  type: "primary",
1194
1055
  onClick: e.search.submit
1195
1056
  }, {
1196
- default: y(() => [...t[7] || (t[7] = [
1197
- U(" 搜索 ", -1)
1057
+ default: h(() => [...o[7] || (o[7] = [
1058
+ V(" 搜索 ", -1)
1198
1059
  ])]),
1199
1060
  _: 1
1200
- }, 8, ["onClick"])) : x("", !0),
1201
- f.option.tools?.reset ? (p(), g(c(j), {
1061
+ }, 8, ["onClick"])) : C("", !0),
1062
+ p.option.tools?.reset ? (f(), g(d(S), {
1202
1063
  key: 1,
1203
1064
  onClick: e.search.reset
1204
1065
  }, {
1205
- default: y(() => [...t[8] || (t[8] = [
1206
- U("重置", -1)
1066
+ default: h(() => [...o[8] || (o[8] = [
1067
+ V("重置", -1)
1207
1068
  ])]),
1208
1069
  _: 1
1209
- }, 8, ["onClick"])) : x("", !0)
1070
+ }, 8, ["onClick"])) : C("", !0)
1210
1071
  ]),
1211
1072
  _: 1
1212
1073
  }),
1213
- V(n.$slots, "search-end", {
1074
+ k(a.$slots, "search-end", {
1214
1075
  row: e.search.form
1215
1076
  })
1216
1077
  ]),
1217
1078
  _: 3
1218
1079
  }, 8, ["model"])
1219
- ])) : x("", !0),
1220
- L("div", Re, [
1221
- L("div", Be, [
1222
- c(r)(f.option.tools?.add) ? (p(), C("div", Me, [
1223
- E(c(j), {
1080
+ ])) : C("", !0),
1081
+ U("div", Ee, [
1082
+ U("div", Ue, [
1083
+ d(s)(p.option.tools?.add) ? (f(), w("div", xe, [
1084
+ v(d(S), {
1224
1085
  type: "primary",
1225
- onClick: t[0] || (t[0] = (l) => e.update.open(c(i).Insert))
1086
+ onClick: o[0] || (o[0] = (t) => e.update.open(d(r).Insert))
1226
1087
  }, {
1227
- default: y(() => [...t[9] || (t[9] = [
1228
- U("新增", -1)
1088
+ default: h(() => [...o[9] || (o[9] = [
1089
+ V("新增", -1)
1229
1090
  ])]),
1230
1091
  _: 1
1231
1092
  })
1232
- ])) : x("", !0),
1233
- f.option.table?.selectable && c(r)(f.option.tools?.delete) ? (p(), C("div", ze, [
1234
- E(c(j), {
1093
+ ])) : C("", !0),
1094
+ p.option.table?.selectable && d(s)(p.option.tools?.delete) ? (f(), w("div", $e, [
1095
+ v(d(S), {
1235
1096
  type: "danger",
1236
- onClick: t[1] || (t[1] = (l) => e.remove.open(e.table.selection.list))
1097
+ onClick: o[1] || (o[1] = (t) => e.remove.open(e.table.selection.list))
1237
1098
  }, {
1238
- default: y(() => [...t[10] || (t[10] = [
1239
- U(" 删除 ", -1)
1099
+ default: h(() => [...o[10] || (o[10] = [
1100
+ V(" 删除 ", -1)
1240
1101
  ])]),
1241
1102
  _: 1
1242
1103
  })
1243
- ])) : x("", !0),
1244
- f.option.tools?.expand ? (p(), C("div", _e, [
1245
- E(c(j), {
1104
+ ])) : C("", !0),
1105
+ p.option.tools?.expand ? (f(), w("div", Oe, [
1106
+ v(d(S), {
1246
1107
  type: "warning",
1247
- onClick: t[2] || (t[2] = (l) => e.table.expand.all())
1108
+ onClick: o[2] || (o[2] = (t) => e.table.expand.all())
1248
1109
  }, {
1249
- default: y(() => [...t[11] || (t[11] = [
1250
- U("展开/收缩", -1)
1110
+ default: h(() => [...o[11] || (o[11] = [
1111
+ V("展开/收缩", -1)
1251
1112
  ])]),
1252
1113
  _: 1
1253
1114
  })
1254
- ])) : x("", !0),
1255
- f.option.tools?.export?.show ? (p(), g(c(ge), {
1115
+ ])) : C("", !0),
1116
+ p.option.tools?.export?.show ? (f(), g(d(ue), {
1256
1117
  key: 3,
1257
1118
  onCommand: e.table.export
1258
1119
  }, {
1259
- dropdown: y(() => [
1260
- E(c(we), null, {
1261
- default: y(() => [
1262
- E(c(J), { command: "select" }, {
1263
- default: y(() => [...t[13] || (t[13] = [
1264
- U("导出选中", -1)
1120
+ dropdown: h(() => [
1121
+ v(d(fe), null, {
1122
+ default: h(() => [
1123
+ v(d(P), { command: "select" }, {
1124
+ default: h(() => [...o[13] || (o[13] = [
1125
+ V("导出选中", -1)
1265
1126
  ])]),
1266
1127
  _: 1
1267
1128
  }),
1268
- E(c(J), { command: "page" }, {
1269
- default: y(() => [...t[14] || (t[14] = [
1270
- U("导出本页", -1)
1129
+ v(d(P), { command: "page" }, {
1130
+ default: h(() => [...o[14] || (o[14] = [
1131
+ V("导出本页", -1)
1271
1132
  ])]),
1272
1133
  _: 1
1273
1134
  }),
1274
- E(c(J), { command: "all" }, {
1275
- default: y(() => [...t[15] || (t[15] = [
1276
- U("导出全部", -1)
1135
+ v(d(P), { command: "all" }, {
1136
+ default: h(() => [...o[15] || (o[15] = [
1137
+ V("导出全部", -1)
1277
1138
  ])]),
1278
1139
  _: 1
1279
1140
  })
@@ -1281,126 +1142,126 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1281
1142
  _: 1
1282
1143
  })
1283
1144
  ]),
1284
- default: y(() => [
1285
- L("div", Ne, [
1286
- E(c(j), { type: "warning" }, {
1287
- default: y(() => [...t[12] || (t[12] = [
1288
- U("导出", -1)
1145
+ default: h(() => [
1146
+ U("div", Se, [
1147
+ v(d(S), { type: "warning" }, {
1148
+ default: h(() => [...o[12] || (o[12] = [
1149
+ V("导出", -1)
1289
1150
  ])]),
1290
1151
  _: 1
1291
1152
  })
1292
1153
  ])
1293
1154
  ]),
1294
1155
  _: 1
1295
- }, 8, ["onCommand"])) : x("", !0),
1296
- V(n.$slots, "tools-left")
1156
+ }, 8, ["onCommand"])) : C("", !0),
1157
+ k(a.$slots, "tools-left")
1297
1158
  ]),
1298
- L("div", Pe, [
1299
- V(n.$slots, "tools-right")
1159
+ U("div", Fe, [
1160
+ k(a.$slots, "tools-right")
1300
1161
  ])
1301
1162
  ]),
1302
- L("div", Ae, [
1303
- L("div", We, [
1304
- he((p(), g(c(ve), S({
1163
+ U("div", Ie, [
1164
+ U("div", Le, [
1165
+ re((f(), g(d(pe), D({
1305
1166
  data: e.table.data
1306
- }, f.option.table, {
1167
+ }, p.option.table, {
1307
1168
  onSelectionChange: e.table.selection.change,
1308
1169
  "expand-row-keys": e.table.expand.rowKeys,
1309
1170
  onExpandChange: e.table.expand.change
1310
1171
  }), {
1311
- default: y(() => [
1312
- f.option.table?.selectable && c(r)(f.option.tools?.delete) ? (p(), g(c(G), {
1172
+ default: h(() => [
1173
+ p.option.table?.selectable && d(s)(p.option.tools?.delete) ? (f(), g(d(B), {
1313
1174
  key: 0,
1314
1175
  type: "selection",
1315
- selectable: typeof f.option.table?.selectable == "function" ? f.option.table?.selectable : void 0,
1176
+ selectable: typeof p.option.table?.selectable == "function" ? p.option.table?.selectable : void 0,
1316
1177
  width: "55"
1317
- }, null, 8, ["selectable"])) : x("", !0),
1318
- (p(!0), C(I, null, B(e.table.column.list, (l) => (p(), C(I, {
1319
- key: l.key
1178
+ }, null, 8, ["selectable"])) : C("", !0),
1179
+ (f(!0), w($, null, F(e.table.column.list, (t) => (f(), w($, {
1180
+ key: t.key
1320
1181
  }, [
1321
- e.table.column.show.list.includes(l.key) ? (p(), g(c(G), S({
1182
+ e.table.column.show.list.includes(t.key) ? (f(), g(d(B), D({
1322
1183
  key: 0,
1323
- prop: l.key,
1324
- label: l.label
1325
- }, { ref_for: !0 }, l.table), {
1326
- default: y(({ row: a }) => [
1327
- V(n.$slots, "table-" + l.key, {
1328
- row: a,
1329
- item: l
1184
+ prop: t.key,
1185
+ label: t.label
1186
+ }, { ref_for: !0 }, t.table), {
1187
+ default: h(({ row: l }) => [
1188
+ k(a.$slots, "table-" + t.key, {
1189
+ row: l,
1190
+ item: t
1330
1191
  }, () => [
1331
- l.type === "switch" ? (p(), g(c(ee), S({
1192
+ t.type === "switch" ? (f(), g(d(G), D({
1332
1193
  key: 0,
1333
- modelValue: a[l.key],
1334
- "onUpdate:modelValue": (w) => a[l.key] = w,
1335
- "before-change": () => l.options?.switch?.tableBeforeChange?.(l.key, a)
1336
- }, { ref_for: !0 }, l.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (p(), C(I, { key: 1 }, [
1337
- U(Q(a[l.key]), 1)
1194
+ modelValue: l[t.key],
1195
+ "onUpdate:modelValue": (b) => l[t.key] = b,
1196
+ "before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, l)
1197
+ }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w($, { key: 1 }, [
1198
+ V(J(l[t.key]), 1)
1338
1199
  ], 64))
1339
1200
  ])
1340
1201
  ]),
1341
1202
  _: 2
1342
- }, 1040, ["prop", "label"])) : x("", !0)
1203
+ }, 1040, ["prop", "label"])) : C("", !0)
1343
1204
  ], 64))), 128)),
1344
- c(r)(f.option.tools?.add) || c(r)(f.option.tools?.update) || c(r)(f.option.tools?.delete) || n.$slots["table-op-left"] || n.$slots["table-op-right"] ? (p(), g(c(G), {
1205
+ d(s)(p.option.tools?.add) || d(s)(p.option.tools?.update) || d(s)(p.option.tools?.delete) || a.$slots["table-op-left"] || a.$slots["table-op-right"] ? (f(), g(d(B), {
1345
1206
  key: 1,
1346
1207
  label: "操作",
1347
1208
  width: "180",
1348
1209
  align: "center",
1349
1210
  fixed: "right"
1350
1211
  }, {
1351
- default: y(({ row: l }) => [
1352
- V(n.$slots, "table-op-left", { row: l }),
1353
- c(r)(f.option.tools?.add, l) ? (p(), g(c(j), {
1212
+ default: h(({ row: t }) => [
1213
+ k(a.$slots, "table-op-left", { row: t }),
1214
+ d(s)(p.option.tools?.add, t) ? (f(), g(d(S), {
1354
1215
  key: 0,
1355
1216
  link: "",
1356
1217
  type: "primary",
1357
- onClick: (a) => e.update.open(c(i).Insert, l)
1218
+ onClick: (l) => e.update.open(d(r).Insert, t)
1358
1219
  }, {
1359
- default: y(() => [...t[16] || (t[16] = [
1360
- U(" 新增 ", -1)
1220
+ default: h(() => [...o[16] || (o[16] = [
1221
+ V(" 新增 ", -1)
1361
1222
  ])]),
1362
1223
  _: 1
1363
- }, 8, ["onClick"])) : x("", !0),
1364
- c(r)(f.option.tools?.update, l) ? (p(), g(c(j), {
1224
+ }, 8, ["onClick"])) : C("", !0),
1225
+ d(s)(p.option.tools?.update, t) ? (f(), g(d(S), {
1365
1226
  key: 1,
1366
1227
  link: "",
1367
1228
  type: "warning",
1368
- onClick: (a) => e.update.open(c(i).Update, l)
1229
+ onClick: (l) => e.update.open(d(r).Update, t)
1369
1230
  }, {
1370
- default: y(() => [...t[17] || (t[17] = [
1371
- U(" 编辑 ", -1)
1231
+ default: h(() => [...o[17] || (o[17] = [
1232
+ V(" 编辑 ", -1)
1372
1233
  ])]),
1373
1234
  _: 1
1374
- }, 8, ["onClick"])) : x("", !0),
1375
- c(r)(f.option.tools?.delete, l) ? (p(), g(c(j), {
1235
+ }, 8, ["onClick"])) : C("", !0),
1236
+ d(s)(p.option.tools?.delete, t) ? (f(), g(d(S), {
1376
1237
  key: 2,
1377
1238
  link: "",
1378
1239
  type: "danger",
1379
- onClick: (a) => e.remove.open([l])
1240
+ onClick: (l) => e.remove.open([t])
1380
1241
  }, {
1381
- default: y(() => [...t[18] || (t[18] = [
1382
- U(" 删除 ", -1)
1242
+ default: h(() => [...o[18] || (o[18] = [
1243
+ V(" 删除 ", -1)
1383
1244
  ])]),
1384
1245
  _: 1
1385
- }, 8, ["onClick"])) : x("", !0),
1386
- V(n.$slots, "table-op-right", { row: l })
1246
+ }, 8, ["onClick"])) : C("", !0),
1247
+ k(a.$slots, "table-op-right", { row: t })
1387
1248
  ]),
1388
1249
  _: 3
1389
- })) : x("", !0)
1250
+ })) : C("", !0)
1390
1251
  ]),
1391
1252
  _: 3
1392
1253
  }, 16, ["data", "onSelectionChange", "expand-row-keys", "onExpandChange"])), [
1393
- [o, e.table.loading]
1254
+ [u, e.table.loading]
1394
1255
  ])
1395
1256
  ])
1396
1257
  ]),
1397
- L("div", Ke, [
1398
- e.page.total > e.page.size ? (p(), g(c(ke), {
1258
+ U("div", je, [
1259
+ e.page.total > e.page.size ? (f(), g(d(ce), {
1399
1260
  key: 0,
1400
1261
  "current-page": e.page.num,
1401
- "onUpdate:currentPage": t[3] || (t[3] = (l) => e.page.num = l),
1262
+ "onUpdate:currentPage": o[3] || (o[3] = (t) => e.page.num = t),
1402
1263
  "page-size": e.page.size,
1403
- "onUpdate:pageSize": t[4] || (t[4] = (l) => e.page.size = l),
1264
+ "onUpdate:pageSize": o[4] || (o[4] = (t) => e.page.size = t),
1404
1265
  background: "",
1405
1266
  "page-sizes": e.page.sizeList,
1406
1267
  "pager-count": 7,
@@ -1408,200 +1269,204 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1408
1269
  total: e.page.total,
1409
1270
  onSizeChange: e.table.getList,
1410
1271
  onCurrentChange: e.table.getList
1411
- }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : x("", !0)
1272
+ }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
1412
1273
  ])
1413
1274
  ]),
1414
- V(n.$slots, "box-right")
1275
+ k(a.$slots, "box-right")
1415
1276
  ]),
1416
- E(c(te), S({
1277
+ v(d(q), D({
1417
1278
  modelValue: e.update.show,
1418
- "onUpdate:modelValue": t[5] || (t[5] = (l) => e.update.show = l),
1279
+ "onUpdate:modelValue": o[5] || (o[5] = (t) => e.update.show = t),
1419
1280
  title: e.update.title,
1420
1281
  "close-on-click-modal": !1,
1421
1282
  "before-close": e.update.close
1422
- }, f.option.dialog), {
1423
- footer: y(() => [
1424
- L("span", He, [
1425
- E(c(j), {
1283
+ }, p.option.dialog), {
1284
+ footer: h(() => [
1285
+ U("span", _e, [
1286
+ v(d(S), {
1426
1287
  onClick: e.update.close
1427
1288
  }, {
1428
- default: y(() => [...t[19] || (t[19] = [
1429
- U("关闭", -1)
1289
+ default: h(() => [...o[19] || (o[19] = [
1290
+ V("关闭", -1)
1430
1291
  ])]),
1431
1292
  _: 1
1432
1293
  }, 8, ["onClick"]),
1433
- E(c(j), {
1294
+ v(d(S), {
1434
1295
  type: "primary",
1435
1296
  onClick: e.update.submit,
1436
1297
  loading: e.update.loading
1437
1298
  }, {
1438
- default: y(() => [...t[20] || (t[20] = [
1439
- U(" 提交 ", -1)
1299
+ default: h(() => [...o[20] || (o[20] = [
1300
+ V(" 提交 ", -1)
1440
1301
  ])]),
1441
1302
  _: 1
1442
1303
  }, 8, ["onClick", "loading"])
1443
1304
  ])
1444
1305
  ]),
1445
- default: y(() => [
1446
- E(c(Y), {
1306
+ default: h(() => [
1307
+ v(d(K), {
1447
1308
  ref_key: "ruleFormRef",
1448
- ref: h,
1309
+ ref: m,
1449
1310
  model: e.update.form,
1450
1311
  rules: e.update.rules
1451
1312
  }, {
1452
- default: y(() => [
1453
- e.update.showContent ? (p(!0), C(I, { key: 0 }, B(e.update.formColumn, (l) => (p(), C("div", qe, [
1454
- V(n.$slots, "form-start", {
1313
+ default: h(() => [
1314
+ e.update.showContent ? (f(!0), w($, { key: 0 }, F(e.update.formColumn, (t) => (f(), w("div", ze, [
1315
+ k(a.$slots, "form-start", {
1455
1316
  row: e.update.form
1456
1317
  }),
1457
- (p(!0), C(I, null, B(l, (a) => (p(), C(I, null, [
1458
- c(r)(a.item.show?.form, e.update.form) ? (p(), C("div", {
1318
+ (f(!0), w($, null, F(t, (l) => (f(), w($, null, [
1319
+ d(s)(l.item.show?.form, e.update.form) ? (f(), w("div", {
1459
1320
  key: 0,
1460
- class: le(a.item.form.span > 0 ? `col-${a.item.form.span}` : "col")
1321
+ class: Q(l.item.form.span > 0 ? `col-${l.item.form.span}` : "col")
1461
1322
  }, [
1462
- E(c(K), {
1463
- label: a.item.label,
1464
- prop: a.item.key,
1465
- "label-width": a.item.form?.labelWidth || "100px"
1323
+ v(d(_), {
1324
+ label: l.item.label,
1325
+ prop: l.item.key,
1326
+ "label-width": l.item.form?.labelWidth || "100px"
1466
1327
  }, {
1467
- default: y(() => [
1468
- V(n.$slots, "form-" + a.item.key + "-start", {
1469
- row: e.update.form,
1470
- item: a.item
1471
- }),
1472
- V(n.$slots, "form-" + a.item.key, {
1473
- row: e.update.form,
1474
- item: a.item
1475
- }, () => [
1476
- a.item.type === "input" ? (p(), g(c(Z), S({
1477
- key: 0,
1478
- modelValue: e.update.form[a.item.key],
1479
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1480
- }, { ref_for: !0 }, a.item.options?.input, ne(a.item.options?.input?.on), {
1481
- disabled: e.update.getDisabled(a.item)
1482
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "switch" ? (p(), g(c(ee), S({
1483
- key: 1,
1484
- modelValue: e.update.form[a.item.key],
1485
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1486
- }, { ref_for: !0 }, a.item.options?.switch, {
1487
- disabled: e.update.getDisabled(a.item)
1488
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "select" ? (p(), g(c(q), S({
1489
- key: 2,
1490
- modelValue: e.update.form[a.item.key],
1491
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1492
- }, { ref_for: !0 }, a.item.options?.select, {
1493
- disabled: e.update.getDisabled(a.item),
1494
- style: { width: "100%" }
1495
- }), {
1496
- default: y(() => [
1497
- (p(!0), C(I, null, B(a.item.options?.select?.data, (w) => (p(), g(c(A), {
1498
- key: w.value,
1499
- label: w.label,
1500
- value: w.value
1501
- }, null, 8, ["label", "value"]))), 128))
1502
- ]),
1503
- _: 2
1504
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "list" ? (p(), g(ue, S({
1505
- key: 3,
1328
+ default: h(() => [
1329
+ U("div", Te, [
1330
+ k(a.$slots, "form-" + l.item.key + "-start", {
1506
1331
  row: e.update.form,
1507
- field: a.item.key
1508
- }, { ref_for: !0 }, a.item.options?.list, {
1509
- disabled: e.update.getDisabled(a.item),
1510
- style: { width: "100%" }
1511
- }), null, 16, ["row", "field", "disabled"])) : a.item.type === "tree-select" ? (p(), g(c(ie), S({
1512
- key: 4,
1513
- modelValue: e.update.form[a.item.key],
1514
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1515
- }, { ref_for: !0 }, a.item.options?.treeSelect, {
1516
- disabled: e.update.getDisabled(a.item),
1517
- style: { width: "100%" }
1518
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "datetime" ? (p(), g(c(de), S({
1519
- key: 5,
1520
- modelValue: e.update.form[a.item.key],
1521
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1522
- }, { ref_for: !0 }, a.item.options?.datetime, {
1523
- disabled: e.update.getDisabled(a.item)
1524
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c(_).customComponent[a.item.type] ? (p(), g(se(c(_).customComponent[a.item.type]), S({
1525
- key: 6,
1526
- modelValue: e.update.form[a.item.key],
1527
- "onUpdate:modelValue": (w) => e.update.form[a.item.key] = w
1528
- }, { ref_for: !0 }, a.item.options?.[a.item.type], {
1529
- disabled: e.update.getDisabled(a.item)
1530
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : x("", !0)
1531
- ]),
1532
- V(n.$slots, "form-" + a.item.key + "-end", {
1533
- row: e.update.form,
1534
- item: a.item
1535
- })
1332
+ item: l.item
1333
+ }),
1334
+ U("div", Re, [
1335
+ k(a.$slots, "form-" + l.item.key, {
1336
+ row: e.update.form,
1337
+ item: l.item
1338
+ }, () => [
1339
+ l.item.type === "input" ? (f(), g(d(H), D({
1340
+ key: 0,
1341
+ modelValue: e.update.form[l.item.key],
1342
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1343
+ }, { ref_for: !0 }, l.item.options?.input, A(l.item.options?.input?.on || {}), {
1344
+ disabled: e.update.getDisabled(l.item)
1345
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "switch" ? (f(), g(d(G), D({
1346
+ key: 1,
1347
+ modelValue: e.update.form[l.item.key],
1348
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1349
+ }, { ref_for: !0 }, l.item.options?.switch, {
1350
+ disabled: e.update.getDisabled(l.item)
1351
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "select" ? (f(), g(d(M), D({
1352
+ key: 2,
1353
+ modelValue: e.update.form[l.item.key],
1354
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1355
+ }, { ref_for: !0 }, l.item.options?.select, A(l.item.options?.select?.on || {}), {
1356
+ disabled: e.update.getDisabled(l.item),
1357
+ style: { width: "100%" }
1358
+ }), {
1359
+ default: h(() => [
1360
+ (f(!0), w($, null, F(l.item.options?.select?.data, (b) => (f(), g(d(R), {
1361
+ key: b.value,
1362
+ label: b.label,
1363
+ value: b.value
1364
+ }, null, 8, ["label", "value"]))), 128))
1365
+ ]),
1366
+ _: 2
1367
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "list" ? (f(), g(oe, D({
1368
+ key: 3,
1369
+ row: e.update.form,
1370
+ field: l.item.key
1371
+ }, { ref_for: !0 }, l.item.options?.list, {
1372
+ disabled: e.update.getDisabled(l.item),
1373
+ style: { width: "100%" }
1374
+ }), null, 16, ["row", "field", "disabled"])) : l.item.type === "tree-select" ? (f(), g(d(te), D({
1375
+ key: 4,
1376
+ modelValue: e.update.form[l.item.key],
1377
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1378
+ }, { ref_for: !0 }, l.item.options?.treeSelect, {
1379
+ disabled: e.update.getDisabled(l.item),
1380
+ style: { width: "100%" }
1381
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "datetime" ? (f(), g(d(le), D({
1382
+ key: 5,
1383
+ modelValue: e.update.form[l.item.key],
1384
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1385
+ }, { ref_for: !0 }, l.item.options?.datetime, {
1386
+ disabled: e.update.getDisabled(l.item)
1387
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d(L).customComponent[l.item.type] ? (f(), g(Z(d(L).customComponent[l.item.type]), D({
1388
+ key: 6,
1389
+ modelValue: e.update.form[l.item.key],
1390
+ "onUpdate:modelValue": (b) => e.update.form[l.item.key] = b
1391
+ }, { ref_for: !0 }, l.item.options?.[l.item.type], {
1392
+ disabled: e.update.getDisabled(l.item)
1393
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1394
+ ])
1395
+ ]),
1396
+ k(a.$slots, "form-" + l.item.key + "-end", {
1397
+ row: e.update.form,
1398
+ item: l.item
1399
+ })
1400
+ ])
1536
1401
  ]),
1537
1402
  _: 2
1538
1403
  }, 1032, ["label", "prop", "label-width"])
1539
- ], 2)) : x("", !0)
1404
+ ], 2)) : C("", !0)
1540
1405
  ], 64))), 256)),
1541
- V(n.$slots, "form-end", {
1406
+ k(a.$slots, "form-end", {
1542
1407
  row: e.update.form
1543
1408
  })
1544
- ]))), 256)) : x("", !0)
1409
+ ]))), 256)) : C("", !0)
1545
1410
  ]),
1546
1411
  _: 3
1547
1412
  }, 8, ["model", "rules"])
1548
1413
  ]),
1549
1414
  _: 3
1550
1415
  }, 16, ["modelValue", "title", "before-close"]),
1551
- E(c(te), {
1416
+ v(d(q), {
1552
1417
  modelValue: e.remove.show,
1553
- "onUpdate:modelValue": t[6] || (t[6] = (l) => e.remove.show = l),
1418
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => e.remove.show = t),
1554
1419
  title: e.remove.title,
1555
1420
  "close-on-click-modal": !1
1556
1421
  }, {
1557
- footer: y(() => [
1558
- L("span", Je, [
1559
- E(c(j), {
1422
+ footer: h(() => [
1423
+ U("span", Me, [
1424
+ v(d(S), {
1560
1425
  onClick: e.remove.close
1561
1426
  }, {
1562
- default: y(() => [...t[21] || (t[21] = [
1563
- U("关闭", -1)
1427
+ default: h(() => [...o[21] || (o[21] = [
1428
+ V("关闭", -1)
1564
1429
  ])]),
1565
1430
  _: 1
1566
1431
  }, 8, ["onClick"]),
1567
- E(c(j), {
1432
+ v(d(S), {
1568
1433
  type: "danger",
1569
1434
  onClick: e.remove.submit,
1570
1435
  loading: e.remove.loading
1571
1436
  }, {
1572
- default: y(() => [...t[22] || (t[22] = [
1573
- U(" 确认删除 ", -1)
1437
+ default: h(() => [...o[22] || (o[22] = [
1438
+ V(" 确认删除 ", -1)
1574
1439
  ])]),
1575
1440
  _: 1
1576
1441
  }, 8, ["onClick", "loading"])
1577
1442
  ])
1578
1443
  ]),
1579
- default: y(() => [
1580
- L("div", null, "确认要删除【" + Q(e.remove.items.length) + "】条数据吗?", 1)
1444
+ default: h(() => [
1445
+ U("div", null, "确认要删除【" + J(e.remove.items.length) + "】条数据吗?", 1)
1581
1446
  ]),
1582
1447
  _: 1
1583
1448
  }, 8, ["modelValue", "title"]),
1584
- E(Ie, {
1449
+ v(ke, {
1585
1450
  ref_key: "switchConfirmRef",
1586
- ref: m
1451
+ ref: c
1587
1452
  }, null, 512)
1588
1453
  ]);
1589
1454
  };
1590
1455
  }
1591
- }), Ye = (f, u) => {
1592
- if (f.component("TCurd", Ge), f.component("TFormList", ue), f.component("TColumn", Ve), u?.customComponent) {
1593
- _.customComponent = u.customComponent;
1594
- for (const i in u.customComponent)
1595
- f.component(i, u.customComponent[i]);
1456
+ }), We = (p, i) => {
1457
+ if (p.component("TCurd", Ne), p.component("TFormList", oe), p.component("TColumn", he), i?.customComponent) {
1458
+ L.customComponent = i.customComponent;
1459
+ for (const r in i.customComponent)
1460
+ p.component(r, i.customComponent[r]);
1596
1461
  }
1597
1462
  };
1598
1463
  export {
1599
- z as ArrUtil,
1600
- xe as ExcelUtil,
1601
- Ve as TColumn,
1602
- Ge as TCurd,
1603
- _ as TForm,
1604
- ue as TFormList,
1605
- F as TSys,
1606
- Ye as install
1464
+ I as ArrUtil,
1465
+ ge as ExcelUtil,
1466
+ he as TColumn,
1467
+ Ne as TCurd,
1468
+ L as TForm,
1469
+ oe as TFormList,
1470
+ O as TSys,
1471
+ We as install
1607
1472
  };