@skyfox2000/webui 1.2.4 → 1.2.6

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.
@@ -1,23 +1,23 @@
1
- var ia = Object.defineProperty;
2
- var la = (e, t, a) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
1
+ var oa = Object.defineProperty;
2
+ var la = (e, t, a) => t in e ? oa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
3
  var P = (e, t, a) => la(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { inject as G, ref as f, provide as me, watch as T, toRaw as Qe, h as C, nextTick as ua, shallowRef as Ge, defineComponent as W, reactive as ca, useAttrs as te, onMounted as se, onUnmounted as ne, createElementBlock as O, openBlock as x, createVNode as q, unref as E, mergeProps as re, withCtx as H, createCommentVNode as j, Fragment as B, renderList as Ae, createBlock as Re, normalizeClass as Ve, createTextVNode as Te, toDisplayString as J, createElementVNode as fa } from "vue";
5
- import { AutoComplete as pa, CheckboxGroup as da, Checkbox as ha, RadioGroup as ma, Radio as va, Select as ga, SelectOption as ya } from "ant-design-vue";
6
- import { createPinia as ba, defineStore as Y } from "pinia";
7
- import Sa from "pinia-plugin-persistedstate";
8
- import { combineParams as we, isMicroApp as qe, mainAppApis as Ce, EnvConfig as De, AppAction as Fe, AppSource as Ne, isBaseMicroApp as Ue } from "@skyfox2000/microbase";
9
- import { ResStatus as A, httpPost as _, setToken as X, fieldMapping as Ia, parseFieldTemplate as Ea, API_HOST as ve, SERVER_HOST as xa } from "@skyfox2000/fapi";
4
+ import { inject as G, ref as f, provide as ge, watch as R, toRaw as Qe, h as C, nextTick as ia, shallowRef as Ge, defineComponent as Y, reactive as ua, useAttrs as ne, onMounted as re, onUnmounted as oe, createElementBlock as O, openBlock as E, createVNode as q, unref as x, mergeProps as le, withCtx as H, createCommentVNode as j, Fragment as B, renderList as Te, createBlock as Re, normalizeClass as Ve, createTextVNode as we, toDisplayString as J, createElementVNode as ca } from "vue";
5
+ import { AutoComplete as fa, CheckboxGroup as pa, Checkbox as da, RadioGroup as ha, Radio as ma, Select as va, SelectOption as ga } from "ant-design-vue";
6
+ import { createPinia as ya, defineStore as X } from "pinia";
7
+ import ba from "pinia-plugin-persistedstate";
8
+ import { combineParams as Oe, EnvConfig as De, AppAction as Fe, AppSource as Ne, isMicroApp as Ue, mainAppApis as K, isBaseMicroApp as Sa } from "@skyfox2000/microbase";
9
+ import { ResStatus as A, httpPost as U, setToken as Z, fieldMapping as Ia, parseFieldTemplate as xa, API_HOST as ye, SERVER_HOST as Ea } from "@skyfox2000/fapi";
10
10
  import S from "vue-m-message";
11
- import Oe from "async-validator";
12
- import { createRouter as Aa, createWebHashHistory as Ra } from "vue-router";
11
+ import Pe from "async-validator";
12
+ import { createRouter as Aa, createWebHashHistory as Ta } from "vue-router";
13
13
  import "dayjs";
14
14
  import "vue-draggable-next";
15
- const Ta = ba();
16
- Ta.use(Sa);
15
+ const Ra = ya();
16
+ Ra.use(ba);
17
17
  var $ = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))($ || {});
18
- const R = class R {
18
+ const T = class T {
19
19
  };
20
- P(R, "dict", {}), P(R, "Keys", {
20
+ P(T, "dict", {}), P(T, "Keys", {
21
21
  EnableDisable: "EnableDisable",
22
22
  SuccessResult: "SuccessResult",
23
23
  YesNo: "YesNo",
@@ -27,25 +27,25 @@ P(R, "dict", {}), P(R, "Keys", {
27
27
  * @param key 名称
28
28
  * @returns
29
29
  */
30
- P(R, "getOptions", (t) => R.dict[t]), /**
30
+ P(T, "getOptions", (t) => T.dict[t]), /**
31
31
  * 静态选择项对象
32
32
  * @param key 名称
33
33
  * @param value 值
34
34
  * @returns
35
35
  */
36
- P(R, "getOptionItem", (t, a) => R.dict[t].find((s) => s.value === a)), /**
36
+ P(T, "getOptionItem", (t, a) => T.dict[t].find((s) => s.value === a)), /**
37
37
  * 设置静态选择项
38
38
  * @param key 名称
39
39
  * @param list 列表
40
40
  */
41
- P(R, "setOptions", (t, a) => {
42
- R.dict[t] = a;
41
+ P(T, "setOptions", (t, a) => {
42
+ T.dict[t] = a;
43
43
  }), /**
44
44
  * 启用/停用选项
45
45
  * - 启用 1
46
46
  * - 停用 0
47
47
  */
48
- P(R, "EnableDisable", [
48
+ P(T, "EnableDisable", [
49
49
  {
50
50
  label: "启用",
51
51
  text: "✅ 启用",
@@ -61,7 +61,7 @@ P(R, "EnableDisable", [
61
61
  * - 成功 1
62
62
  * - 失败 0
63
63
  */
64
- P(R, "SuccessResult", [
64
+ P(T, "SuccessResult", [
65
65
  {
66
66
  label: "成功",
67
67
  text: "✅ 成功",
@@ -77,7 +77,7 @@ P(R, "SuccessResult", [
77
77
  * - 是 1
78
78
  * - 否 0
79
79
  */
80
- P(R, "YesNo", [
80
+ P(T, "YesNo", [
81
81
  {
82
82
  label: "是",
83
83
  text: "✅ 是",
@@ -93,7 +93,7 @@ P(R, "YesNo", [
93
93
  * - 男 M
94
94
  * - 女 F
95
95
  */
96
- P(R, "MaleFemale", [
96
+ P(T, "MaleFemale", [
97
97
  {
98
98
  label: "男",
99
99
  text: "男 👨",
@@ -105,12 +105,12 @@ P(R, "MaleFemale", [
105
105
  value: "F"
106
106
  }
107
107
  ]);
108
- let L = R;
108
+ let L = T;
109
109
  L.setOptions("EnableDisable", L.EnableDisable);
110
110
  L.setOptions("SuccessResult", L.SuccessResult);
111
111
  L.setOptions("YesNo", L.YesNo);
112
112
  L.setOptions("MaleFemale", L.MaleFemale);
113
- const oe = {
113
+ const ie = {
114
114
  /**
115
115
  * 自动接口加载数据
116
116
  * - 默认为true
@@ -202,7 +202,7 @@ const oe = {
202
202
  type: [String, Array],
203
203
  required: !1
204
204
  }
205
- }, D = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, ie = (e, t) => {
205
+ }, D = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, ue = (e, t) => {
206
206
  var n;
207
207
  return {
208
208
  url: "",
@@ -211,7 +211,7 @@ const oe = {
211
211
  ...t.url,
212
212
  loadingText: t.loadingText
213
213
  };
214
- }, le = (e, t) => {
214
+ }, ce = (e, t) => {
215
215
  const a = e.page, s = t.url;
216
216
  if (!s || !s.url) {
217
217
  const r = `URL未设置: ${t.urlKey}`;
@@ -219,12 +219,12 @@ const oe = {
219
219
  }
220
220
  s.api || (s.api = a.api), s.authorize === void 0 && (s.authorize = a.authorize);
221
221
  let n = JSON.parse(JSON.stringify(t.params));
222
- return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), _(s, n).then((r) => (t.loadingState && (t.loadingState.value = !1), r)).catch((r) => (t.loadingState && (t.loadingState.value = !1), null));
223
- }, Pe = (e, t) => {
222
+ return t.processParams && (n = t.processParams(n)), t.loadingState && (t.loadingState.value = !0), t.hideErrorToast && (s.hideErrorToast = !0), U(s, n).then((r) => (t.loadingState && (t.loadingState.value = !1), r)).catch((r) => (t.loadingState && (t.loadingState.value = !1), null));
223
+ }, ke = (e, t) => {
224
224
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
225
- const a = ie(e, t);
226
- return t.url = a, le(e, t);
227
- }, At = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = ie(e, t), le(e, t).then((a) => ((a == null ? void 0 : a.status) === A.SUCCESS && (t.hideErrorToast || S.success("执行成功!")), a))), je = (e, t = {}) => {
225
+ const a = ue(e, t);
226
+ return t.url = a, ce(e, t);
227
+ }, At = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = ue(e, t), ce(e, t).then((a) => ((a == null ? void 0 : a.status) === A.SUCCESS && (t.hideErrorToast || S.success("执行成功!")), a))), qe = (e, t = {}) => {
228
228
  const a = t.primaryKey || "Id";
229
229
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
230
230
  return S.error("错误!无保存数据!"), Promise.resolve(null);
@@ -234,8 +234,8 @@ const oe = {
234
234
  loadingText: t.loadingText === !1 ? !1 : t.loadingText || "数据保存中..."
235
235
  };
236
236
  s.params.Query[a] = s.params.Data[a];
237
- const n = ie(e, s);
238
- return s.url = n, le(e, s).then((r) => ((r == null ? void 0 : r.status) === A.SUCCESS && (t.hideErrorToast || S.success("保存成功!")), r));
237
+ const n = ue(e, s);
238
+ return s.url = n, ce(e, s).then((r) => ((r == null ? void 0 : r.status) === A.SUCCESS && (t.hideErrorToast || S.success("保存成功!")), r));
239
239
  }, wa = (e, t, a = {}) => {
240
240
  const s = a.primaryKey || "Id";
241
241
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
@@ -246,18 +246,18 @@ const oe = {
246
246
  };
247
247
  if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], D(n.params.Query) || D(n.params.Query[s]))
248
248
  return S.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
249
- const r = ie(e, n);
250
- return n.url = r, le(e, n).then((o) => ((o == null ? void 0 : o.status) === A.SUCCESS && (a.hideErrorToast || S.success("删除成功!")), o));
251
- }, Oa = (e, t) => Pe(e, {
249
+ const r = ue(e, n);
250
+ return n.url = r, ce(e, n).then((o) => ((o == null ? void 0 : o.status) === A.SUCCESS && (a.hideErrorToast || S.success("删除成功!")), o));
251
+ }, Oa = (e, t) => ke(e, {
252
252
  urlKey: "tree",
253
253
  params: {},
254
254
  loadingState: e.isTreeLoading,
255
255
  loadingText: !1,
256
- processParams: () => we(e.treeQuery, t)
256
+ processParams: () => Oe(e.treeQuery, t)
257
257
  }).then((a) => (a == null ? void 0 : a.status) === A.SUCCESS ? (e.data.value = a.data, e.data.value) : []);
258
258
  let z;
259
- const Rt = (e) => {
260
- z = new Oe({}), z.messages({
259
+ const Tt = (e) => {
260
+ z = new Pe({}), z.messages({
261
261
  required: "${label}不能为空",
262
262
  types: {
263
263
  number: "${label}必须是数字"
@@ -283,68 +283,68 @@ const Rt = (e) => {
283
283
  },
284
284
  ...e
285
285
  });
286
- }, Tt = (e) => {
286
+ }, Rt = (e) => {
287
287
  if (!e || D(e))
288
288
  return [];
289
- const t = [], a = z.messages(), s = (r, o, i) => {
290
- const l = o.type;
291
- if (l && a.types && l in a.types) {
292
- const c = a.types[l];
293
- n(c, r, { type: l }, i);
289
+ const t = [], a = z.messages(), s = (r, o, l) => {
290
+ const i = o.type;
291
+ if (i && a.types && i in a.types) {
292
+ const c = a.types[i];
293
+ n(c, r, { type: i }, l);
294
294
  }
295
295
  const u = ["string", "number", "array"];
296
296
  for (const c of u)
297
- if (l === c && a[c]) {
297
+ if (i === c && a[c]) {
298
298
  const p = a[c], h = ["len", "min", "max", "range"];
299
299
  for (const v of h)
300
- v === "range" && o.min != null && o.max != null && p.range ? n(p.range, r, { min: o.min, max: o.max }, i) : v !== "range" && o[v] != null && p[v] && n(p[v], r, { [v]: o[v] }, i);
300
+ v === "range" && o.min != null && o.max != null && p.range ? n(p.range, r, { min: o.min, max: o.max }, l) : v !== "range" && o[v] != null && p[v] && n(p[v], r, { [v]: o[v] }, l);
301
301
  }
302
- if (o.required && a.required && n(a.required, r, {}, i), o.pattern && a.pattern && n(o.message, r, {}, i), o.enum && Array.isArray(o.enum) && a.enum) {
302
+ if (o.required && a.required && n(a.required, r, {}, l), o.pattern && a.pattern && n(o.message, r, {}, l), o.enum && Array.isArray(o.enum) && a.enum) {
303
303
  const c = o.enum.join(", ");
304
- n(a.enum, r, { enum: c }, i);
304
+ n(a.enum, r, { enum: c }, l);
305
305
  }
306
- }, n = (r, o, i, l) => {
306
+ }, n = (r, o, l, i) => {
307
307
  if (r)
308
308
  try {
309
309
  let u;
310
310
  if (typeof r == "function") {
311
311
  const c = [o];
312
- for (const p in i)
313
- c.push(i[p]);
314
- u = r.apply(null, c), u && l.push(u);
312
+ for (const p in l)
313
+ c.push(l[p]);
314
+ u = r.apply(null, c), u && i.push(u);
315
315
  } else {
316
316
  u = String(r);
317
- for (const c in i)
318
- u = u.replace(new RegExp(`\\$\\{${c}\\}`, "g"), i[c]);
319
- u = u.replace(/\$\{label\}/g, ""), u && l.push(u);
317
+ for (const c in l)
318
+ u = u.replace(new RegExp(`\\$\\{${c}\\}`, "g"), l[c]);
319
+ u = u.replace(/\$\{label\}/g, ""), u && i.push(u);
320
320
  }
321
321
  } catch (u) {
322
322
  console.error("格式化验证消息出错:", u);
323
323
  }
324
324
  };
325
325
  return Object.keys(e).forEach((r) => {
326
- const o = e[r], i = [];
326
+ const o = e[r], l = [];
327
327
  try {
328
- s(r, o, i), Array.isArray(o) && o.forEach((u) => {
329
- u && typeof u == "object" && s(r, u, i);
328
+ s(r, o, l), Array.isArray(o) && o.forEach((u) => {
329
+ u && typeof u == "object" && s(r, u, l);
330
330
  }), o && typeof o == "object" && "fields" in o;
331
331
  } catch (u) {
332
332
  console.error("处理验证规则出错:", u);
333
333
  }
334
- const l = Array.from(new Set(i));
335
- r && l.length > 0 && t.push({
334
+ const i = Array.from(new Set(l));
335
+ r && i.length > 0 && t.push({
336
336
  field: r,
337
- rules: l
337
+ rules: i
338
338
  });
339
339
  }), t;
340
- }, ue = async (e) => {
340
+ }, fe = async (e) => {
341
341
  const t = e.formData.value, a = e.formRules.value;
342
- D(a) || (ke(e), e.ruleValidator || (e.ruleValidator = new Oe({}), e.ruleValidator.messages(z.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
342
+ D(a) || (Le(e), e.ruleValidator || (e.ruleValidator = new Pe({}), e.ruleValidator.messages(z.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
343
343
  }).catch(({ fields: s }) => s));
344
- }, wt = async (e, t, a) => (a || (a = new Oe({}), a.messages(z.messages()), a.define(t)), a.validate(e).then(() => {
345
- }).catch(({ fields: s }) => s)), ke = (e) => {
344
+ }, wt = async (e, t, a) => (a || (a = new Pe({}), a.messages(z.messages()), a.define(t)), a.validate(e).then(() => {
345
+ }).catch(({ fields: s }) => s)), Le = (e) => {
346
346
  e.ruleResults.value = void 0;
347
- }, ce = () => {
347
+ }, pe = () => {
348
348
  const e = G($.EditorControl, void 0), t = f(G($.LabelText, "")), a = f(G($.RuleKey, "")), s = G($.ErrInfo, void 0);
349
349
  return {
350
350
  editorCtrl: e,
@@ -360,7 +360,7 @@ const Rt = (e) => {
360
360
  if (!e.label || !e.rule)
361
361
  return a;
362
362
  const s = t == null ? void 0 : t.ruleResults;
363
- return T(
363
+ return R(
364
364
  () => s == null ? void 0 : s.value,
365
365
  (n) => {
366
366
  if (a.value.errClass = "", a.value.msg = "", !D(n)) {
@@ -381,23 +381,23 @@ const Rt = (e) => {
381
381
  const s = f([]), n = f(""), r = f("");
382
382
  if (!e.rule || !t || !a)
383
383
  return { msg: n, ruleErrors: s, errClass: r };
384
- e.rule.split("|").forEach((l) => {
385
- if (l = l.trim(), l)
386
- if (a[l])
387
- s.value.push(...a[l]);
384
+ e.rule.split("|").forEach((i) => {
385
+ if (i = i.trim(), i)
386
+ if (a[i])
387
+ s.value.push(...a[i]);
388
388
  else {
389
389
  const u = [];
390
390
  for (let c in a)
391
- c !== l && c.startsWith(l + ".") && u.push(...a[c]);
391
+ c !== i && c.startsWith(i + ".") && u.push(...a[c]);
392
392
  u.length > 0 && s.value.push(...u);
393
393
  }
394
394
  });
395
- const i = /\${\w+}/g;
396
- return s.value.forEach((l) => {
397
- n.value && (n.value += " / "), n.value += l.message.replace("${label}", e.label ?? "");
398
- const u = t[l.field];
395
+ const l = /\${\w+}/g;
396
+ return s.value.forEach((i) => {
397
+ n.value && (n.value += " / "), n.value += i.message.replace("${label}", e.label ?? "");
398
+ const u = t[i.field];
399
399
  if (u) {
400
- const c = n.value.match(i);
400
+ const c = n.value.match(l);
401
401
  c && c.forEach((p) => {
402
402
  const h = p.replace("${", "").replace("}", "");
403
403
  n.value = n.value.replace(p, u[h] ?? "");
@@ -405,25 +405,25 @@ const Rt = (e) => {
405
405
  }
406
406
  }), s.value.length > 0 && (r.value = "error"), { msg: n, ruleErrors: s, errClass: r };
407
407
  }, Ot = (e, t) => {
408
- me($.LabelText, e.label || ""), me($.RuleKey, e.rule || "");
408
+ ge($.LabelText, e.label || ""), ge($.RuleKey, e.rule || "");
409
409
  const a = Pa(e, t);
410
- return me($.ErrInfo, a), a;
410
+ return ge($.ErrInfo, a), a;
411
411
  }, Pt = (e) => {
412
- Be(e);
412
+ je(e);
413
413
  }, kt = (e) => {
414
414
  const t = e.page, a = e.formData.value;
415
- a[e.primaryKey ?? t.primaryKey] = null, Be(e);
415
+ a[e.primaryKey ?? t.primaryKey] = null, je(e);
416
416
  }, Lt = (e) => {
417
417
  e.visible.value = !1;
418
- }, Be = async (e) => {
418
+ }, je = async (e) => {
419
419
  var s;
420
420
  const t = e.page;
421
- if (e.isFormSaving.value = !0, ke(e), e.beforeSave && e.beforeSave() === !1)
421
+ if (e.isFormSaving.value = !0, Le(e), e.beforeSave && e.beforeSave() === !1)
422
422
  return e.isFormSaving.value = !1, Promise.resolve();
423
- if (e.formRules.value && await ue(e), e.ruleResults.value)
423
+ if (e.formRules.value && await fe(e), e.ruleResults.value)
424
424
  return S.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
425
425
  const a = e.formData.value;
426
- return je(
426
+ return qe(
427
427
  {
428
428
  page: t,
429
429
  // 转换为AnyControl接口
@@ -445,22 +445,22 @@ const Rt = (e) => {
445
445
  if ((n == null ? void 0 : n.status) === A.SUCCESS)
446
446
  S.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(), e.autoClose !== !1 && (e.visible.value = !1);
447
447
  else if (n != null && n.msg && ((r = n == null ? void 0 : n.msg) == null ? void 0 : r.indexOf("Duplicate entry")) > -1) {
448
- const i = (o = n == null ? void 0 : n.msg) == null ? void 0 : o.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
449
- if (i && i.length > 2 && i[1] && i[2]) {
450
- const l = i[1], u = i[2].replace(/Idx_/g, "").split("_"), c = e.formRules.value;
448
+ const l = (o = n == null ? void 0 : n.msg) == null ? void 0 : o.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
449
+ if (l && l.length > 2 && l[1] && l[2]) {
450
+ const i = l[1], u = l[2].replace(/Idx_/g, "").split("_"), c = e.formRules.value;
451
451
  if (c && u.length > 0) {
452
452
  const p = {};
453
453
  u.forEach((h) => {
454
454
  c[h] && (p[h] = [
455
455
  {
456
456
  field: h,
457
- fieldValue: l,
457
+ fieldValue: i,
458
458
  message: "数据重复"
459
459
  }
460
460
  ]);
461
461
  }), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
462
462
  }
463
- S.error(`保存失败!数据 \`${l}\` 已存在!`);
463
+ S.error(`保存失败!数据 \`${i}\` 已存在!`);
464
464
  } else S.error((n == null ? void 0 : n.msg) ?? "保存失败!");
465
465
  } else
466
466
  S.error((n == null ? void 0 : n.msg) ?? "保存失败!");
@@ -469,29 +469,29 @@ const Rt = (e) => {
469
469
  const t = e.page, a = e.grid;
470
470
  e.isFormLoading.value = !0;
471
471
  const s = e.formData.value, n = e.primaryKey ?? t.primaryKey;
472
- return ea(a, { [n]: s[n] }, e.detailUrl).then((r) => {
473
- e.isFormLoading.value = !1, r && Je(e, r);
472
+ return Ze(a, { [n]: s[n] }, e.detailUrl).then((r) => {
473
+ e.isFormLoading.value = !1, r && Be(e, r);
474
474
  });
475
475
  }, $t = (e) => {
476
476
  const t = e.grid;
477
- t && (t.rowData.value = void 0), e && (ze(e), e.visible && (e.visible.value = !1), setTimeout(() => {
477
+ t && (t.rowData.value = void 0), e && (Je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
478
478
  e.visible.value = !0;
479
479
  }, 1));
480
- }, Je = (e, t) => {
481
- ze(e), e.formData.value = { ...e.formData.value, ...t };
482
- }, ze = (e) => {
483
- e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, ke(e);
484
- }, Ie = "/login/", ee = [], La = (e) => {
480
+ }, Be = (e, t) => {
481
+ Je(e), e.formData.value = { ...e.formData.value, ...t };
482
+ }, Je = (e) => {
483
+ e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Le(e);
484
+ }, te = "/login/", ae = [], La = (e) => {
485
485
  for (const t of e) {
486
- const a = ee.findIndex((s) => s.path === t.path);
487
- a !== -1 && ee.splice(a, 1), ee.push(t), N.addRoute(t);
486
+ const a = ae.findIndex((s) => s.path === t.path);
487
+ a !== -1 && ae.splice(a, 1), ae.push(t), W.addRoute(t);
488
488
  }
489
- }, We = (e, t, a, s = "") => {
489
+ }, ze = (e, t, a, s = "") => {
490
490
  const n = s + (s ? "/" : "") + e.path;
491
- t[n] = { ...e, parent: a }, e.children && e.children.forEach((r) => We(r, t, e, n));
492
- }, N = Aa({
493
- history: Ra("/"),
494
- routes: ee
491
+ t[n] = { ...e, parent: a }, e.children && e.children.forEach((r) => ze(r, t, e, n));
492
+ }, W = Aa({
493
+ history: Ta("/"),
494
+ routes: ae
495
495
  }), Ma = (e, t) => {
496
496
  var n, r;
497
497
  const a = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (r = e.meta) == null ? void 0 : r.permission;
@@ -504,21 +504,21 @@ const Rt = (e) => {
504
504
  if (De.VITE_PERMISSION_MODE === "permit") {
505
505
  if (a.length === 0 && !s)
506
506
  return !0;
507
- let i = !1, l = !1;
508
- return a.length > 0 && (i = o.hasRole(a)), s && (l = o.hasPermit(e.path, ":page")), i || l;
507
+ let l = !1, i = !1;
508
+ return a.length > 0 && (l = o.hasRole(a)), s && (i = o.hasPermit(e.path, ":page")), l || i;
509
509
  }
510
510
  }
511
511
  return !1;
512
512
  }, V = f(null);
513
- N.beforeEach((e, t, a) => {
514
- var i;
513
+ W.beforeEach((e, t, a) => {
514
+ var l;
515
515
  const s = e;
516
- if (e.path.startsWith("/error/") || e.path.startsWith(Ie))
516
+ if (e.path.startsWith("/error/") || e.path.startsWith(te))
517
517
  return a();
518
- const n = s.meta, o = ((n == null ? void 0 : n.roles) ?? []).length > 0 || ((i = n == null ? void 0 : n.permission) == null ? void 0 : i.length);
518
+ const n = s.meta, o = ((n == null ? void 0 : n.roles) ?? []).length > 0 || ((l = n == null ? void 0 : n.permission) == null ? void 0 : l.length);
519
519
  if (e.path === "/") {
520
- const l = F();
521
- if (!l.menuLoaded) {
520
+ const i = F();
521
+ if (!i.menuLoaded) {
522
522
  V.value = {
523
523
  to: e,
524
524
  next: (u) => {
@@ -527,15 +527,15 @@ N.beforeEach((e, t, a) => {
527
527
  };
528
528
  return;
529
529
  }
530
- l.toDefaultApp();
530
+ i.toDefaultApp();
531
531
  return;
532
532
  }
533
533
  if (!o)
534
534
  a();
535
535
  else {
536
- const l = Q();
537
- if (!l.isLogin)
538
- a({ path: Ie });
536
+ const i = Q();
537
+ if (!i.isLogin)
538
+ a({ path: te });
539
539
  else {
540
540
  if (!F().menuLoaded) {
541
541
  V.value = {
@@ -544,30 +544,24 @@ N.beforeEach((e, t, a) => {
544
544
  };
545
545
  return;
546
546
  }
547
- const c = Ma(s, l.isLogin);
547
+ const c = Ma(s, i.isLogin);
548
548
  a();
549
549
  }
550
550
  }
551
551
  });
552
- N.afterEach((e) => {
553
- if (qe() && Ce.value) {
554
- const { mainAppPush: t } = Ce.value;
555
- t && t(e.hash);
556
- }
557
- });
558
552
  const $a = (e) => {
559
553
  if (V.value) {
560
554
  const { to: t, next: a } = V.value;
561
555
  V.value = null, t.path === "/" ? a(e) : a(t.path);
562
556
  }
563
557
  }, Ca = (e) => {
564
- const t = Le();
558
+ const t = Me();
565
559
  if (t.TabEnabled) {
566
560
  if (Da(e.key, t.TabPanes))
567
561
  return;
568
562
  t.TabPanes.push(e);
569
563
  }
570
- }, Da = (e, t) => t.find((a) => a.key === e), Le = Y("pageInfo", {
564
+ }, Da = (e, t) => t.find((a) => a.key === e), Me = X("pageInfo", {
571
565
  state: () => ({
572
566
  TabActive: "",
573
567
  TabPanes: [],
@@ -622,29 +616,27 @@ const $a = (e) => {
622
616
  url: "/api/RCTenanetOpSrv/getApps",
623
617
  loadingText: !1
624
618
  }
625
- }, ge = /* @__PURE__ */ new Map(), Ee = (e, t) => e.map((a) => {
626
- var o, i, l, u, c, p, h, v;
619
+ }, be = /* @__PURE__ */ new Map(), Ee = (e, t) => e.map((a) => {
620
+ var o, l, i, u, c, p, h, v;
627
621
  const s = { ...a };
628
- if (!((i = (o = s.meta) == null ? void 0 : o.roles) != null && i.length) && !((u = (l = s.meta) == null ? void 0 : l.permission) != null && u.length))
622
+ if (!((l = (o = s.meta) == null ? void 0 : o.roles) != null && l.length) && !((u = (i = s.meta) == null ? void 0 : i.permission) != null && u.length))
629
623
  return s.children && (s.children = Ee(s.children, t)), s;
630
624
  const n = (p = (c = s.meta) == null ? void 0 : c.roles) != null && p.length ? t.hasRole(s.meta.roles) : !1, r = (v = (h = s.meta) == null ? void 0 : h.permission) != null && v.length ? t.hasPermit(s.meta.permission, ":page") : !1;
631
625
  return n || r ? (s.children && (s.children = Ee(s.children, t)), s) : null;
632
- }).filter(Boolean), Ye = (e, t = "") => {
626
+ }).filter(Boolean), We = (e, t = "") => {
633
627
  for (const a of e) {
634
628
  if (!a.children && !a.redirect) {
635
629
  let s = t + a.path;
636
630
  return s.startsWith("/") || (s = "/" + s), s;
637
631
  }
638
632
  if (a.children && a.children.length > 0 && a.path !== "/error" && a.path !== "/login" && a.path !== "/:page(.*)") {
639
- const s = Ye(a.children, t + a.path + "/");
633
+ const s = We(a.children, t + a.path + "/");
640
634
  if (s)
641
635
  return s;
642
636
  }
643
637
  }
644
- }, F = Y("appInfo", {
638
+ }, F = X("appInfo", {
645
639
  state: () => ({
646
- microRouter: null,
647
- microActions: {},
648
640
  appInfo: {
649
641
  Id: "",
650
642
  Name: "",
@@ -666,9 +658,6 @@ const $a = (e) => {
666
658
  menuLoaded: !1
667
659
  }),
668
660
  actions: {
669
- init(e, t) {
670
- this.microRouter = e, this.microActions = t;
671
- },
672
661
  /**
673
662
  * 加载授权应用列表
674
663
  */
@@ -680,7 +669,7 @@ const $a = (e) => {
680
669
  });
681
670
  },
682
671
  async getRemoteAppList() {
683
- return _(Na.appList, {
672
+ return U(Na.appList, {
684
673
  Query: {
685
674
  AppCode: this.appInfo.AppCode,
686
675
  Enabled: 1
@@ -719,7 +708,7 @@ const $a = (e) => {
719
708
  flattenRoutes: {},
720
709
  Routes: t ?? [],
721
710
  defaultPage: ""
722
- }), (!qe() || !Ue()) && (await (await Q()).getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
711
+ }), (!Ue() || !Sa()) && (await (await Q()).getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
723
712
  },
724
713
  /**
725
714
  * 设置当前应用路由信息
@@ -734,7 +723,7 @@ const $a = (e) => {
734
723
  };
735
724
  const t = this.appInfo.flattenRoutes;
736
725
  for (const s of e)
737
- We(s, t, void 0);
726
+ ze(s, t, void 0);
738
727
  Object.keys(t).forEach((s) => {
739
728
  const n = t[s];
740
729
  n.children || !n.component || (n.meta && n.meta.keepAlive === !1 ? this.ExcludeComponents.push(s) : this.CachedComponents.push(s));
@@ -742,7 +731,7 @@ const $a = (e) => {
742
731
  const a = Q();
743
732
  if (a.isLogin) {
744
733
  const s = Ee(this.appInfo.Routes, a);
745
- La(s), this.appInfo.defaultPage = Ye(s) || "", this.appInfo.defaultPage && (this.menuLoaded = !0, $a(this.appInfo.defaultPage));
734
+ La(s), this.appInfo.defaultPage = We(s) || "", this.appInfo.defaultPage && (this.menuLoaded = !0, $a(this.appInfo.defaultPage));
746
735
  }
747
736
  },
748
737
  /**
@@ -759,8 +748,11 @@ const $a = (e) => {
759
748
  * @param path 路由地址
760
749
  */
761
750
  push(e) {
762
- this.findRoute(e) && Le().setTabActive(e), ua(() => {
763
- Ue() ? (e = this.formatRoute(e), this.microRouter ? this.microRouter.push({ path: e }) : N.push({ path: e })) : N.push({ path: e });
751
+ this.findRoute(e) && Me().setTabActive(e), ia(() => {
752
+ if (W.push({ path: e }), K.value && K.value.mainAppPush) {
753
+ const a = this.formatRoute(e);
754
+ K.value.mainAppPush(a);
755
+ }
764
756
  });
765
757
  },
766
758
  /**
@@ -778,7 +770,7 @@ const $a = (e) => {
778
770
  * @returns 组件实例
779
771
  */
780
772
  cacheComponent(e, t) {
781
- let a = ge.get(t.path);
773
+ let a = be.get(t.path);
782
774
  if (!a)
783
775
  if (this.CachedComponents.includes(t.path))
784
776
  a = {
@@ -787,7 +779,7 @@ const $a = (e) => {
787
779
  render() {
788
780
  return C(e);
789
781
  }
790
- }, ge.set(t.path, a);
782
+ }, be.set(t.path, a);
791
783
  else return e;
792
784
  return a;
793
785
  },
@@ -796,7 +788,7 @@ const $a = (e) => {
796
788
  * @param path 路由地址
797
789
  */
798
790
  excludeComponent(e) {
799
- this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), ge.delete(e);
791
+ this.ExcludeComponents.includes(e) || this.ExcludeComponents.push(e), this.CachedComponents.splice(this.CachedComponents.indexOf(e), 1), be.delete(e);
800
792
  },
801
793
  /**
802
794
  * 路由路径层级查询,返回面包屑
@@ -809,7 +801,7 @@ const $a = (e) => {
809
801
  }
810
802
  return t.reverse();
811
803
  },
812
- clear() {
804
+ clean() {
813
805
  this.appInfo = {
814
806
  Id: "",
815
807
  Name: "",
@@ -827,7 +819,7 @@ const $a = (e) => {
827
819
  }, this.CachedComponents.splice(0, this.CachedComponents.length), this.ExcludeComponents.splice(0, this.ExcludeComponents.length), this.appList.splice(0, this.appList.length), this.menuLoaded = !1;
828
820
  },
829
821
  logout() {
830
- this.microRouter ? this.microActions && typeof this.microActions.login == "function" && this.microActions.login() : N.push({ path: Ie + "#/" });
822
+ this.clean(), W.push({ path: te + "#/" }), Ue() && K.value && K.value.mainAppPush && K.value.mainAppPush(te + "#/");
831
823
  }
832
824
  },
833
825
  persist: {
@@ -835,7 +827,7 @@ const $a = (e) => {
835
827
  storage: localStorage,
836
828
  pick: ["appList"]
837
829
  }
838
- }), Ua = "userInfoStore", Xe = "Token解析失败", _e = "登录过期,请重新登录", Me = {
830
+ }), Ua = "userInfoStore", Ye = "Token解析失败", _e = "登录过期,请重新登录", $e = {
839
831
  login: {
840
832
  api: "PLATFORM_API",
841
833
  url: "/openapi/LoginSrv/login",
@@ -858,28 +850,28 @@ const $a = (e) => {
858
850
  Option: {},
859
851
  Query: e
860
852
  };
861
- return _(Me.login, t).then((a) => (a == null ? void 0 : a.status) === A.SUCCESS ? a : null);
853
+ return U($e.login, t).then((a) => (a == null ? void 0 : a.status) === A.SUCCESS ? a : null);
862
854
  }, Ka = (e) => {
863
855
  let t = {
864
856
  Query: {
865
857
  AppId: e
866
858
  }
867
859
  };
868
- return _(Me.auth, t).then((a) => (a == null ? void 0 : a.status) === A.SUCCESS ? a.data : (S.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
860
+ return U($e.auth, t).then((a) => (a == null ? void 0 : a.status) === A.SUCCESS ? a.data : (S.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null));
869
861
  }, Ha = () => {
870
862
  let e = {
871
863
  Option: {},
872
864
  Query: {}
873
865
  };
874
- return _(Me.logout, e).then((t) => (t == null ? void 0 : t.status) === A.SUCCESS ? t.data : null);
866
+ return U($e.logout, e).then((t) => (t == null ? void 0 : t.status) === A.SUCCESS ? t.data : null);
875
867
  }, Qa = (e) => {
876
868
  try {
877
869
  const a = JSON.parse(atob(e.split(".")[1])).exp;
878
870
  return Date.now() / 1e3 > a;
879
871
  } catch (t) {
880
- return console.error(Xe, t), !0;
872
+ return console.error(Ye, t), !0;
881
873
  }
882
- }, ye = (e, t) => e == "" ? (S.error(_e, {
874
+ }, Se = (e, t) => e == "" ? (S.error(_e, {
883
875
  duration: 3e3,
884
876
  onClose: t
885
877
  }), !1) : Qa(e) ? (S.error(_e, {
@@ -890,9 +882,9 @@ const $a = (e) => {
890
882
  const t = JSON.parse(atob(e.token.split(".")[1]));
891
883
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
892
884
  } catch (t) {
893
- return console.error(Xe, t), !1;
885
+ return console.error(Ye, t), !1;
894
886
  }
895
- }, k = f(null), Q = Y("userInfo", {
887
+ }, k = f(null), Q = X("userInfo", {
896
888
  state: () => ({
897
889
  isLogin: !1,
898
890
  userInfo: {
@@ -910,7 +902,7 @@ const $a = (e) => {
910
902
  * 启动时初始化用户信息
911
903
  */
912
904
  init() {
913
- this.token && this.isLogin ? (ye(this.token, () => this.clean()), X(this.token)) : this.clean();
905
+ this.token && this.isLogin ? (Se(this.token, () => this.clean()), Z(this.token)) : this.clean();
914
906
  },
915
907
  /**
916
908
  * 登录操作
@@ -925,7 +917,7 @@ const $a = (e) => {
925
917
  return s;
926
918
  {
927
919
  const n = a.data;
928
- if (this.token = n.token, X(this.token), this.isLogin = !0, Ga(n))
920
+ if (this.token = n.token, Z(this.token), this.isLogin = !0, Ga(n))
929
921
  this.userInfo = {
930
922
  ...this.userInfo,
931
923
  ...n.UserInfo
@@ -985,21 +977,21 @@ const $a = (e) => {
985
977
  return this.userInfo;
986
978
  },
987
979
  setUserInfo(e, t) {
988
- if (!ye(t)) {
980
+ if (!Se(t)) {
989
981
  this.clean();
990
982
  return;
991
983
  }
992
984
  this.userInfo = {
993
985
  ...this.userInfo,
994
986
  ...e
995
- }, this.token = t, X(this.token), this.isLogin = !0;
987
+ }, this.token = t, Z(this.token), this.isLogin = !0;
996
988
  },
997
989
  /**
998
990
  * 获取用户Token
999
991
  * @returns 用户Token
1000
992
  */
1001
993
  getToken() {
1002
- return ye(this.token, () => {
994
+ return Se(this.token, () => {
1003
995
  this.clean(), this.logout();
1004
996
  }) ? this.token : "";
1005
997
  },
@@ -1013,7 +1005,7 @@ const $a = (e) => {
1013
1005
  Code: "",
1014
1006
  TenantId: "",
1015
1007
  UserLevel: ""
1016
- }, this.token = "", X(this.token), this.isLogin = !1, k.value = null, (await F()).clear(), Promise.resolve();
1008
+ }, this.token = "", Z(this.token), this.isLogin = !1, k.value = null, (await F()).clean(), Promise.resolve();
1017
1009
  },
1018
1010
  /**
1019
1011
  * 登出操作
@@ -1042,7 +1034,7 @@ const $a = (e) => {
1042
1034
  }), Ct = (e, t) => {
1043
1035
  const a = Q();
1044
1036
  return e.filter((s) => {
1045
- if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(N.currentRoute.value.path, s.permit))
1037
+ if (s.role && !a.hasRole(s.role) || s.permit && !a.hasPermit(W.currentRoute.value.path, s.permit))
1046
1038
  return !1;
1047
1039
  if (!t) {
1048
1040
  if (s.visible === !1)
@@ -1060,17 +1052,17 @@ const $a = (e) => {
1060
1052
  return n ? { ...s, ...n } : !1;
1061
1053
  });
1062
1054
  return [...a || [], ...e.filter((s) => !(a != null && a.includes(s)))];
1063
- }, Va = (e) => (e.remotePage = !1, Ze(e).then((t) => t.rows)), Ze = (e) => {
1055
+ }, Va = (e) => (e.remotePage = !1, Xe(e).then((t) => t.rows)), Xe = (e) => {
1064
1056
  e.gridQuery || (e.gridQuery = {});
1065
1057
  const t = e.remotePage ? "find" : "list";
1066
- return Pe(e, {
1058
+ return ke(e, {
1067
1059
  urlKey: t,
1068
1060
  url: e.gridUrl,
1069
1061
  params: e.gridQuery,
1070
1062
  loadingState: e.isGridLoading,
1071
1063
  processParams: (a) => {
1072
1064
  var n;
1073
- return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), we((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1065
+ return e.remotePage && (a.Query.$limit = [(e.pageNo.value - 1) * e.pageSize.value, e.pageSize.value]), Oe((n = e.gridUrl) == null ? void 0 : n.params, a, e.gridQuery);
1074
1066
  }
1075
1067
  }).then((a) => {
1076
1068
  if ((a == null ? void 0 : a.status) === A.SUCCESS) {
@@ -1085,7 +1077,7 @@ const $a = (e) => {
1085
1077
  rows: []
1086
1078
  };
1087
1079
  });
1088
- }, qa = (e, t, a = {}) => je(e, {
1080
+ }, qa = (e, t, a = {}) => qe(e, {
1089
1081
  urlKey: "update",
1090
1082
  url: e.updateUrl,
1091
1083
  params: {
@@ -1102,17 +1094,17 @@ const $a = (e) => {
1102
1094
  loadingText: !1,
1103
1095
  hideErrorToast: !0
1104
1096
  });
1105
- }, ea = async (e, t, a) => await Pe(e, {
1097
+ }, Ze = async (e, t, a) => await ke(e, {
1106
1098
  urlKey: "detail",
1107
1099
  url: a,
1108
1100
  params: t,
1109
1101
  loadingState: e.isGridLoading
1110
1102
  }), Nt = (e, t) => {
1111
1103
  const a = t;
1112
- return ea(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === A.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1104
+ return Ze(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === A.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1113
1105
  }, Ut = (e, t) => {
1114
1106
  let a = e.editor;
1115
- e.rowData.value = t, a && (Je(a, t), a.visible.value = !0);
1107
+ e.rowData.value = t, a && (Be(a, t), a.visible.value = !0);
1116
1108
  }, _t = (e, t) => wa(e, t, {
1117
1109
  url: e.deleteUrl,
1118
1110
  primaryKey: e.primaryKey
@@ -1205,12 +1197,12 @@ const $a = (e) => {
1205
1197
  updateUrl: e.urls.update,
1206
1198
  deleteUrl: e.urls.delete
1207
1199
  };
1208
- return T(
1200
+ return R(
1209
1201
  () => s.reload.value,
1210
1202
  (n) => {
1211
1203
  n && (setTimeout(() => {
1212
1204
  s.reload.value = !1;
1213
- }, 1), s.remotePage ? Ze(s) : Va(s));
1205
+ }, 1), s.remotePage ? Xe(s) : Va(s));
1214
1206
  }
1215
1207
  ), {
1216
1208
  gridCtrl: s
@@ -1225,7 +1217,7 @@ const $a = (e) => {
1225
1217
  data: Ge(void 0),
1226
1218
  isTreeLoading: f(!1)
1227
1219
  };
1228
- return T(
1220
+ return R(
1229
1221
  () => a.reload.value,
1230
1222
  (s) => {
1231
1223
  s && (setTimeout(() => {
@@ -1248,14 +1240,14 @@ const $a = (e) => {
1248
1240
  gridCtrl: r
1249
1241
  };
1250
1242
  };
1251
- var aa = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(aa || {});
1243
+ var ea = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(ea || {});
1252
1244
  class Ja {
1253
1245
  constructor() {
1254
1246
  P(this, "listeners", {});
1255
1247
  }
1256
1248
  // 检查事件名是否符合前缀
1257
1249
  isValidPrefix(t) {
1258
- return Object.values(aa).some((a) => t.startsWith(a + "."));
1250
+ return Object.values(ea).some((a) => t.startsWith(a + "."));
1259
1251
  }
1260
1252
  /**
1261
1253
  * 事件订阅
@@ -1295,26 +1287,26 @@ class Ja {
1295
1287
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1296
1288
  }
1297
1289
  }
1298
- const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1299
- if (s && t.reloadEvent && (s.reloadHandler = (o, i) => {
1300
- za(n, t, i, a);
1301
- }, ae.on(t.reloadEvent, s.reloadHandler)), t.data)
1302
- T(
1290
+ const se = new Ja(), de = (e, t, a, s, n, r) => {
1291
+ if (s && t.reloadEvent && (s.reloadHandler = (o, l) => {
1292
+ za(n, t, l, a);
1293
+ }, se.on(t.reloadEvent, s.reloadHandler)), t.data)
1294
+ R(
1303
1295
  () => t.data,
1304
1296
  () => {
1305
- $e(t, t.data, a, !0);
1297
+ Ce(t, t.data, a, !0);
1306
1298
  },
1307
1299
  { deep: !0, immediate: !0 }
1308
1300
  );
1309
1301
  else if (n && n.url)
1310
- e !== !1 && ta(n, t, r ?? {}, a);
1302
+ e !== !1 && aa(n, t, r ?? {}, a);
1311
1303
  else {
1312
1304
  const o = f(G($.LabelText, ""));
1313
1305
  S.error("`" + o.value + "` 未配置选项数据!", {
1314
1306
  duration: 5e3
1315
1307
  });
1316
1308
  }
1317
- }, $e = (e, t, a, s) => {
1309
+ }, Ce = (e, t, a, s) => {
1318
1310
  if (!t || t.length === 0) {
1319
1311
  a.value = [];
1320
1312
  return;
@@ -1330,13 +1322,13 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1330
1322
  value: void 0
1331
1323
  }), a.value = t;
1332
1324
  }, za = (e, t, a, s) => {
1333
- Array.isArray(a) ? $e(t, a, s, !0) : ta(e, t, { Query: a }, s);
1334
- }, pe = (e, t) => {
1335
- t && e.reloadEvent && t.reloadHandler && ae.off(e.reloadEvent, t.reloadHandler);
1336
- }, ta = (e, t, a, s) => {
1337
- const n = we(e.params, a, t.params);
1325
+ Array.isArray(a) ? Ce(t, a, s, !0) : aa(e, t, { Query: a }, s);
1326
+ }, he = (e, t) => {
1327
+ t && e.reloadEvent && t.reloadHandler && se.off(e.reloadEvent, t.reloadHandler);
1328
+ }, aa = (e, t, a, s) => {
1329
+ const n = Oe(e.params, a, t.params);
1338
1330
  Wa(e, t.fieldMap, n).then((r) => {
1339
- $e(t, r, s, !1);
1331
+ Ce(t, r, s, !1);
1340
1332
  });
1341
1333
  }, Wa = (e, t, a) => {
1342
1334
  const { fieldMap: s, ...n } = e, o = {
@@ -1350,11 +1342,11 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1350
1342
  },
1351
1343
  ...n
1352
1344
  };
1353
- return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), _(o, a).then((i) => (i == null ? void 0 : i.status) === A.SUCCESS && i.data ? i.data : []);
1345
+ return o.loadingText = !1, a || (a = {}), a.Query || (a.Query = {}), U(o, a).then((l) => (l == null ? void 0 : l.status) === A.SUCCESS && l.data ? l.data : []);
1354
1346
  }, Ya = (e, t) => {
1355
1347
  if (e !== void 0)
1356
1348
  return Array.isArray(e) ? t.filter((a) => e.includes(a.value)) : t.find((a) => a.value === e);
1357
- }, be = (e, t, a) => {
1349
+ }, Ie = (e, t, a) => {
1358
1350
  const s = t.split(".");
1359
1351
  let n = e;
1360
1352
  for (let r = 0; r < s.length - 1; r++) {
@@ -1362,35 +1354,35 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1362
1354
  n[o] || (n[o] = {}), n = n[o];
1363
1355
  }
1364
1356
  n[s[s.length - 1]] = a;
1365
- }, sa = (e, t, a) => {
1357
+ }, ta = (e, t, a) => {
1366
1358
  if (a == null) {
1367
1359
  Object.entries(t).forEach(([s]) => {
1368
- be(e, s, a);
1360
+ Ie(e, s, a);
1369
1361
  });
1370
1362
  return;
1371
1363
  }
1372
1364
  Array.isArray(a) || Object.entries(t).forEach(([s, n]) => {
1373
1365
  if (n.includes("${")) {
1374
- const r = Ea(n, a);
1375
- be(e, s, r);
1366
+ const r = xa(n, a);
1367
+ Ie(e, s, r);
1376
1368
  } else
1377
- be(e, s, a[n]);
1369
+ Ie(e, s, a[n]);
1378
1370
  });
1379
- }, de = (e, t, a, s) => {
1371
+ }, me = (e, t, a, s) => {
1380
1372
  var r;
1381
- s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && ue(s.editorCtrl);
1373
+ s.editorCtrl && ((r = s.errInfo) != null && r.value.errClass) && fe(s.editorCtrl);
1382
1374
  const n = Ya(t, a.value);
1383
- return e.formData && e.outFields && sa(e.formData, e.outFields, n), e.changeEvent && (Array.isArray(e.changeEvent) ? e.changeEvent.every((o) => {
1384
- ae.emit(o, t, n);
1385
- }) : ae.emit(e.changeEvent, t, n)), s.inputEmit && s.inputEmit("change", t, n), n;
1386
- }, he = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, Se = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), U = f({}), Gt = U, Vt = (e) => {
1375
+ return e.formData && e.outFields && ta(e.formData, e.outFields, n), e.changeEvent && (Array.isArray(e.changeEvent) ? e.changeEvent.every((o) => {
1376
+ se.emit(o, t, n);
1377
+ }) : se.emit(e.changeEvent, t, n)), s.inputEmit && s.inputEmit("change", t, n), n;
1378
+ }, ve = (e) => e === void 0 ? [] : Array.isArray(e) ? e.map((t) => t.label) : [e.label], Xa = 7 * 24 * 60 * 60 * 1e3, xe = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Set(), N = f({}), Gt = N, Vt = (e) => {
1387
1379
  var n;
1388
- if (!e.iconUrl) return xe;
1380
+ if (!e.iconUrl) return Ae;
1389
1381
  const t = f(!0), a = f("");
1390
1382
  let s = !0;
1391
- return (n = e.icons) != null && n.length && (s = e.icons.every((r) => U.value[r] !== void 0)), (e.icon && !U.value[e.icon] || !s) && Za(e, t).then(() => {
1383
+ return (n = e.icons) != null && n.length && (s = e.icons.every((r) => N.value[r] !== void 0)), (e.icon && !N.value[e.icon] || !s) && Za(e, t).then(() => {
1392
1384
  tt(e.iconUrl, e.monoColor || !1), t.value = !0;
1393
- }), W({
1385
+ }), Y({
1394
1386
  props: {
1395
1387
  icon: {
1396
1388
  type: String
@@ -1417,43 +1409,43 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1417
1409
  },
1418
1410
  emits: ["update:iconIndex"],
1419
1411
  setup(r, { emit: o }) {
1420
- const i = f(r.icon), l = f(0), u = () => {
1421
- r.icons && l.value++;
1412
+ const l = f(r.icon), i = f(0), u = () => {
1413
+ r.icons && i.value++;
1422
1414
  };
1423
- return T(
1415
+ return R(
1424
1416
  () => r.iconIndex,
1425
1417
  (c) => {
1426
- c !== void 0 && (l.value = c);
1418
+ c !== void 0 && (i.value = c);
1427
1419
  },
1428
1420
  { immediate: !0 }
1429
- ), T(
1430
- () => l.value,
1421
+ ), R(
1422
+ () => i.value,
1431
1423
  (c) => {
1432
- r.icons && (c >= r.icons.length && (l.value = 0), i.value = r.icons[l.value], Z(a, i, i.value), o("update:iconIndex", l.value));
1424
+ r.icons && (c >= r.icons.length && (i.value = 0), l.value = r.icons[i.value], ee(a, l, l.value), o("update:iconIndex", i.value));
1433
1425
  },
1434
1426
  { immediate: !0 }
1435
- ), T(
1436
- () => U.value,
1427
+ ), R(
1428
+ () => N.value,
1437
1429
  () => {
1438
- Z(a, i, i.value);
1430
+ ee(a, l, l.value);
1439
1431
  },
1440
1432
  { deep: !0 }
1441
- ), T(
1433
+ ), R(
1442
1434
  () => r.icon,
1443
1435
  (c) => {
1444
- Z(a, i, c);
1436
+ ee(a, l, c);
1445
1437
  }
1446
- ), Z(a, i, i.value), { isLoaded: t, Icon: a, handleClick: u };
1438
+ ), ee(a, l, l.value), { isLoaded: t, Icon: a, handleClick: u };
1447
1439
  },
1448
1440
  render() {
1449
1441
  if (!t.value)
1450
- return xe;
1442
+ return Ae;
1451
1443
  let r = this.class, o = "";
1452
1444
  Array.isArray(r) ? o = r.join(" ") : typeof r == "string" && (o = r);
1453
- let i = [o];
1454
- return !/\bw-/.test(o) && !/$w-/.test(o) && i.push("w-4"), !/\bh-/.test(o) && !/$h-/.test(o) && i.push("h-4"), a.value ? C(Qe(a.value), {
1445
+ let l = [o];
1446
+ return !/\bw-/.test(o) && !/$w-/.test(o) && l.push("w-4"), !/\bh-/.test(o) && !/$h-/.test(o) && l.push("h-4"), a.value ? C(Qe(a.value), {
1455
1447
  onClick: this.$props.clickable ? this.handleClick : void 0,
1456
- class: `${i.join(" ")}`,
1448
+ class: `${l.join(" ")}`,
1457
1449
  style: {
1458
1450
  fill: "currentColor",
1459
1451
  cursor: this.$props.clickable ? "pointer" : "default",
@@ -1466,16 +1458,16 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1466
1458
  let a = e.iconUrl;
1467
1459
  if (!a)
1468
1460
  return console.error("图标库地址不能为空"), Promise.resolve();
1469
- if (Se.has(a))
1461
+ if (xe.has(a))
1470
1462
  return Promise.resolve();
1471
- const s = ra(a);
1463
+ const s = na(a);
1472
1464
  if (s)
1473
- return new Promise(async (r) => (na(s.scriptContent), r()));
1465
+ return new Promise(async (r) => (sa(s.scriptContent), r()));
1474
1466
  t.value = !1;
1475
1467
  const n = new Promise(async (r) => {
1476
- await et(a, e.monoColor || !1), r(), Se.delete(a);
1468
+ await et(a, e.monoColor || !1), r(), xe.delete(a);
1477
1469
  });
1478
- return Se.set(a, n), n;
1470
+ return xe.set(a, n), n;
1479
1471
  }, et = async (e, t) => {
1480
1472
  try {
1481
1473
  const a = await fetch(e);
@@ -1491,12 +1483,12 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1491
1483
  let o = r[1];
1492
1484
  at(e, o, t, s);
1493
1485
  }
1494
- na(s);
1486
+ sa(s);
1495
1487
  return;
1496
1488
  } catch (a) {
1497
1489
  return console.error("网络异常,无法加载图标库:", a), null;
1498
1490
  }
1499
- }, na = (e) => {
1491
+ }, sa = (e) => {
1500
1492
  const t = document.createElement("script");
1501
1493
  t.textContent = e, document.head.appendChild(t);
1502
1494
  }, at = (e, t, a, s) => {
@@ -1509,7 +1501,7 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1509
1501
  // 缓存时间:7天
1510
1502
  };
1511
1503
  localStorage.setItem(n, JSON.stringify(r));
1512
- }, ra = (e) => {
1504
+ }, na = (e) => {
1513
1505
  let t = `icon_cache:${e}`;
1514
1506
  const a = localStorage.getItem(t);
1515
1507
  if (!a) return null;
@@ -1527,11 +1519,11 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1527
1519
  const a = localStorage.getItem(t);
1528
1520
  a && JSON.parse(a).expireTime < e && localStorage.removeItem(t);
1529
1521
  }
1530
- }, Z = (e, t, a) => {
1522
+ }, ee = (e, t, a) => {
1531
1523
  setTimeout(() => {
1532
- t.value = a, t.value && (e.value = U.value[t.value]);
1524
+ t.value = a, t.value && (e.value = N.value[t.value]);
1533
1525
  }, 1);
1534
- }, xe = C(
1526
+ }, Ae = C(
1535
1527
  "svg",
1536
1528
  { class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
1537
1529
  [
@@ -1552,32 +1544,32 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1552
1544
  })
1553
1545
  ]
1554
1546
  ), tt = (e, t) => {
1555
- const a = ra(e);
1547
+ const a = na(e);
1556
1548
  Object.keys(window).forEach((s) => {
1557
1549
  s.startsWith("_iconfont_svg_string_") && (a == null ? void 0 : a.windowKey) === s && !Ke.has(s) && (Ke.add(s), st(s, t));
1558
1550
  });
1559
1551
  }, st = (e, t) => {
1560
1552
  const a = window[e], r = new DOMParser().parseFromString(a, "image/svg+xml").getElementsByTagName("symbol"), o = document.querySelectorAll("symbol");
1561
- for (const i of r) {
1562
- const l = i.id, u = Array.from(o).find((c) => c.id === l);
1563
- u && t && (u.innerHTML = i.innerHTML, u.querySelectorAll("*").forEach((c) => {
1553
+ for (const l of r) {
1554
+ const i = l.id, u = Array.from(o).find((c) => c.id === i);
1555
+ u && t && (u.innerHTML = l.innerHTML, u.querySelectorAll("*").forEach((c) => {
1564
1556
  c.hasAttribute("fill") && c.removeAttribute("fill");
1565
- })), U.value[l] || (U.value[l] = C("svg", { fill: "currentColor" }, [C("use", { "xlink:href": `#${l}` })]));
1557
+ })), N.value[i] || (N.value[i] = C("svg", { fill: "currentColor" }, [C("use", { "xlink:href": `#${i}` })]));
1566
1558
  }
1567
1559
  }, nt = (e, t) => {
1568
1560
  let a = "";
1569
1561
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1570
1562
  }, jt = (e, t, a, s) => {
1571
- oa(e, [], a, s).forEach((r) => t.push(r));
1572
- }, oa = (e, t, a, s) => {
1573
- var o, i, l, u, c;
1563
+ ra(e, [], a, s).forEach((r) => t.push(r));
1564
+ }, ra = (e, t, a, s) => {
1565
+ var o, l, i, u, c;
1574
1566
  const n = [], r = Q();
1575
1567
  for (const p of e) {
1576
- if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (i = (o = p.meta) == null ? void 0 : o.roles) != null && i.length && !r.hasRole(p.meta.roles) && (l = p.meta) != null && l.permission && !r.hasPermit(p.meta.permission, ":page"))
1568
+ if (p.redirect || p.path.includes("/login") || p.path.includes("/error") || p.path.includes("/:page(.*)") || (l = (o = p.meta) == null ? void 0 : o.roles) != null && l.length && !r.hasRole(p.meta.roles) && (i = p.meta) != null && i.permission && !r.hasPermit(p.meta.permission, ":page"))
1577
1569
  continue;
1578
1570
  const h = p.path.split("/");
1579
1571
  h.unshift(...t);
1580
- const v = oa(p.children || [], h, a, s), w = {
1572
+ const v = ra(p.children || [], h, a, s), w = {
1581
1573
  key: h.join("/"),
1582
1574
  label: ((u = p.name) == null ? void 0 : u.toString()) ?? "",
1583
1575
  title: ((c = p.name) == null ? void 0 : c.toString()) ?? "",
@@ -1587,16 +1579,16 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1587
1579
  (v.length > 0 || !p.children) && n.push(w);
1588
1580
  }
1589
1581
  return n;
1590
- }, He = ca([]), Bt = () => {
1582
+ }, He = ua([]), Bt = () => {
1591
1583
  He.length = 0;
1592
1584
  const e = F();
1593
- let a = Le().TabActive;
1585
+ let a = Me().TabActive;
1594
1586
  e.matchedRoutes(a).forEach((n, r) => {
1595
- var i;
1587
+ var l;
1596
1588
  const o = {
1597
1589
  index: r,
1598
1590
  path: n.path,
1599
- breadcrumbName: ((i = n.name) == null ? void 0 : i.toString()) ?? ""
1591
+ breadcrumbName: ((l = n.name) == null ? void 0 : l.toString()) ?? ""
1600
1592
  };
1601
1593
  He.push(o);
1602
1594
  });
@@ -1612,7 +1604,7 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1612
1604
  // 不显示错误
1613
1605
  hideErrorToast: !0
1614
1606
  }
1615
- }, Jt = Y("hostInfo", {
1607
+ }, Jt = X("hostInfo", {
1616
1608
  state: () => ({
1617
1609
  hostInfo: {
1618
1610
  Host: "",
@@ -1636,9 +1628,9 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1636
1628
  return;
1637
1629
  }
1638
1630
  return new Promise((s) => {
1639
- ve.SITEHOST_API || (ve.SITEHOST_API = e);
1631
+ ye.SITEHOST_API || (ye.SITEHOST_API = e);
1640
1632
  const n = t || window.location.origin;
1641
- _(rt.host, {
1633
+ U(rt.host, {
1642
1634
  Query: {
1643
1635
  Host: n
1644
1636
  }
@@ -1659,9 +1651,9 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1659
1651
  ...this.hostInfo,
1660
1652
  ...e
1661
1653
  }, this.hostInfo.API_HOST)
1662
- for (const t in this.hostInfo.API_HOST) ve[t] = this.hostInfo.API_HOST[t];
1654
+ for (const t in this.hostInfo.API_HOST) ye[t] = this.hostInfo.API_HOST[t];
1663
1655
  if (this.hostInfo.SERVER_HOST)
1664
- for (const t in this.hostInfo.SERVER_HOST) xa[t] = this.hostInfo.SERVER_HOST[t];
1656
+ for (const t in this.hostInfo.SERVER_HOST) Ea[t] = this.hostInfo.SERVER_HOST[t];
1665
1657
  },
1666
1658
  getHostInfo() {
1667
1659
  return this.hostInfo;
@@ -1674,7 +1666,7 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1674
1666
  // storage: localStorage,
1675
1667
  // pick: ['hostInfo'],
1676
1668
  // },
1677
- }), ot = "settingInfoStore", zt = Y("settingInfo", {
1669
+ }), ot = "settingInfoStore", zt = X("settingInfo", {
1678
1670
  state: () => ({
1679
1671
  fullscreen: !1,
1680
1672
  menuCollapse: !1,
@@ -1720,11 +1712,11 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1720
1712
  storage: localStorage,
1721
1713
  pick: ["fullscreen", "menuCollapse", "tableColumns"]
1722
1714
  }
1723
- }), Wt = /* @__PURE__ */ W({
1715
+ }), Wt = /* @__PURE__ */ Y({
1724
1716
  inheritAttrs: !1,
1725
1717
  __name: "index",
1726
1718
  props: {
1727
- ...oe,
1719
+ ...ie,
1728
1720
  autoload: {
1729
1721
  type: Boolean,
1730
1722
  default: !1
@@ -1759,26 +1751,26 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1759
1751
  emits: ["update:value", "select", "change", "update:labels"],
1760
1752
  setup(e, { emit: t }) {
1761
1753
  var w, m, b;
1762
- const a = e, s = te(), n = f({
1754
+ const a = e, s = ne(), n = f({
1763
1755
  ...a.url,
1764
1756
  url: ((w = a.url) == null ? void 0 : w.url) || "",
1765
1757
  fieldMap: a.fieldMap || ((m = a.url) == null ? void 0 : m.fieldMap),
1766
1758
  params: a.params || ((b = a.url) == null ? void 0 : b.params),
1767
1759
  loadingText: !1
1768
1760
  }), r = f(void 0);
1769
- T(
1761
+ R(
1770
1762
  () => a.value,
1771
1763
  () => {
1772
1764
  r.value = a.value;
1773
1765
  },
1774
1766
  { immediate: !0 }
1775
- ), T(
1767
+ ), R(
1776
1768
  () => r.value,
1777
1769
  (g) => {
1778
- a.autoClean && a.formData && a.outFields && g !== a.value && sa(a.formData, a.outFields, null);
1770
+ a.autoClean && a.formData && a.outFields && g !== a.value && ta(a.formData, a.outFields, null);
1779
1771
  }
1780
1772
  );
1781
- const o = ce(), { editorCtrl: i, errInfo: l, labelText: u } = o, c = t;
1773
+ const o = pe(), { editorCtrl: l, errInfo: i, labelText: u } = o, c = t;
1782
1774
  o.inputEmit = c;
1783
1775
  const p = f([]), h = (g) => {
1784
1776
  var M;
@@ -1791,45 +1783,45 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1791
1783
  };
1792
1784
  a.searchField && (I.Query[a.searchField] = {
1793
1785
  $like: "%" + d + "%"
1794
- }), a.onsearch && a.onsearch(d, I), fe(!0, a, p, o, n.value, I);
1786
+ }), a.onsearch && a.onsearch(d, I), de(!0, a, p, o, n.value, I);
1795
1787
  }, v = (g) => {
1796
- const d = de(a, g, p, o);
1788
+ const d = me(a, g, p, o);
1797
1789
  c("update:value", g), c("select", g);
1798
- const I = he(d);
1799
- c("update:labels", I), l != null && l.value.errClass && i && ue(i);
1790
+ const I = ve(d);
1791
+ c("update:labels", I), i != null && i.value.errClass && l && fe(l);
1800
1792
  };
1801
- return se(() => {
1793
+ return re(() => {
1802
1794
  n.value && !n.value.fieldMap && (n.value.fieldMap = {
1803
1795
  title: "Name",
1804
1796
  label: "Name",
1805
1797
  value: "Name",
1806
1798
  key: "Id"
1807
1799
  });
1808
- }), ne(() => {
1809
- pe(a, o);
1800
+ }), oe(() => {
1801
+ he(a, o);
1810
1802
  }), (g, d) => {
1811
1803
  var I;
1812
- return x(), O("div", null, [
1813
- q(E(pa), re({
1804
+ return E(), O("div", null, [
1805
+ q(x(fa), le({
1814
1806
  value: r.value,
1815
1807
  "onUpdate:value": d[0] || (d[0] = (M) => r.value = M),
1816
- class: [(I = E(l)) == null ? void 0 : I.errClass, "error w-full"],
1808
+ class: [(I = x(i)) == null ? void 0 : I.errClass, "error w-full"],
1817
1809
  options: p.value,
1818
1810
  onSearch: h,
1819
1811
  onSelect: v,
1820
- placeholder: a.url && !a.url.loading ? "请输入并选择" + E(u) : ""
1821
- }, E(s)), null, 16, ["value", "class", "options", "placeholder"])
1812
+ placeholder: a.url && !a.url.loading ? "请输入并选择" + x(u) : ""
1813
+ }, x(s)), null, 16, ["value", "class", "options", "placeholder"])
1822
1814
  ]);
1823
1815
  };
1824
1816
  }
1825
- }), it = { class: "min-h-[32px] pt-[5px]" }, lt = {
1817
+ }), lt = { class: "min-h-[32px] pt-[5px]" }, it = {
1826
1818
  key: 1,
1827
1819
  class: "text-center text-gray-500"
1828
- }, Yt = /* @__PURE__ */ W({
1820
+ }, Yt = /* @__PURE__ */ Y({
1829
1821
  inheritAttrs: !1,
1830
1822
  __name: "index",
1831
1823
  props: {
1832
- ...oe,
1824
+ ...ie,
1833
1825
  nodata: {
1834
1826
  type: String,
1835
1827
  default: ""
@@ -1847,52 +1839,52 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1847
1839
  emits: ["change", "update:labels"],
1848
1840
  setup(e, { emit: t }) {
1849
1841
  var c, p, h;
1850
- const a = e, s = te(), n = f({
1842
+ const a = e, s = ne(), n = f({
1851
1843
  ...a.url,
1852
1844
  url: ((c = a.url) == null ? void 0 : c.url) || "",
1853
1845
  fieldMap: a.fieldMap || ((p = a.url) == null ? void 0 : p.fieldMap),
1854
1846
  params: a.params || ((h = a.url) == null ? void 0 : h.params),
1855
1847
  loadingText: !1
1856
- }), r = ce(), { errInfo: o } = r, i = t;
1857
- r.inputEmit = i;
1858
- const l = f([]), u = (v) => {
1859
- const m = de(a, v, l, r), b = he(m);
1860
- i("update:labels", b);
1848
+ }), r = pe(), { errInfo: o } = r, l = t;
1849
+ r.inputEmit = l;
1850
+ const i = f([]), u = (v) => {
1851
+ const m = me(a, v, i, r), b = ve(m);
1852
+ l("update:labels", b);
1861
1853
  };
1862
- return se(() => {
1854
+ return re(() => {
1863
1855
  n.value && !n.value.fieldMap && (n.value.fieldMap = {
1864
1856
  title: "Name",
1865
1857
  label: "Name",
1866
1858
  value: "Id",
1867
1859
  key: "Id"
1868
- }), fe(a.autoload, a, l, r, n.value, n.value.params);
1869
- }), ne(() => {
1870
- pe(a, r);
1871
- }), (v, w) => (x(), O("div", it, [
1872
- q(E(da), re({
1860
+ }), de(a.autoload, a, i, r, n.value, n.value.params);
1861
+ }), oe(() => {
1862
+ he(a, r);
1863
+ }), (v, w) => (E(), O("div", lt, [
1864
+ q(x(pa), le({
1873
1865
  onChange: u,
1874
1866
  class: "w-full mb-[-3px]"
1875
- }, E(s)), {
1867
+ }, x(s)), {
1876
1868
  default: H(() => [
1877
- l.value.length > 0 ? (x(!0), O(B, { key: 0 }, Ae(l.value, (m) => {
1869
+ i.value.length > 0 ? (E(!0), O(B, { key: 0 }, Te(i.value, (m) => {
1878
1870
  var b;
1879
- return x(), Re(E(ha), {
1871
+ return E(), Re(x(da), {
1880
1872
  key: m.value,
1881
1873
  value: m.value,
1882
1874
  disabled: m.disabled || m.value && e.disabledItems && e.disabledItems.indexOf(m.value.toString()) > -1,
1883
1875
  class: Ve([
1884
- ((b = E(o)) == null ? void 0 : b.errClass) === "error" ? "error !text-red-400" : "",
1876
+ ((b = x(o)) == null ? void 0 : b.errClass) === "error" ? "error !text-red-400" : "",
1885
1877
  "text-nowrap",
1886
1878
  "pb-1",
1887
1879
  e.wrap ? `w-1/${a.wrap}` : ""
1888
1880
  ])
1889
1881
  }, {
1890
1882
  default: H(() => [
1891
- Te(J(m.label), 1)
1883
+ we(J(m.label), 1)
1892
1884
  ]),
1893
1885
  _: 2
1894
1886
  }, 1032, ["value", "disabled", "class"]);
1895
- }), 128)) : e.nodata ? (x(), O("div", lt, J(e.nodata), 1)) : j("", !0)
1887
+ }), 128)) : e.nodata ? (E(), O("div", it, J(e.nodata), 1)) : j("", !0)
1896
1888
  ]),
1897
1889
  _: 1
1898
1890
  }, 16)
@@ -1901,11 +1893,11 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1901
1893
  }), ut = { class: "min-h-[32px] pt-1" }, ct = {
1902
1894
  key: 1,
1903
1895
  class: "text-center text-gray-500"
1904
- }, Xt = /* @__PURE__ */ W({
1896
+ }, Xt = /* @__PURE__ */ Y({
1905
1897
  inheritAttrs: !1,
1906
1898
  __name: "index",
1907
1899
  props: {
1908
- ...oe,
1900
+ ...ie,
1909
1901
  value: {
1910
1902
  type: [String, Number, null, Array],
1911
1903
  default: void 0
@@ -1924,14 +1916,14 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1924
1916
  emits: ["change", "update:value", "update:labels"],
1925
1917
  setup(e, { emit: t }) {
1926
1918
  var h, v, w;
1927
- const a = e, s = te(), n = f({
1919
+ const a = e, s = ne(), n = f({
1928
1920
  ...a.url,
1929
1921
  url: ((h = a.url) == null ? void 0 : h.url) || "",
1930
1922
  fieldMap: a.fieldMap || ((v = a.url) == null ? void 0 : v.fieldMap),
1931
1923
  params: a.params || ((w = a.url) == null ? void 0 : w.params),
1932
1924
  loadingText: !1
1933
- }), r = f(a.value), o = ce(), { errInfo: i } = o, l = f([]), u = t;
1934
- o.inputEmit = u, T(
1925
+ }), r = f(a.value), o = pe(), { errInfo: l } = o, i = f([]), u = t;
1926
+ o.inputEmit = u, R(
1935
1927
  () => r.value,
1936
1928
  (m) => {
1937
1929
  u("update:value", m);
@@ -1944,50 +1936,50 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1944
1936
  }
1945
1937
  return m === b;
1946
1938
  }, p = (m) => {
1947
- const b = m.target.value, g = de(a, b, l, o), d = he(g);
1939
+ const b = m.target.value, g = me(a, b, i, o), d = ve(g);
1948
1940
  u("update:labels", d);
1949
1941
  };
1950
- return se(() => {
1942
+ return re(() => {
1951
1943
  var m;
1952
1944
  n.value && !n.value.fieldMap && (n.value.fieldMap = {
1953
1945
  label: "Name",
1954
1946
  value: "Id",
1955
1947
  key: "Id"
1956
- }), fe(a.autoload, a, l, o, n.value, (m = n.value) == null ? void 0 : m.params);
1957
- }), ne(() => {
1958
- pe(a, o);
1959
- }), (m, b) => (x(), O("div", ut, [
1960
- q(E(ma), re({
1948
+ }), de(a.autoload, a, i, o, n.value, (m = n.value) == null ? void 0 : m.params);
1949
+ }), oe(() => {
1950
+ he(a, o);
1951
+ }), (m, b) => (E(), O("div", ut, [
1952
+ q(x(ha), le({
1961
1953
  value: r.value,
1962
1954
  "onUpdate:value": b[0] || (b[0] = (g) => r.value = g),
1963
1955
  autocheck: !1,
1964
1956
  onChange: p,
1965
1957
  class: "w-full flex align-items flex-wrap mb-[-3px]"
1966
- }, E(s)), {
1958
+ }, x(s)), {
1967
1959
  default: H(() => [
1968
- l.value.length > 0 ? (x(!0), O(B, { key: 0 }, Ae(l.value, (g) => {
1960
+ i.value.length > 0 ? (E(!0), O(B, { key: 0 }, Te(i.value, (g) => {
1969
1961
  var d;
1970
- return x(), O(B, {
1962
+ return E(), O(B, {
1971
1963
  key: g.value
1972
1964
  }, [
1973
- g.visible !== !1 ? (x(), Re(E(va), {
1965
+ g.visible !== !1 ? (E(), Re(x(ma), {
1974
1966
  key: 0,
1975
1967
  checked: c(g.value, a.value),
1976
1968
  value: g.value,
1977
1969
  class: Ve([
1978
- ((d = E(i)) == null ? void 0 : d.errClass) === "error" ? "error !text-red-400" : "",
1970
+ ((d = x(l)) == null ? void 0 : d.errClass) === "error" ? "error !text-red-400" : "",
1979
1971
  "text-nowrap",
1980
1972
  "pb-1",
1981
1973
  e.wrap ? `w-1/${a.wrap}` : ""
1982
1974
  ])
1983
1975
  }, {
1984
1976
  default: H(() => [
1985
- Te(J(g.label), 1)
1977
+ we(J(g.label), 1)
1986
1978
  ]),
1987
1979
  _: 2
1988
1980
  }, 1032, ["checked", "value", "class"])) : j("", !0)
1989
1981
  ], 64);
1990
- }), 128)) : e.nodata ? (x(), O("div", ct, J(e.nodata), 1)) : j("", !0)
1982
+ }), 128)) : e.nodata ? (E(), O("div", ct, J(e.nodata), 1)) : j("", !0)
1991
1983
  ]),
1992
1984
  _: 1
1993
1985
  }, 16, ["value"])
@@ -1996,11 +1988,11 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
1996
1988
  }), ft = {
1997
1989
  key: 0,
1998
1990
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
1999
- }, Zt = /* @__PURE__ */ W({
1991
+ }, Zt = /* @__PURE__ */ Y({
2000
1992
  inheritAttrs: !1,
2001
1993
  __name: "index",
2002
1994
  props: {
2003
- ...oe,
1995
+ ...ie,
2004
1996
  value: {
2005
1997
  type: [String, Number, Array, null],
2006
1998
  default: void 0
@@ -2039,31 +2031,31 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
2039
2031
  emits: ["change", "update:value", "update:labels"],
2040
2032
  setup(e, { emit: t }) {
2041
2033
  var m, b, g;
2042
- const a = e, s = te(), n = f({
2034
+ const a = e, s = ne(), n = f({
2043
2035
  ...a.url,
2044
2036
  url: ((m = a.url) == null ? void 0 : m.url) || "",
2045
2037
  fieldMap: a.fieldMap || ((b = a.url) == null ? void 0 : b.fieldMap),
2046
2038
  params: a.params || ((g = a.url) == null ? void 0 : g.params),
2047
2039
  loadingText: !1
2048
- }), r = ce(), { editorCtrl: o, errInfo: i, labelText: l } = r, u = f(void 0), c = t;
2040
+ }), r = pe(), { editorCtrl: o, errInfo: l, labelText: i } = r, u = f(void 0), c = t;
2049
2041
  r.inputEmit = c;
2050
2042
  const p = f([]);
2051
- T(
2043
+ R(
2052
2044
  () => p.value,
2053
2045
  (d) => {
2054
2046
  d.length > 0 && D(a.value) && a.selectFirst ? (u.value = d[0].value, w(d[0].value)) : u.value = a.value === null ? void 0 : a.value;
2055
2047
  }
2056
2048
  );
2057
2049
  const h = f(s.placeholder);
2058
- T(
2050
+ R(
2059
2051
  () => n.value.loading,
2060
2052
  (d) => {
2061
- d ? h.value = "" : h.value || (h.value = "请选择" + l.value);
2053
+ d ? h.value = "" : h.value || (h.value = "请选择" + i.value);
2062
2054
  },
2063
2055
  { immediate: !0 }
2064
2056
  );
2065
2057
  const v = f(a.value);
2066
- T(
2058
+ R(
2067
2059
  () => u.value,
2068
2060
  (d) => {
2069
2061
  if (s.mode === "multiple" && D(d) && D(v.value)) {
@@ -2074,10 +2066,10 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
2074
2066
  }
2075
2067
  );
2076
2068
  const w = (d) => {
2077
- const I = de(a, d, p, r), M = he(I);
2078
- u.value = d, c("update:labels", M), c("change", d), i != null && i.value.errClass && o && ue(o);
2069
+ const I = me(a, d, p, r), M = ve(I);
2070
+ u.value = d, c("update:labels", M), c("change", d), l != null && l.value.errClass && o && fe(o);
2079
2071
  };
2080
- return se(() => {
2072
+ return re(() => {
2081
2073
  var d;
2082
2074
  if (n.value && !n.value.fieldMap && (n.value.fieldMap = {
2083
2075
  label: "Name",
@@ -2086,35 +2078,35 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
2086
2078
  }), a.dataKey) {
2087
2079
  const I = JSON.parse(JSON.stringify(L.getOptions(a.dataKey)));
2088
2080
  p.value = I;
2089
- } else fe(a.autoload, a, p, r, n.value, (d = n.value) == null ? void 0 : d.params);
2090
- }), ne(() => {
2091
- pe(a, r);
2081
+ } else de(a.autoload, a, p, r, n.value, (d = n.value) == null ? void 0 : d.params);
2082
+ }), oe(() => {
2083
+ he(a, r);
2092
2084
  }), (d, I) => {
2093
2085
  var M;
2094
- return x(), O("div", null, [
2095
- a.url && a.url.loading === !0 ? (x(), O("div", ft, [
2096
- q(E(xe), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2097
- I[1] || (I[1] = fa("span", null, "数据加载中...", -1))
2086
+ return E(), O("div", null, [
2087
+ a.url && a.url.loading === !0 ? (E(), O("div", ft, [
2088
+ q(x(Ae), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2089
+ I[1] || (I[1] = ca("span", null, "数据加载中...", -1))
2098
2090
  ])) : j("", !0),
2099
- q(E(ga), re({
2100
- class: [(M = E(i)) == null ? void 0 : M.errClass, "w-full"],
2091
+ q(x(va), le({
2092
+ class: [(M = x(l)) == null ? void 0 : M.errClass, "w-full"],
2101
2093
  value: u.value,
2102
- "onUpdate:value": I[0] || (I[0] = (K) => u.value = K),
2094
+ "onUpdate:value": I[0] || (I[0] = (_) => u.value = _),
2103
2095
  "allow-clear": !0,
2104
2096
  onChange: w,
2105
2097
  placeholder: h.value,
2106
2098
  "label-in-value": !1
2107
- }, E(s)), {
2099
+ }, x(s)), {
2108
2100
  default: H(() => [
2109
- (x(!0), O(B, null, Ae(p.value, (K) => (x(), O(B, {
2110
- key: K.value
2101
+ (E(!0), O(B, null, Te(p.value, (_) => (E(), O(B, {
2102
+ key: _.value
2111
2103
  }, [
2112
- K.visible !== !1 ? (x(), Re(E(ya), {
2104
+ _.visible !== !1 ? (E(), Re(x(ga), {
2113
2105
  key: 0,
2114
- value: K.value
2106
+ value: _.value
2115
2107
  }, {
2116
2108
  default: H(() => [
2117
- Te(J(K.label), 1)
2109
+ we(J(_.label), 1)
2118
2110
  ]),
2119
2111
  _: 2
2120
2112
  }, 1032, ["value"])) : j("", !0)
@@ -2127,18 +2119,18 @@ const ae = new Ja(), fe = (e, t, a, s, n, r) => {
2127
2119
  }
2128
2120
  });
2129
2121
  export {
2130
- Tt as $,
2131
- Pe as A,
2132
- Ta as B,
2122
+ Rt as $,
2123
+ ke as A,
2124
+ Ra as B,
2133
2125
  Kt as C,
2134
2126
  ja as D,
2135
2127
  Ba as E,
2136
2128
  Ht as F,
2137
2129
  Qt as G,
2138
2130
  Ya as H,
2139
- sa as I,
2140
- de as J,
2141
- he as K,
2131
+ ta as I,
2132
+ me as J,
2133
+ ve as K,
2142
2134
  Gt as L,
2143
2135
  qt as M,
2144
2136
  st as N,
@@ -2148,28 +2140,28 @@ export {
2148
2140
  jt as R,
2149
2141
  He as S,
2150
2142
  Bt as T,
2151
- Be as U,
2143
+ je as U,
2152
2144
  Mt as V,
2153
- Je as W,
2154
- Rt as X,
2145
+ Be as W,
2146
+ Tt as X,
2155
2147
  wt as Y,
2156
- ke as Z,
2148
+ Le as Z,
2157
2149
  Wt as _,
2158
2150
  zt as a,
2159
2151
  Dt as a0,
2160
2152
  qa as a1,
2161
- ea as a2,
2153
+ Ze as a2,
2162
2154
  Nt as a3,
2163
2155
  At as a4,
2164
- je as a5,
2156
+ qe as a5,
2165
2157
  wa as a6,
2166
- aa as a7,
2167
- ae as a8,
2158
+ ea as a7,
2159
+ se as a8,
2168
2160
  V as a9,
2169
- ee as aa,
2161
+ ae as aa,
2170
2162
  F as ab,
2171
2163
  Jt as ac,
2172
- Le as ad,
2164
+ Me as ad,
2173
2165
  z as ae,
2174
2166
  kt as b,
2175
2167
  Vt as c,
@@ -2180,19 +2172,19 @@ export {
2180
2172
  Ct as h,
2181
2173
  D as i,
2182
2174
  $t as j,
2183
- ce as k,
2184
- fe as l,
2185
- pe as m,
2186
- ue as n,
2175
+ pe as k,
2176
+ de as l,
2177
+ he as m,
2178
+ fe as n,
2187
2179
  Lt as o,
2188
- Ze as p,
2180
+ Xe as p,
2189
2181
  Va as q,
2190
- N as r,
2182
+ W as r,
2191
2183
  Ft as s,
2192
2184
  Oa as t,
2193
2185
  Q as u,
2194
- oe as v,
2195
- xe as w,
2186
+ ie as v,
2187
+ Ae as w,
2196
2188
  Yt as x,
2197
2189
  Xt as y,
2198
2190
  Zt as z