cc1-form 1.0.0 → 1.0.1

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 q, resolveComponent as W, createBlock as g, openBlock as f, unref as d, withCtx as b, createElementBlock as w, createCommentVNode as C, Fragment as x, renderList as F, renderSlot as k, normalizeClass as X, createVNode as v, mergeProps as D, toHandlers as Y, resolveDynamicComponent as Z, onMounted as ee, createElementVNode as S, createTextVNode as V, normalizeStyle as se, toDisplayString as A, resolveDirective as ne, withDirectives as re } from "vue";
2
+ import { ElMessage as ie, ElLoading as de, ElForm as J, ElFormItem as M, ElInput as K, ElSwitch as H, ElSelect as _, ElOption as R, ElTreeSelect as te, ElDatePicker as le, ElDialog as G, ElButton as O, ElDropdown as ue, ElDropdownMenu as fe, ElDropdownItem as P, ElTable as pe, ElTableColumn as B, ElPagination as ce } from "element-plus";
3
+ class $ {
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 (!$.moduleObj[i])
45
+ throw new Error(`模块${i}未加载,请赋值如:TSys.moduleObj = { ${i}: ()=>import('${i}') }`);
46
+ const r = await $.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 $.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 === $.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" }, be = /* @__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 = $.isFun, n = $.EDialog, c = j(), m = p, s = q({
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 = (h) => {
244
+ if (s.formDefault[h.key] = h.value, h.isForm) {
245
+ h.form = h.form || { span: u }, h.form.span = h.form.span ?? u;
246
+ let U = h.form.span, y = t.reduce((z, T) => z + T.span, U);
247
+ const E = t.length;
248
+ t.push({ item: h, span: U }), (E === 1 && t[0].span === 0 || y >= o || U === 0 && E > 1) && (a.push(t), t = []), h.rules && (s.rules[h.key] = h.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((h) => {
252
+ h.isForm = !0, l(h);
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(J), {
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: b(() => [
268
+ s.showContent ? (f(!0), w(x, { 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(x, null, F(u, (t) => (f(), w(x, 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: X(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(M), {
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: b(() => [
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(K), 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, Y(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(H), 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(_), 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: b(() => [
312
+ (f(!0), w(x, 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 he = {
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,149 @@ 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 = q({
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", he, [
489
+ k(m.$slots, "list-start", { row: p.row }),
490
+ S("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: b(() => [...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(x, 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(x, 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: X(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: b(() => [...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 $.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(G), {
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: b(() => [
574
+ S("span", we, [
575
+ v(d(O), { onClick: o }, {
576
+ default: b(() => [...t[1] || (t[1] = [
577
+ V("取消", -1)
720
578
  ])]),
721
579
  _: 1
722
580
  }),
723
- E(c(j), {
581
+ v(d(O), {
724
582
  type: "primary",
725
- onClick: e
583
+ onClick: a
726
584
  }, {
727
- default: y(() => [...o[2] || (o[2] = [
728
- U("确认", -1)
585
+ default: b(() => [...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: b(() => [
593
+ S("div", null, A(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 = { class: "dialog-footer" }, Re = { class: "dialog-footer" }, Me = /* @__PURE__ */ N({
753
611
  __name: "index",
754
612
  props: {
755
613
  /**
@@ -759,8 +617,8 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
759
617
  default: {}
760
618
  }
761
619
  },
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({
620
+ setup(p, { expose: i }) {
621
+ const r = $.EDialog, n = p, c = j(), m = j(), s = $.isFun, e = q({
764
622
  search: {
765
623
  column: {
766
624
  list: []
@@ -768,29 +626,29 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
768
626
  form: {},
769
627
  formDefault: {},
770
628
  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]);
629
+ let a = {};
630
+ n.option.column.forEach((u) => {
631
+ (typeof u.show?.search == "function" ? u.show?.search(e.search.form) : u.show?.search) && (a[u.key] = e.search.form[u.key]);
774
632
  });
775
- const t = s.option.search?.before?.(n);
776
- return t && (n = t), n;
633
+ const o = n.option.search?.before?.(a);
634
+ return o && (a = o), a;
777
635
  },
778
636
  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();
637
+ const a = e.search.formDefault;
638
+ Object.keys(a).forEach((o) => {
639
+ n.option.search?.resetMode === "default" ? a[o] = e.search.formDefault[o] : a[o] = void 0;
640
+ }), e.search.form = JSONUtil.cp(a), e.page.num = 1, e.table.getList();
783
641
  },
784
642
  submit: () => {
785
643
  e.page.num = 1, e.table.getList();
786
644
  }
787
645
  },
788
646
  page: {
789
- size: s.option.page?.size || 10,
790
- sizeList: s.option.page?.sizeList || [10, 20, 50, 100],
647
+ size: n.option.page?.size || 10,
648
+ sizeList: n.option.page?.sizeList || [10, 20, 50, 100],
791
649
  num: 1,
792
650
  total: 0,
793
- layout: s.option.page?.layout || "total, sizes, prev, pager, next, jumper"
651
+ layout: n.option.page?.layout || "total, sizes, prev, pager, next, jumper"
794
652
  },
795
653
  table: {
796
654
  loading: !1,
@@ -798,19 +656,19 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
798
656
  expand: {
799
657
  isExpand: !1,
800
658
  rowKeys: [],
801
- change: (n, t) => {
659
+ change: (a, o) => {
802
660
  },
803
661
  all: () => {
804
662
  if (e.table.expand.isExpand)
805
663
  e.table.expand.rowKeys = [];
806
664
  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;
665
+ const a = (o) => {
666
+ let u = [];
667
+ return o.forEach((t) => {
668
+ u.push(t._id), t.children && t.children.length > 0 && (u = u.concat(a(t.children)));
669
+ }), u;
812
670
  };
813
- e.table.expand.rowKeys = n(e.table.data);
671
+ e.table.expand.rowKeys = a(e.table.data);
814
672
  }
815
673
  e.table.expand.isExpand = !e.table.expand.isExpand;
816
674
  }
@@ -836,56 +694,56 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
836
694
  },
837
695
  getList: async () => {
838
696
  e.table.loading = !0;
839
- const n = s.option.api.list, t = await n({
697
+ const a = n.option.api.list, o = await a({
840
698
  size: e.page.size,
841
699
  num: e.page.num,
842
700
  ...e.search.getFormData(),
843
- final(a, w, O) {
701
+ final(l, h, U) {
844
702
  e.table.loading = !1;
845
703
  }
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;
704
+ }), u = o.data || { list: o };
705
+ let t = Array.isArray(u.list) ? u.list : u;
706
+ e.table.data = n.option.data ? await n.option.data(t) : t, e.page.total = u.total || 0;
849
707
  },
850
708
  selection: {
851
709
  list: [],
852
- change: (n) => {
853
- e.table.selection.list = n;
710
+ change: (a) => {
711
+ e.table.selection.list = a;
854
712
  }
855
713
  },
856
714
  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);
715
+ start: async (a) => {
716
+ let o = await e.table.exportFun[a](), u = n.option.column;
717
+ const t = JSONUtil.cp({
718
+ data: o,
719
+ columns: u
720
+ }), l = n.option.tools?.export || {};
721
+ l.before && l.before(t), ge.exportToExcel(t.data, t.columns, l.fileName);
864
722
  },
865
723
  select: () => {
866
724
  if (e.table.selection.list.length === 0)
867
- throw F.fail("请选择要导出的数据"), new Error("请选择要导出的数据");
725
+ throw $.fail("请选择要导出的数据"), new Error("请选择要导出的数据");
868
726
  return e.table.selection.list;
869
727
  },
870
728
  page: () => {
871
729
  if (e.table.data.length === 0)
872
- throw F.fail("暂无数据"), new Error("暂无数据");
730
+ throw $.fail("暂无数据"), new Error("暂无数据");
873
731
  return e.table.data;
874
732
  },
875
733
  all: async () => {
876
734
  e.table.loading = !0;
877
- const n = s.option.api.list, { data: t } = await n({
735
+ const a = n.option.api.list, { data: o } = await a({
878
736
  size: 999999,
879
737
  num: 1,
880
- final(o, l, a) {
738
+ final(u, t, l) {
881
739
  e.table.loading = !1;
882
740
  }
883
741
  });
884
- return t.list;
742
+ return o.list;
885
743
  }
886
744
  },
887
- export: (n) => {
888
- e.table.exportFun.start(n);
745
+ export: (a) => {
746
+ e.table.exportFun.start(a);
889
747
  }
890
748
  },
891
749
  update: {
@@ -894,11 +752,11 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
894
752
  show: !1,
895
753
  showContent: !1,
896
754
  loading: !1,
897
- type: i.Insert,
755
+ type: r.Insert,
898
756
  form: {},
899
757
  formDefault: {},
900
758
  formColumn: [],
901
- getDisabled: (n) => n.disabled?.[e.update.type === i.Insert ? "create" : "update"],
759
+ getDisabled: (a) => a.disabled?.[e.update.type === r.Insert ? "create" : "update"],
902
760
  edit: {
903
761
  /**
904
762
  * 编辑原数据
@@ -907,46 +765,46 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
907
765
  /**
908
766
  * 将form填入数据和data比对差异数据返回
909
767
  */
910
- getApiData: (n) => {
911
- if (s.option.form?.editAll)
912
- return n;
913
- let t = {
768
+ getApiData: (a) => {
769
+ if (n.option.form?.editAll)
770
+ return a;
771
+ let o = {
914
772
  _id: e.update.edit.data._id
915
773
  };
916
- return Object.keys(e.update.edit.data).forEach((o) => {
917
- n[o] !== e.update.edit.data[o] && (t[o] = n[o]);
918
- }), t;
774
+ return Object.keys(e.update.edit.data).forEach((u) => {
775
+ a[u] !== e.update.edit.data[u] && (o[u] = a[u]);
776
+ }), o;
919
777
  }
920
778
  },
921
- open: (n, t) => {
779
+ open: (a, o) => {
922
780
  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);
781
+ e.update.type = a;
782
+ const u = a === r.Insert;
783
+ 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
784
  });
927
785
  },
928
786
  submit: () => {
929
787
  FunUtil.throttle(async () => {
930
- await h.value?.validate(async (o, l) => new Promise((a, w) => {
931
- o || (F.fail("请检查表单数据"), w(!1)), a();
788
+ await m.value?.validate(async (u, t) => new Promise((l, h) => {
789
+ u || ($.fail("请检查表单数据"), h(!1)), l();
932
790
  })), 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);
791
+ const a = e.update.type === r.Insert ? n.option.api.create : n.option.api.update;
792
+ let o = JSONUtil.cp(e.update.form);
793
+ delete o.children, await n.option.form?.submitBefore?.(o, e.update), Object.keys(o).forEach((u) => {
794
+ if (typeof o[u] == "string" && o[u].indexOf("T") > -1) {
795
+ const t = new Date(o[u]).getTime();
796
+ !isNaN(t) && t > (/* @__PURE__ */ new Date("1971-01-01")).getTime() && (o[u] = t);
939
797
  }
940
- }), await n({
941
- ...t,
942
- final(o, l, a) {
798
+ }), await a({
799
+ ...o,
800
+ final(u, t, l) {
943
801
  e.update.loading = !1;
944
802
  }
945
- }), e.update.close(), await e.table.getList(), s.option.form?.submitAfter?.(t, e.update);
803
+ }), e.update.close(), await e.table.getList(), n.option.form?.submitAfter?.(o, e.update);
946
804
  });
947
805
  },
948
806
  close: () => {
949
- e.update.show = !1, d.once(() => {
807
+ e.update.show = !1, setTimeout(() => {
950
808
  e.update.showContent = !1;
951
809
  }, 350);
952
810
  }
@@ -959,23 +817,23 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
959
817
  close: () => {
960
818
  e.remove.show = !1;
961
819
  },
962
- open: (n) => {
963
- if (n.length === 0) {
964
- F.fail("请选择要删除的数据");
820
+ open: (a) => {
821
+ if (a.length === 0) {
822
+ $.fail("请选择要删除的数据");
965
823
  return;
966
824
  }
967
- e.remove.items = n, e.remove.show = !0;
825
+ e.remove.items = a, e.remove.show = !0;
968
826
  },
969
827
  submit: () => {
970
828
  FunUtil.throttle(async () => {
971
829
  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) {
830
+ const a = n.option.api.delete;
831
+ await a({
832
+ _id: e.remove.items.map((o) => o._id),
833
+ final(o, u, t) {
976
834
  e.table.loading = !1;
977
835
  }
978
- }), F.success("操作成功"), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
836
+ }), $.success("操作成功"), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
979
837
  });
980
838
  }
981
839
  },
@@ -983,12 +841,12 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
983
841
  e.initCurdConfig(), e.initColumnOptions(), e.initColumnForm();
984
842
  },
985
843
  initCurdConfig: () => {
986
- const t = {
844
+ const o = {
987
845
  tools: {
988
846
  search: !0,
989
847
  reset: !0,
990
848
  expand: !1,
991
- add: (l) => l === void 0,
849
+ add: (t) => t === void 0,
992
850
  update: !0,
993
851
  delete: !0,
994
852
  export: {
@@ -1001,9 +859,9 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1001
859
  emptyText: "暂无数据",
1002
860
  highlightCurrentRow: !0
1003
861
  }
1004
- }, o = s.option;
1005
- Object.keys(t).forEach((l) => {
1006
- o[l] = ObjectUtil.deepMerge(t[l], o[l] || {});
862
+ }, u = n.option;
863
+ Object.keys(o).forEach((t) => {
864
+ u[t] = ObjectUtil.deepMerge(o[t], u[t] || {});
1007
865
  });
1008
866
  },
1009
867
  /**
@@ -1012,27 +870,27 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1012
870
  * @returns
1013
871
  */
1014
872
  initColumnOptions: () => {
1015
- const n = s.option, t = (o) => {
1016
- const a = {
873
+ const a = n.option, o = (u) => {
874
+ const l = {
1017
875
  options: {
1018
876
  switch: {
1019
877
  activeValue: !0,
1020
878
  activeLabel: "开启",
1021
879
  inactiveValue: !1,
1022
880
  inactiveLabel: "关闭",
1023
- tableBeforeChange: async (O, b) => {
1024
- const $ = o.options?.switch;
881
+ tableBeforeChange: async (U, y) => {
882
+ const E = u.options?.switch;
1025
883
  try {
1026
- return await m.value?.open({
884
+ return await c.value?.open({
1027
885
  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) {
886
+ content: `确认要${y[U] === E.activeValue ? E.inactiveLabel : E.activeLabel}吗?`
887
+ }), e.table.loading = !0, await n.option.api.update({
888
+ _id: y._id,
889
+ [U]: y[U] === E.activeValue ? E.inactiveValue : E.activeValue,
890
+ final(z, T, Q) {
1033
891
  e.table.loading = !1;
1034
892
  }
1035
- }), F.success("操作成功"), e.table.getList(), !0;
893
+ }), $.success("操作成功"), e.table.getList(), !0;
1036
894
  } catch {
1037
895
  return !1;
1038
896
  }
@@ -1067,213 +925,213 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1067
925
  table: 0,
1068
926
  form: 0
1069
927
  }
1070
- }, w = o;
1071
- Object.keys(a).forEach((O) => {
1072
- w[O] = ObjectUtil.deepMerge(a[O], w[O] || {});
928
+ }, h = u;
929
+ Object.keys(l).forEach((U) => {
930
+ h[U] = ObjectUtil.deepMerge(l[U], h[U] || {});
1073
931
  });
1074
932
  };
1075
- n.column.forEach(t), n.table?.column?.forEach(t);
933
+ a.column.forEach(o), a.table?.column?.forEach(o);
1076
934
  },
1077
935
  initColumnForm: () => {
1078
- const n = s.option;
936
+ const a = n.option;
1079
937
  e.update.formColumn = [], e.table.column.show = {
1080
938
  list: [],
1081
939
  listSource: []
1082
940
  };
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);
941
+ const o = [], u = n.option.form?.maxSpan || 12, t = n.option.form?.defaultSpan || u / 2;
942
+ let l = [];
943
+ const h = (y) => {
944
+ 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) {
945
+ y.form = y.form || { span: t }, y.form.span = y.form.span ?? t;
946
+ let E = y.form.span, z = l.reduce((Q, ae) => Q + ae.span, E);
947
+ const T = l.length;
948
+ 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
949
  }
1092
950
  };
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);
951
+ a.column.forEach((y) => {
952
+ y.isForm = !0, h(y);
953
+ }), n.option.table?.column?.forEach((y) => {
954
+ y.isForm = !1, h(y);
955
+ }), 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;
956
+ const U = n.option.search?.formDefault;
957
+ U && Object.keys(U).forEach((y) => {
958
+ e.search.formDefault[y] = U[y];
959
+ }), a.column.forEach((y) => {
960
+ y.show?.search || (e.search.formDefault[y.key] = void 0);
1103
961
  }), e.search.form = JSONUtil.cp(e.search.formDefault);
1104
962
  }
1105
963
  });
1106
- return e.init(), re(() => {
964
+ return e.init(), ee(() => {
1107
965
  e.table.getList();
1108
- }), u({
966
+ }), i({
1109
967
  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), {
968
+ }), (a, o) => {
969
+ const u = ne("loading");
970
+ return f(), w("div", ve, [
971
+ S("div", Ce, [
972
+ k(a.$slots, "box-left"),
973
+ S("div", Ve, [
974
+ p.option.search?.show !== !1 ? (f(), w("div", De, [
975
+ v(d(J), {
1118
976
  model: e.search.form,
1119
977
  inline: ""
1120
978
  }, {
1121
- default: y(() => [
1122
- V(n.$slots, "search-start", {
979
+ default: b(() => [
980
+ k(a.$slots, "search-start", {
1123
981
  row: e.search.form
1124
982
  }),
1125
- (p(!0), C(I, null, B(e.search.column.list, (l) => (p(), C(I, {
1126
- key: l.key
983
+ (f(!0), w(x, null, F(e.search.column.list, (t) => (f(), w(x, {
984
+ key: t.key
1127
985
  }, [
1128
- (typeof l.show?.search == "function" ? l.show?.search(e.search.form) : l.show?.search) ? (p(), g(c(K), {
986
+ (typeof t.show?.search == "function" ? t.show?.search(e.search.form) : t.show?.search) ? (f(), g(d(M), {
1129
987
  key: 0,
1130
- label: l.label
988
+ label: t.label
1131
989
  }, {
1132
- default: y(() => [
1133
- V(n.$slots, "search-" + l.key, {
990
+ default: b(() => [
991
+ k(a.$slots, "search-" + t.key, {
1134
992
  row: e.search.form
1135
993
  }, () => [
1136
- l.type === "input" ? (p(), g(c(Z), {
994
+ t.type === "input" ? (f(), g(d(K), {
1137
995
  key: 0,
1138
- modelValue: e.search.form[l.key],
1139
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1140
- placeholder: `请输入${l.label}`,
996
+ modelValue: e.search.form[t.key],
997
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
998
+ placeholder: `请输入${t.label}`,
1141
999
  clearable: "",
1142
- disabled: l.disabled?.search
1143
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : l.type === "switch" ? (p(), g(c(q), {
1000
+ disabled: t.disabled?.search
1001
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (f(), g(d(_), {
1144
1002
  key: 1,
1145
- modelValue: e.search.form[l.key],
1146
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1147
- placeholder: `请选择${l.label}`,
1003
+ modelValue: e.search.form[t.key],
1004
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
1005
+ placeholder: `请选择${t.label}`,
1148
1006
  clearable: "",
1149
- disabled: l.disabled?.search
1007
+ disabled: t.disabled?.search
1150
1008
  }, {
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
1009
+ default: b(() => [
1010
+ (f(), g(d(R), {
1011
+ key: t.options?.switch?.activeValue,
1012
+ label: t.options?.switch?.activeLabel,
1013
+ value: t.options?.switch?.activeValue
1156
1014
  }, 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
1015
+ (f(), g(d(R), {
1016
+ key: t.options?.switch?.inactiveValue,
1017
+ label: t.options?.switch?.inactiveLabel,
1018
+ value: t.options?.switch?.inactiveValue
1161
1019
  }, null, 8, ["label", "value"]))
1162
1020
  ]),
1163
1021
  _: 2
1164
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : l.type === "select" ? (p(), g(c(q), {
1022
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : t.type === "select" ? (f(), g(d(_), {
1165
1023
  key: 2,
1166
- modelValue: e.search.form[l.key],
1167
- "onUpdate:modelValue": (a) => e.search.form[l.key] = a,
1168
- placeholder: `请选择${l.label}`,
1024
+ modelValue: e.search.form[t.key],
1025
+ "onUpdate:modelValue": (l) => e.search.form[t.key] = l,
1026
+ placeholder: `请选择${t.label}`,
1169
1027
  clearable: "",
1170
- disabled: l.disabled?.search
1028
+ disabled: t.disabled?.search
1171
1029
  }, {
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
1030
+ default: b(() => [
1031
+ (f(!0), w(x, null, F(t.options?.select?.data, (l) => (f(), g(d(R), {
1032
+ key: l.value,
1033
+ label: l.label,
1034
+ value: l.value
1177
1035
  }, null, 8, ["label", "value"]))), 128))
1178
1036
  ]),
1179
1037
  _: 2
1180
- }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : x("", !0)
1038
+ }, 1032, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : C("", !0)
1181
1039
  ])
1182
1040
  ]),
1183
1041
  _: 2
1184
- }, 1032, ["label"])) : x("", !0)
1042
+ }, 1032, ["label"])) : C("", !0)
1185
1043
  ], 64))), 128)),
1186
- V(n.$slots, "search-center", {
1044
+ k(a.$slots, "search-center", {
1187
1045
  row: e.search.form
1188
1046
  }),
1189
- E(c(K), null, {
1190
- default: y(() => [
1191
- f.option.tools?.search ? (p(), g(c(j), {
1047
+ v(d(M), null, {
1048
+ default: b(() => [
1049
+ p.option.tools?.search ? (f(), g(d(O), {
1192
1050
  key: 0,
1193
1051
  type: "primary",
1194
1052
  onClick: e.search.submit
1195
1053
  }, {
1196
- default: y(() => [...t[7] || (t[7] = [
1197
- U(" 搜索 ", -1)
1054
+ default: b(() => [...o[7] || (o[7] = [
1055
+ V(" 搜索 ", -1)
1198
1056
  ])]),
1199
1057
  _: 1
1200
- }, 8, ["onClick"])) : x("", !0),
1201
- f.option.tools?.reset ? (p(), g(c(j), {
1058
+ }, 8, ["onClick"])) : C("", !0),
1059
+ p.option.tools?.reset ? (f(), g(d(O), {
1202
1060
  key: 1,
1203
1061
  onClick: e.search.reset
1204
1062
  }, {
1205
- default: y(() => [...t[8] || (t[8] = [
1206
- U("重置", -1)
1063
+ default: b(() => [...o[8] || (o[8] = [
1064
+ V("重置", -1)
1207
1065
  ])]),
1208
1066
  _: 1
1209
- }, 8, ["onClick"])) : x("", !0)
1067
+ }, 8, ["onClick"])) : C("", !0)
1210
1068
  ]),
1211
1069
  _: 1
1212
1070
  }),
1213
- V(n.$slots, "search-end", {
1071
+ k(a.$slots, "search-end", {
1214
1072
  row: e.search.form
1215
1073
  })
1216
1074
  ]),
1217
1075
  _: 3
1218
1076
  }, 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), {
1077
+ ])) : C("", !0),
1078
+ S("div", Ee, [
1079
+ S("div", Ue, [
1080
+ d(s)(p.option.tools?.add) ? (f(), w("div", xe, [
1081
+ v(d(O), {
1224
1082
  type: "primary",
1225
- onClick: t[0] || (t[0] = (l) => e.update.open(c(i).Insert))
1083
+ onClick: o[0] || (o[0] = (t) => e.update.open(d(r).Insert))
1226
1084
  }, {
1227
- default: y(() => [...t[9] || (t[9] = [
1228
- U("新增", -1)
1085
+ default: b(() => [...o[9] || (o[9] = [
1086
+ V("新增", -1)
1229
1087
  ])]),
1230
1088
  _: 1
1231
1089
  })
1232
- ])) : x("", !0),
1233
- f.option.table?.selectable && c(r)(f.option.tools?.delete) ? (p(), C("div", ze, [
1234
- E(c(j), {
1090
+ ])) : C("", !0),
1091
+ p.option.table?.selectable && d(s)(p.option.tools?.delete) ? (f(), w("div", $e, [
1092
+ v(d(O), {
1235
1093
  type: "danger",
1236
- onClick: t[1] || (t[1] = (l) => e.remove.open(e.table.selection.list))
1094
+ onClick: o[1] || (o[1] = (t) => e.remove.open(e.table.selection.list))
1237
1095
  }, {
1238
- default: y(() => [...t[10] || (t[10] = [
1239
- U(" 删除 ", -1)
1096
+ default: b(() => [...o[10] || (o[10] = [
1097
+ V(" 删除 ", -1)
1240
1098
  ])]),
1241
1099
  _: 1
1242
1100
  })
1243
- ])) : x("", !0),
1244
- f.option.tools?.expand ? (p(), C("div", _e, [
1245
- E(c(j), {
1101
+ ])) : C("", !0),
1102
+ p.option.tools?.expand ? (f(), w("div", Oe, [
1103
+ v(d(O), {
1246
1104
  type: "warning",
1247
- onClick: t[2] || (t[2] = (l) => e.table.expand.all())
1105
+ onClick: o[2] || (o[2] = (t) => e.table.expand.all())
1248
1106
  }, {
1249
- default: y(() => [...t[11] || (t[11] = [
1250
- U("展开/收缩", -1)
1107
+ default: b(() => [...o[11] || (o[11] = [
1108
+ V("展开/收缩", -1)
1251
1109
  ])]),
1252
1110
  _: 1
1253
1111
  })
1254
- ])) : x("", !0),
1255
- f.option.tools?.export?.show ? (p(), g(c(ge), {
1112
+ ])) : C("", !0),
1113
+ p.option.tools?.export?.show ? (f(), g(d(ue), {
1256
1114
  key: 3,
1257
1115
  onCommand: e.table.export
1258
1116
  }, {
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)
1117
+ dropdown: b(() => [
1118
+ v(d(fe), null, {
1119
+ default: b(() => [
1120
+ v(d(P), { command: "select" }, {
1121
+ default: b(() => [...o[13] || (o[13] = [
1122
+ V("导出选中", -1)
1265
1123
  ])]),
1266
1124
  _: 1
1267
1125
  }),
1268
- E(c(J), { command: "page" }, {
1269
- default: y(() => [...t[14] || (t[14] = [
1270
- U("导出本页", -1)
1126
+ v(d(P), { command: "page" }, {
1127
+ default: b(() => [...o[14] || (o[14] = [
1128
+ V("导出本页", -1)
1271
1129
  ])]),
1272
1130
  _: 1
1273
1131
  }),
1274
- E(c(J), { command: "all" }, {
1275
- default: y(() => [...t[15] || (t[15] = [
1276
- U("导出全部", -1)
1132
+ v(d(P), { command: "all" }, {
1133
+ default: b(() => [...o[15] || (o[15] = [
1134
+ V("导出全部", -1)
1277
1135
  ])]),
1278
1136
  _: 1
1279
1137
  })
@@ -1281,126 +1139,126 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1281
1139
  _: 1
1282
1140
  })
1283
1141
  ]),
1284
- default: y(() => [
1285
- L("div", Ne, [
1286
- E(c(j), { type: "warning" }, {
1287
- default: y(() => [...t[12] || (t[12] = [
1288
- U("导出", -1)
1142
+ default: b(() => [
1143
+ S("div", Se, [
1144
+ v(d(O), { type: "warning" }, {
1145
+ default: b(() => [...o[12] || (o[12] = [
1146
+ V("导出", -1)
1289
1147
  ])]),
1290
1148
  _: 1
1291
1149
  })
1292
1150
  ])
1293
1151
  ]),
1294
1152
  _: 1
1295
- }, 8, ["onCommand"])) : x("", !0),
1296
- V(n.$slots, "tools-left")
1153
+ }, 8, ["onCommand"])) : C("", !0),
1154
+ k(a.$slots, "tools-left")
1297
1155
  ]),
1298
- L("div", Pe, [
1299
- V(n.$slots, "tools-right")
1156
+ S("div", Fe, [
1157
+ k(a.$slots, "tools-right")
1300
1158
  ])
1301
1159
  ]),
1302
- L("div", Ae, [
1303
- L("div", We, [
1304
- he((p(), g(c(ve), S({
1160
+ S("div", Ie, [
1161
+ S("div", Le, [
1162
+ re((f(), g(d(pe), D({
1305
1163
  data: e.table.data
1306
- }, f.option.table, {
1164
+ }, p.option.table, {
1307
1165
  onSelectionChange: e.table.selection.change,
1308
1166
  "expand-row-keys": e.table.expand.rowKeys,
1309
1167
  onExpandChange: e.table.expand.change
1310
1168
  }), {
1311
- default: y(() => [
1312
- f.option.table?.selectable && c(r)(f.option.tools?.delete) ? (p(), g(c(G), {
1169
+ default: b(() => [
1170
+ p.option.table?.selectable && d(s)(p.option.tools?.delete) ? (f(), g(d(B), {
1313
1171
  key: 0,
1314
1172
  type: "selection",
1315
- selectable: typeof f.option.table?.selectable == "function" ? f.option.table?.selectable : void 0,
1173
+ selectable: typeof p.option.table?.selectable == "function" ? p.option.table?.selectable : void 0,
1316
1174
  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
1175
+ }, null, 8, ["selectable"])) : C("", !0),
1176
+ (f(!0), w(x, null, F(e.table.column.list, (t) => (f(), w(x, {
1177
+ key: t.key
1320
1178
  }, [
1321
- e.table.column.show.list.includes(l.key) ? (p(), g(c(G), S({
1179
+ e.table.column.show.list.includes(t.key) ? (f(), g(d(B), D({
1322
1180
  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
1181
+ prop: t.key,
1182
+ label: t.label
1183
+ }, { ref_for: !0 }, t.table), {
1184
+ default: b(({ row: l }) => [
1185
+ k(a.$slots, "table-" + t.key, {
1186
+ row: l,
1187
+ item: t
1330
1188
  }, () => [
1331
- l.type === "switch" ? (p(), g(c(ee), S({
1189
+ t.type === "switch" ? (f(), g(d(H), D({
1332
1190
  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)
1191
+ modelValue: l[t.key],
1192
+ "onUpdate:modelValue": (h) => l[t.key] = h,
1193
+ "before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, l)
1194
+ }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w(x, { key: 1 }, [
1195
+ V(A(l[t.key]), 1)
1338
1196
  ], 64))
1339
1197
  ])
1340
1198
  ]),
1341
1199
  _: 2
1342
- }, 1040, ["prop", "label"])) : x("", !0)
1200
+ }, 1040, ["prop", "label"])) : C("", !0)
1343
1201
  ], 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), {
1202
+ 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
1203
  key: 1,
1346
1204
  label: "操作",
1347
1205
  width: "180",
1348
1206
  align: "center",
1349
1207
  fixed: "right"
1350
1208
  }, {
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), {
1209
+ default: b(({ row: t }) => [
1210
+ k(a.$slots, "table-op-left", { row: t }),
1211
+ d(s)(p.option.tools?.add, t) ? (f(), g(d(O), {
1354
1212
  key: 0,
1355
1213
  link: "",
1356
1214
  type: "primary",
1357
- onClick: (a) => e.update.open(c(i).Insert, l)
1215
+ onClick: (l) => e.update.open(d(r).Insert, t)
1358
1216
  }, {
1359
- default: y(() => [...t[16] || (t[16] = [
1360
- U(" 新增 ", -1)
1217
+ default: b(() => [...o[16] || (o[16] = [
1218
+ V(" 新增 ", -1)
1361
1219
  ])]),
1362
1220
  _: 1
1363
- }, 8, ["onClick"])) : x("", !0),
1364
- c(r)(f.option.tools?.update, l) ? (p(), g(c(j), {
1221
+ }, 8, ["onClick"])) : C("", !0),
1222
+ d(s)(p.option.tools?.update, t) ? (f(), g(d(O), {
1365
1223
  key: 1,
1366
1224
  link: "",
1367
1225
  type: "warning",
1368
- onClick: (a) => e.update.open(c(i).Update, l)
1226
+ onClick: (l) => e.update.open(d(r).Update, t)
1369
1227
  }, {
1370
- default: y(() => [...t[17] || (t[17] = [
1371
- U(" 编辑 ", -1)
1228
+ default: b(() => [...o[17] || (o[17] = [
1229
+ V(" 编辑 ", -1)
1372
1230
  ])]),
1373
1231
  _: 1
1374
- }, 8, ["onClick"])) : x("", !0),
1375
- c(r)(f.option.tools?.delete, l) ? (p(), g(c(j), {
1232
+ }, 8, ["onClick"])) : C("", !0),
1233
+ d(s)(p.option.tools?.delete, t) ? (f(), g(d(O), {
1376
1234
  key: 2,
1377
1235
  link: "",
1378
1236
  type: "danger",
1379
- onClick: (a) => e.remove.open([l])
1237
+ onClick: (l) => e.remove.open([t])
1380
1238
  }, {
1381
- default: y(() => [...t[18] || (t[18] = [
1382
- U(" 删除 ", -1)
1239
+ default: b(() => [...o[18] || (o[18] = [
1240
+ V(" 删除 ", -1)
1383
1241
  ])]),
1384
1242
  _: 1
1385
- }, 8, ["onClick"])) : x("", !0),
1386
- V(n.$slots, "table-op-right", { row: l })
1243
+ }, 8, ["onClick"])) : C("", !0),
1244
+ k(a.$slots, "table-op-right", { row: t })
1387
1245
  ]),
1388
1246
  _: 3
1389
- })) : x("", !0)
1247
+ })) : C("", !0)
1390
1248
  ]),
1391
1249
  _: 3
1392
1250
  }, 16, ["data", "onSelectionChange", "expand-row-keys", "onExpandChange"])), [
1393
- [o, e.table.loading]
1251
+ [u, e.table.loading]
1394
1252
  ])
1395
1253
  ])
1396
1254
  ]),
1397
- L("div", Ke, [
1398
- e.page.total > e.page.size ? (p(), g(c(ke), {
1255
+ S("div", je, [
1256
+ e.page.total > e.page.size ? (f(), g(d(ce), {
1399
1257
  key: 0,
1400
1258
  "current-page": e.page.num,
1401
- "onUpdate:currentPage": t[3] || (t[3] = (l) => e.page.num = l),
1259
+ "onUpdate:currentPage": o[3] || (o[3] = (t) => e.page.num = t),
1402
1260
  "page-size": e.page.size,
1403
- "onUpdate:pageSize": t[4] || (t[4] = (l) => e.page.size = l),
1261
+ "onUpdate:pageSize": o[4] || (o[4] = (t) => e.page.size = t),
1404
1262
  background: "",
1405
1263
  "page-sizes": e.page.sizeList,
1406
1264
  "pager-count": 7,
@@ -1408,200 +1266,200 @@ const Se = { class: "dialog-footer" }, Ie = /* @__PURE__ */ H({
1408
1266
  total: e.page.total,
1409
1267
  onSizeChange: e.table.getList,
1410
1268
  onCurrentChange: e.table.getList
1411
- }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : x("", !0)
1269
+ }, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
1412
1270
  ])
1413
1271
  ]),
1414
- V(n.$slots, "box-right")
1272
+ k(a.$slots, "box-right")
1415
1273
  ]),
1416
- E(c(te), S({
1274
+ v(d(G), D({
1417
1275
  modelValue: e.update.show,
1418
- "onUpdate:modelValue": t[5] || (t[5] = (l) => e.update.show = l),
1276
+ "onUpdate:modelValue": o[5] || (o[5] = (t) => e.update.show = t),
1419
1277
  title: e.update.title,
1420
1278
  "close-on-click-modal": !1,
1421
1279
  "before-close": e.update.close
1422
- }, f.option.dialog), {
1423
- footer: y(() => [
1424
- L("span", He, [
1425
- E(c(j), {
1280
+ }, p.option.dialog), {
1281
+ footer: b(() => [
1282
+ S("span", Te, [
1283
+ v(d(O), {
1426
1284
  onClick: e.update.close
1427
1285
  }, {
1428
- default: y(() => [...t[19] || (t[19] = [
1429
- U("关闭", -1)
1286
+ default: b(() => [...o[19] || (o[19] = [
1287
+ V("关闭", -1)
1430
1288
  ])]),
1431
1289
  _: 1
1432
1290
  }, 8, ["onClick"]),
1433
- E(c(j), {
1291
+ v(d(O), {
1434
1292
  type: "primary",
1435
1293
  onClick: e.update.submit,
1436
1294
  loading: e.update.loading
1437
1295
  }, {
1438
- default: y(() => [...t[20] || (t[20] = [
1439
- U(" 提交 ", -1)
1296
+ default: b(() => [...o[20] || (o[20] = [
1297
+ V(" 提交 ", -1)
1440
1298
  ])]),
1441
1299
  _: 1
1442
1300
  }, 8, ["onClick", "loading"])
1443
1301
  ])
1444
1302
  ]),
1445
- default: y(() => [
1446
- E(c(Y), {
1303
+ default: b(() => [
1304
+ v(d(J), {
1447
1305
  ref_key: "ruleFormRef",
1448
- ref: h,
1306
+ ref: m,
1449
1307
  model: e.update.form,
1450
1308
  rules: e.update.rules
1451
1309
  }, {
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", {
1310
+ default: b(() => [
1311
+ e.update.showContent ? (f(!0), w(x, { key: 0 }, F(e.update.formColumn, (t) => (f(), w("div", ze, [
1312
+ k(a.$slots, "form-start", {
1455
1313
  row: e.update.form
1456
1314
  }),
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", {
1315
+ (f(!0), w(x, null, F(t, (l) => (f(), w(x, null, [
1316
+ d(s)(l.item.show?.form, e.update.form) ? (f(), w("div", {
1459
1317
  key: 0,
1460
- class: le(a.item.form.span > 0 ? `col-${a.item.form.span}` : "col")
1318
+ class: X(l.item.form.span > 0 ? `col-${l.item.form.span}` : "col")
1461
1319
  }, [
1462
- E(c(K), {
1463
- label: a.item.label,
1464
- prop: a.item.key,
1465
- "label-width": a.item.form?.labelWidth || "100px"
1320
+ v(d(M), {
1321
+ label: l.item.label,
1322
+ prop: l.item.key,
1323
+ "label-width": l.item.form?.labelWidth || "100px"
1466
1324
  }, {
1467
- default: y(() => [
1468
- V(n.$slots, "form-" + a.item.key + "-start", {
1325
+ default: b(() => [
1326
+ k(a.$slots, "form-" + l.item.key + "-start", {
1469
1327
  row: e.update.form,
1470
- item: a.item
1328
+ item: l.item
1471
1329
  }),
1472
- V(n.$slots, "form-" + a.item.key, {
1330
+ k(a.$slots, "form-" + l.item.key, {
1473
1331
  row: e.update.form,
1474
- item: a.item
1332
+ item: l.item
1475
1333
  }, () => [
1476
- a.item.type === "input" ? (p(), g(c(Z), S({
1334
+ l.item.type === "input" ? (f(), g(d(K), D({
1477
1335
  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({
1336
+ modelValue: e.update.form[l.item.key],
1337
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1338
+ }, { ref_for: !0 }, l.item.options?.input, Y(l.item.options?.input?.on), {
1339
+ disabled: e.update.getDisabled(l.item)
1340
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "switch" ? (f(), g(d(H), D({
1483
1341
  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({
1342
+ modelValue: e.update.form[l.item.key],
1343
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1344
+ }, { ref_for: !0 }, l.item.options?.switch, {
1345
+ disabled: e.update.getDisabled(l.item)
1346
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "select" ? (f(), g(d(_), D({
1489
1347
  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),
1348
+ modelValue: e.update.form[l.item.key],
1349
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1350
+ }, { ref_for: !0 }, l.item.options?.select, {
1351
+ disabled: e.update.getDisabled(l.item),
1494
1352
  style: { width: "100%" }
1495
1353
  }), {
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
1354
+ default: b(() => [
1355
+ (f(!0), w(x, null, F(l.item.options?.select?.data, (h) => (f(), g(d(R), {
1356
+ key: h.value,
1357
+ label: h.label,
1358
+ value: h.value
1501
1359
  }, null, 8, ["label", "value"]))), 128))
1502
1360
  ]),
1503
1361
  _: 2
1504
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "list" ? (p(), g(ue, S({
1362
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "list" ? (f(), g(oe, D({
1505
1363
  key: 3,
1506
1364
  row: e.update.form,
1507
- field: a.item.key
1508
- }, { ref_for: !0 }, a.item.options?.list, {
1509
- disabled: e.update.getDisabled(a.item),
1365
+ field: l.item.key
1366
+ }, { ref_for: !0 }, l.item.options?.list, {
1367
+ disabled: e.update.getDisabled(l.item),
1510
1368
  style: { width: "100%" }
1511
- }), null, 16, ["row", "field", "disabled"])) : a.item.type === "tree-select" ? (p(), g(c(ie), S({
1369
+ }), null, 16, ["row", "field", "disabled"])) : l.item.type === "tree-select" ? (f(), g(d(te), D({
1512
1370
  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),
1371
+ modelValue: e.update.form[l.item.key],
1372
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1373
+ }, { ref_for: !0 }, l.item.options?.treeSelect, {
1374
+ disabled: e.update.getDisabled(l.item),
1517
1375
  style: { width: "100%" }
1518
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : a.item.type === "datetime" ? (p(), g(c(de), S({
1376
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : l.item.type === "datetime" ? (f(), g(d(le), D({
1519
1377
  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({
1378
+ modelValue: e.update.form[l.item.key],
1379
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1380
+ }, { ref_for: !0 }, l.item.options?.datetime, {
1381
+ disabled: e.update.getDisabled(l.item)
1382
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d(L).customComponent[l.item.type] ? (f(), g(Z(d(L).customComponent[l.item.type]), D({
1525
1383
  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)
1384
+ modelValue: e.update.form[l.item.key],
1385
+ "onUpdate:modelValue": (h) => e.update.form[l.item.key] = h
1386
+ }, { ref_for: !0 }, l.item.options?.[l.item.type], {
1387
+ disabled: e.update.getDisabled(l.item)
1388
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1531
1389
  ]),
1532
- V(n.$slots, "form-" + a.item.key + "-end", {
1390
+ k(a.$slots, "form-" + l.item.key + "-end", {
1533
1391
  row: e.update.form,
1534
- item: a.item
1392
+ item: l.item
1535
1393
  })
1536
1394
  ]),
1537
1395
  _: 2
1538
1396
  }, 1032, ["label", "prop", "label-width"])
1539
- ], 2)) : x("", !0)
1397
+ ], 2)) : C("", !0)
1540
1398
  ], 64))), 256)),
1541
- V(n.$slots, "form-end", {
1399
+ k(a.$slots, "form-end", {
1542
1400
  row: e.update.form
1543
1401
  })
1544
- ]))), 256)) : x("", !0)
1402
+ ]))), 256)) : C("", !0)
1545
1403
  ]),
1546
1404
  _: 3
1547
1405
  }, 8, ["model", "rules"])
1548
1406
  ]),
1549
1407
  _: 3
1550
1408
  }, 16, ["modelValue", "title", "before-close"]),
1551
- E(c(te), {
1409
+ v(d(G), {
1552
1410
  modelValue: e.remove.show,
1553
- "onUpdate:modelValue": t[6] || (t[6] = (l) => e.remove.show = l),
1411
+ "onUpdate:modelValue": o[6] || (o[6] = (t) => e.remove.show = t),
1554
1412
  title: e.remove.title,
1555
1413
  "close-on-click-modal": !1
1556
1414
  }, {
1557
- footer: y(() => [
1558
- L("span", Je, [
1559
- E(c(j), {
1415
+ footer: b(() => [
1416
+ S("span", Re, [
1417
+ v(d(O), {
1560
1418
  onClick: e.remove.close
1561
1419
  }, {
1562
- default: y(() => [...t[21] || (t[21] = [
1563
- U("关闭", -1)
1420
+ default: b(() => [...o[21] || (o[21] = [
1421
+ V("关闭", -1)
1564
1422
  ])]),
1565
1423
  _: 1
1566
1424
  }, 8, ["onClick"]),
1567
- E(c(j), {
1425
+ v(d(O), {
1568
1426
  type: "danger",
1569
1427
  onClick: e.remove.submit,
1570
1428
  loading: e.remove.loading
1571
1429
  }, {
1572
- default: y(() => [...t[22] || (t[22] = [
1573
- U(" 确认删除 ", -1)
1430
+ default: b(() => [...o[22] || (o[22] = [
1431
+ V(" 确认删除 ", -1)
1574
1432
  ])]),
1575
1433
  _: 1
1576
1434
  }, 8, ["onClick", "loading"])
1577
1435
  ])
1578
1436
  ]),
1579
- default: y(() => [
1580
- L("div", null, "确认要删除【" + Q(e.remove.items.length) + "】条数据吗?", 1)
1437
+ default: b(() => [
1438
+ S("div", null, "确认要删除【" + A(e.remove.items.length) + "】条数据吗?", 1)
1581
1439
  ]),
1582
1440
  _: 1
1583
1441
  }, 8, ["modelValue", "title"]),
1584
- E(Ie, {
1442
+ v(ke, {
1585
1443
  ref_key: "switchConfirmRef",
1586
- ref: m
1444
+ ref: c
1587
1445
  }, null, 512)
1588
1446
  ]);
1589
1447
  };
1590
1448
  }
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]);
1449
+ }), Pe = (p, i) => {
1450
+ if (p.component("TCurd", Me), p.component("TFormList", oe), p.component("TColumn", be), i?.customComponent) {
1451
+ L.customComponent = i.customComponent;
1452
+ for (const r in i.customComponent)
1453
+ p.component(r, i.customComponent[r]);
1596
1454
  }
1597
1455
  };
1598
1456
  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
1457
+ I as ArrUtil,
1458
+ ge as ExcelUtil,
1459
+ be as TColumn,
1460
+ Me as TCurd,
1461
+ L as TForm,
1462
+ oe as TFormList,
1463
+ $ as TSys,
1464
+ Pe as install
1607
1465
  };