@skyfox2000/webui 1.4.2 → 1.4.3

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,13 +1,13 @@
1
1
  var ha = Object.defineProperty;
2
2
  var ma = (e, t, a) => t in e ? ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
- var $ = (e, t, a) => ma(e, typeof t != "symbol" ? t + "" : t, a);
4
- import { ref as f, h as H, nextTick as va, inject as se, provide as Le, watch as g, toRaw as Ze, shallowRef as Q, defineComponent as Z, reactive as ga, onMounted as be, onUnmounted as ie, createBlock as Ie, createCommentVNode as z, openBlock as w, unref as b, mergeProps as le, useAttrs as Ae, createElementBlock as M, createVNode as C, withCtx as K, createTextVNode as Ee, toDisplayString as Y, Fragment as re, renderList as Ue, normalizeClass as ea, createElementVNode as ya } from "vue";
3
+ var L = (e, t, a) => ma(e, typeof t != "symbol" ? t + "" : t, a);
4
+ import { ref as f, h as H, nextTick as va, inject as se, provide as Le, watch as g, toRaw as Ze, shallowRef as Q, defineComponent as Z, reactive as ga, onMounted as be, onUnmounted as ie, createBlock as Ie, createCommentVNode as z, openBlock as w, unref as b, mergeProps as le, useAttrs as Ae, createElementBlock as $, createVNode as C, withCtx as K, createTextVNode as Ee, toDisplayString as Y, Fragment as re, renderList as Ue, normalizeClass as ea, createElementVNode as ya } from "vue";
5
5
  import { Switch as Sa, AutoComplete as ba, Input as Ia, CheckboxGroup as Aa, Checkbox as Ea, RadioGroup as xa, Radio as wa, Select as Oa, SelectOption as Ra } from "ant-design-vue";
6
6
  import { createPinia as Ta, defineStore as ue } from "pinia";
7
7
  import Pa from "pinia-plugin-persistedstate";
8
- import { EnvConfig as ye, AppAction as Be, AppSource as ze, mainAppApis as q, isMicroApp as _e, isBaseMicroApp as ka, combineParams as ce } from "@skyfox2000/microbase";
8
+ import { EnvConfig as ye, AppAction as Be, AppSource as ze, mainAppApis as W, isMicroApp as _e, isBaseMicroApp as ka, combineParams as ce } from "@skyfox2000/microbase";
9
9
  import { httpPost as G, ResStatus as T, setToken as me, fieldMapping as La, parseFieldTemplate as Se, API_HOST as Me, SERVER_HOST as Ma } from "@skyfox2000/fapi";
10
- import A from "vue-m-message";
10
+ import E from "vue-m-message";
11
11
  import { createRouter as $a, createWebHashHistory as Fa } from "vue-router";
12
12
  import He from "async-validator";
13
13
  import "dayjs";
@@ -17,7 +17,7 @@ _a.use(Pa);
17
17
  var U = /* @__PURE__ */ ((e) => (e.PageControl = "Page.PageControl", e.EditorControl = "Page.EditorControl", e.GridControl = "Page.GridControl", e.LabelText = "FormItem.LabelText", e.LabelWidth = "FormItem.LabelWidth", e.RuleKey = "FormItem.RuleKey", e.ErrInfo = "FormItem.ErrInfo", e))(U || {});
18
18
  const P = class P {
19
19
  };
20
- $(P, "dict", {}), $(P, "Keys", {
20
+ L(P, "dict", {}), L(P, "Keys", {
21
21
  EnableDisable: "EnableDisable",
22
22
  SuccessResult: "SuccessResult",
23
23
  YesNo: "YesNo",
@@ -27,25 +27,25 @@ $(P, "dict", {}), $(P, "Keys", {
27
27
  * @param key 名称
28
28
  * @returns
29
29
  */
30
- $(P, "getOptions", (t) => P.dict[t]), /**
30
+ L(P, "getOptions", (t) => P.dict[t]), /**
31
31
  * 静态选择项对象
32
32
  * @param key 名称
33
33
  * @param value 值
34
34
  * @returns
35
35
  */
36
- $(P, "getOptionItem", (t, a) => P.dict[t].find((s) => s.value === a)), /**
36
+ L(P, "getOptionItem", (t, a) => P.dict[t].find((s) => s.value === a)), /**
37
37
  * 设置静态选择项
38
38
  * @param key 名称
39
39
  * @param list 列表
40
40
  */
41
- $(P, "setOptions", (t, a) => {
41
+ L(P, "setOptions", (t, a) => {
42
42
  P.dict[t] = a;
43
43
  }), /**
44
44
  * 启用/停用选项
45
45
  * - 启用 1
46
46
  * - 停用 0
47
47
  */
48
- $(P, "EnableDisable", [
48
+ L(P, "EnableDisable", [
49
49
  {
50
50
  label: "启用",
51
51
  text: "✅ 启用",
@@ -61,7 +61,7 @@ $(P, "EnableDisable", [
61
61
  * - 成功 1
62
62
  * - 失败 0
63
63
  */
64
- $(P, "SuccessResult", [
64
+ L(P, "SuccessResult", [
65
65
  {
66
66
  label: "成功",
67
67
  text: "✅ 成功",
@@ -77,7 +77,7 @@ $(P, "SuccessResult", [
77
77
  * - 是 1
78
78
  * - 否 0
79
79
  */
80
- $(P, "YesNo", [
80
+ L(P, "YesNo", [
81
81
  {
82
82
  label: "是",
83
83
  text: "✅ 是",
@@ -93,7 +93,7 @@ $(P, "YesNo", [
93
93
  * - 男 M
94
94
  * - 女 F
95
95
  */
96
- $(P, "MaleFemale", [
96
+ L(P, "MaleFemale", [
97
97
  {
98
98
  label: "男",
99
99
  text: "男 👨",
@@ -105,11 +105,11 @@ $(P, "MaleFemale", [
105
105
  value: "F"
106
106
  }
107
107
  ]);
108
- let D = P;
109
- D.setOptions("EnableDisable", D.EnableDisable);
110
- D.setOptions("SuccessResult", D.SuccessResult);
111
- D.setOptions("YesNo", D.YesNo);
112
- D.setOptions("MaleFemale", D.MaleFemale);
108
+ let N = P;
109
+ N.setOptions("EnableDisable", N.EnableDisable);
110
+ N.setOptions("SuccessResult", N.SuccessResult);
111
+ N.setOptions("YesNo", N.YesNo);
112
+ N.setOptions("MaleFemale", N.MaleFemale);
113
113
  const fe = {
114
114
  /**
115
115
  * 选项数据接口
@@ -173,7 +173,7 @@ const fe = {
173
173
  type: Object,
174
174
  required: !1
175
175
  }
176
- }, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ce = "/login/", ge = [], Da = (e) => {
176
+ }, F = (e) => e == null || e === "" ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1, Ce = "/login/", ge = [], Na = (e) => {
177
177
  for (const t of e) {
178
178
  const a = ge.findIndex((s) => s.path === t.path);
179
179
  a !== -1 && ge.splice(a, 1), ge.push(t), xe.addRoute(t);
@@ -184,7 +184,7 @@ const fe = {
184
184
  }, xe = $a({
185
185
  history: Fa("/"),
186
186
  routes: ge
187
- }), Na = (e, t) => {
187
+ }), Da = (e, t) => {
188
188
  var n, o;
189
189
  const a = ((n = e.meta) == null ? void 0 : n.roles) ?? [], s = (o = e.meta) == null ? void 0 : o.permission;
190
190
  if (!t)
@@ -236,7 +236,7 @@ xe.beforeEach((e, t, a) => {
236
236
  };
237
237
  return;
238
238
  }
239
- const c = Na(s, u.isLogin);
239
+ const c = Da(s, u.isLogin);
240
240
  a();
241
241
  }
242
242
  }
@@ -385,7 +385,7 @@ const Ua = (e) => {
385
385
  },
386
386
  async toDefaultApp(e) {
387
387
  if (this.appList.length === 0 && await this.loadAppList(), this.appList.length === 0) {
388
- A.error("加载应用列表失败");
388
+ E.error("加载应用列表失败");
389
389
  return;
390
390
  }
391
391
  let t = "";
@@ -434,10 +434,10 @@ const Ua = (e) => {
434
434
  s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
435
435
  }), _().isLogin) {
436
436
  const a = ta(this.appInfo.Routes);
437
- if (Da(a), this.appInfo.defaultPage = sa(a) || "", this.appInfo.defaultPage) {
438
- if (this.menuLoaded = !0, q.value && q.value.mainAppPush) {
437
+ if (Na(a), this.appInfo.defaultPage = sa(a) || "", this.appInfo.defaultPage) {
438
+ if (this.menuLoaded = !0, W.value && W.value.mainAppPush) {
439
439
  const s = this.formatRoute(this.appInfo.defaultPage);
440
- q.value.mainAppPush(s);
440
+ W.value.mainAppPush(s);
441
441
  }
442
442
  Ua(this.appInfo.defaultPage);
443
443
  }
@@ -458,9 +458,9 @@ const Ua = (e) => {
458
458
  */
459
459
  push(e) {
460
460
  this.findRoute(e) && Ve().setTabActive(e), va(() => {
461
- if (xe.push({ path: e }), q.value && q.value.mainAppPush) {
461
+ if (xe.push({ path: e }), W.value && W.value.mainAppPush) {
462
462
  const a = this.formatRoute(e);
463
- q.value.mainAppPush(a);
463
+ W.value.mainAppPush(a);
464
464
  }
465
465
  });
466
466
  },
@@ -571,22 +571,22 @@ const Ua = (e) => {
571
571
  _().logout(!1);
572
572
  return;
573
573
  }
574
- return A.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null;
574
+ return E.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null;
575
575
  });
576
- }, Wa = () => {
576
+ }, qa = () => {
577
577
  let e = {
578
578
  Option: {},
579
579
  Query: {}
580
580
  };
581
581
  return G(Ke.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
582
- }, qa = (e) => {
582
+ }, Wa = (e) => {
583
583
  try {
584
584
  const t = JSON.parse(atob(e.token.split(".")[1]));
585
585
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
586
586
  } catch (t) {
587
587
  return console.error(Ja, t), !1;
588
588
  }
589
- }, L = f(""), ae = f(null), _ = ue("userInfo", {
589
+ }, M = f(""), ae = f(null), _ = ue("userInfo", {
590
590
  state: () => ({
591
591
  isLogin: !1,
592
592
  userInfo: {
@@ -604,7 +604,7 @@ const Ua = (e) => {
604
604
  * 启动时初始化用户信息
605
605
  */
606
606
  init() {
607
- _e() || (this.token ? (me(this.token), L.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
607
+ _e() || (this.token ? (me(this.token), M.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
608
608
  },
609
609
  /**
610
610
  * 登录操作
@@ -619,13 +619,13 @@ const Ua = (e) => {
619
619
  return s;
620
620
  {
621
621
  const n = a.data;
622
- if (this.token = n.token, me(this.token), this.isLogin = !0, qa(n))
622
+ if (this.token = n.token, me(this.token), this.isLogin = !0, Wa(n))
623
623
  this.userInfo = {
624
624
  ...this.userInfo,
625
625
  ...n.UserInfo
626
- }, L.value = n.UserInfo.UserLevel;
626
+ }, M.value = n.UserInfo.UserLevel;
627
627
  else {
628
- A.error("用户信息解析失败");
628
+ E.error("用户信息解析失败");
629
629
  return;
630
630
  }
631
631
  t && V().toDefaultApp();
@@ -659,7 +659,7 @@ const Ua = (e) => {
659
659
  * @returns 是否有角色权限
660
660
  */
661
661
  hasRole(e) {
662
- return L.value ? Array.isArray(e) ? e.includes(L.value) : L.value === e : !1;
662
+ return M.value ? Array.isArray(e) ? e.includes(M.value) : M.value === e : !1;
663
663
  },
664
664
  /**
665
665
  * 检查功能权限
@@ -686,7 +686,7 @@ const Ua = (e) => {
686
686
  * @param token 用户Token
687
687
  */
688
688
  setUserInfo(e, t) {
689
- L.value || (L.value = e.UserLevel, this.userInfo = {
689
+ M.value || (M.value = e.UserLevel, this.userInfo = {
690
690
  ...this.userInfo,
691
691
  ...e
692
692
  }, this.token = t, me(this.token), this.isLogin = !0);
@@ -702,20 +702,20 @@ const Ua = (e) => {
702
702
  * 是否超级管理员
703
703
  */
704
704
  isSuperAdmin() {
705
- return L.value === "Super";
705
+ return M.value === "Super";
706
706
  },
707
707
  /**
708
708
  * 是否管理员
709
709
  */
710
710
  isAdmin() {
711
- return L.value === "Super" || L.value === "Admin";
711
+ return M.value === "Super" || M.value === "Admin";
712
712
  },
713
713
  /**
714
714
  * 获取用户级别
715
715
  * @returns 用户级别
716
716
  */
717
717
  getUserLevel() {
718
- return L.value;
718
+ return M.value;
719
719
  },
720
720
  /*
721
721
  * 清理登录信息
@@ -727,7 +727,7 @@ const Ua = (e) => {
727
727
  Code: "",
728
728
  TenantId: "",
729
729
  UserLevel: ""
730
- }, this.token = "", me(this.token), this.isLogin = !1, ae.value = null, L.value = "", V().clean(), Promise.resolve();
730
+ }, this.token = "", me(this.token), this.isLogin = !1, ae.value = null, M.value = "", V().clean(), Promise.resolve();
731
731
  },
732
732
  /**
733
733
  * 登出操作
@@ -736,12 +736,12 @@ const Ua = (e) => {
736
736
  */
737
737
  async logout(e) {
738
738
  try {
739
- e && await Wa();
739
+ e && await qa();
740
740
  } catch (t) {
741
741
  console.error("调用登出接口失败", t);
742
742
  } finally {
743
743
  await this.clean(), e && setTimeout(async () => {
744
- A.success("已退出登录");
744
+ E.success("已退出登录");
745
745
  }, 1e3), setTimeout(async () => {
746
746
  V().logout();
747
747
  }, 2e3);
@@ -784,10 +784,10 @@ const Ua = (e) => {
784
784
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
785
785
  const a = Oe(e, t);
786
786
  return t.url = a, Re(e, t);
787
- }, Mt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Oe(e, t), Re(e, t).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && (t.hideErrorToast || A.success("执行成功!")), a))), na = (e, t = {}) => {
787
+ }, Lt = (e, t) => (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), t.loadingText = t.loadingText === !1 ? !1 : t.loadingText || "开始执行...", t.url = Oe(e, t), Re(e, t).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && (t.hideErrorToast || E.success("执行成功!")), a))), na = (e, t = {}) => {
788
788
  const a = t.primaryKey || "Id";
789
789
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
790
- return A.error("错误!无保存数据!"), Promise.resolve(null);
790
+ return E.error("错误!无保存数据!"), Promise.resolve(null);
791
791
  const s = {
792
792
  ...t,
793
793
  urlKey: t.urlKey || "save",
@@ -795,7 +795,7 @@ const Ua = (e) => {
795
795
  };
796
796
  s.params.Query[a] = s.params.Data[a];
797
797
  const n = Oe(e, s);
798
- return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || A.success("保存成功!")), o));
798
+ return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || E.success("保存成功!")), o));
799
799
  }, Ba = (e, t, a = {}) => {
800
800
  const s = a.primaryKey || "Id";
801
801
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
@@ -805,9 +805,9 @@ const Ua = (e) => {
805
805
  loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据删除中..."
806
806
  };
807
807
  if (Array.isArray(t) ? n.params.Query[s] = t : n.params.Query[s] = t[s], F(n.params.Query) || F(n.params.Query[s]))
808
- return A.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
808
+ return E.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
809
809
  const o = Oe(e, n);
810
- return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || A.success("删除成功!")), r));
810
+ return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || E.success("删除成功!")), r));
811
811
  }, za = (e, t) => Qe(e, {
812
812
  urlKey: "tree",
813
813
  params: {},
@@ -816,7 +816,7 @@ const Ua = (e) => {
816
816
  processParams: () => ce(e.treeQuery, t)
817
817
  }).then((a) => (a == null ? void 0 : a.status) === T.SUCCESS ? (e.data.value = a.data || [], e.afterLoad && e.afterLoad(e.data.value), e.data.value) : (e.afterLoad && e.afterLoad((a == null ? void 0 : a.data) || []), []));
818
818
  let oe;
819
- const $t = (e) => {
819
+ const Mt = (e) => {
820
820
  oe = new He({}), oe.messages({
821
821
  required: "${label}不能为空",
822
822
  types: {
@@ -843,7 +843,7 @@ const $t = (e) => {
843
843
  },
844
844
  ...e
845
845
  });
846
- }, Ft = (e) => {
846
+ }, $t = (e) => {
847
847
  if (!e || F(e))
848
848
  return [];
849
849
  const t = [], a = oe.messages(), s = (o, r, l) => {
@@ -901,7 +901,7 @@ const $t = (e) => {
901
901
  const t = e.formData.value, a = e.formRules.value;
902
902
  F(a) || (Je(e), e.ruleValidator || (e.ruleValidator = new He({}), e.ruleValidator.messages(oe.messages()), e.ruleValidator.define(a)), e.ruleResults.value = await e.ruleValidator.validate(t).then(() => {
903
903
  }).catch(({ fields: s }) => s));
904
- }, _t = async (e, t, a) => (a || (a = new He({}), a.messages(oe.messages()), a.define(t)), a.validate(e).then(() => {
904
+ }, Ft = async (e, t, a) => (a || (a = new He({}), a.messages(oe.messages()), a.define(t)), a.validate(e).then(() => {
905
905
  }).catch(({ fields: s }) => s)), Je = (e) => {
906
906
  e.ruleResults.value = void 0;
907
907
  }, X = () => {
@@ -964,16 +964,16 @@ const $t = (e) => {
964
964
  });
965
965
  }
966
966
  }), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
967
- }, Dt = (e, t) => {
967
+ }, _t = (e, t) => {
968
968
  Le(U.LabelText, e.label || ""), Le(U.RuleKey, e.rule || "");
969
969
  const a = Ca(e, t);
970
970
  return Le(U.ErrInfo, a), a;
971
971
  }, Nt = (e) => {
972
972
  ra(e);
973
- }, Ut = (e) => {
973
+ }, Dt = (e) => {
974
974
  const t = e.page, a = e.formData.value;
975
975
  a[e.primaryKey ?? t.primaryKey] = null, ra(e);
976
- }, Ht = (e) => {
976
+ }, Ut = (e) => {
977
977
  je(e), e.visible.value = !1;
978
978
  }, ra = async (e) => {
979
979
  var s;
@@ -981,7 +981,7 @@ const $t = (e) => {
981
981
  if (e.isFormSaving.value = !0, Je(e), e.beforeSave && e.beforeSave() === !1)
982
982
  return e.isFormSaving.value = !1, Promise.resolve();
983
983
  if (e.formRules.value && await pe(e), e.ruleResults.value)
984
- return A.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
984
+ return E.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
985
985
  const a = e.formData.value;
986
986
  return na(
987
987
  {
@@ -1003,7 +1003,7 @@ const $t = (e) => {
1003
1003
  ).then((n) => {
1004
1004
  var o, r;
1005
1005
  if ((n == null ? void 0 : n.status) === T.SUCCESS)
1006
- A.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
1006
+ E.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
1007
1007
  else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
1008
1008
  const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
1009
1009
  if (l && l.length > 2 && l[1] && l[2]) {
@@ -1020,20 +1020,20 @@ const $t = (e) => {
1020
1020
  ]);
1021
1021
  }), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
1022
1022
  }
1023
- A.error(`保存失败!数据 \`${u}\` 已存在!`);
1024
- } else A.error((n == null ? void 0 : n.msg) ?? "保存失败!");
1023
+ E.error(`保存失败!数据 \`${u}\` 已存在!`);
1024
+ } else E.error((n == null ? void 0 : n.msg) ?? "保存失败!");
1025
1025
  e.afterSave && e.afterSave(n);
1026
1026
  } else
1027
- A.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
1027
+ E.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
1028
1028
  });
1029
- }, Vt = async (e) => {
1029
+ }, Ht = async (e) => {
1030
1030
  const t = e.page, a = e.grid;
1031
1031
  e.isFormLoading.value = !0;
1032
1032
  const s = e.formData.value, n = e.primaryKey ?? t.primaryKey;
1033
1033
  return la(a, { [n]: s[n] }, e.detailUrl).then((o) => {
1034
1034
  e.isFormLoading.value = !1, o && oa(e, o);
1035
1035
  });
1036
- }, Kt = (e) => {
1036
+ }, Vt = (e) => {
1037
1037
  const t = e.grid;
1038
1038
  t && (t.rowData.value = void 0), e && (je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
1039
1039
  e.visible.value = !0;
@@ -1044,7 +1044,7 @@ const $t = (e) => {
1044
1044
  e.formData.value = JSON.parse(JSON.stringify(a));
1045
1045
  }, je = (e) => {
1046
1046
  e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Je(e);
1047
- }, Qt = (e, t) => {
1047
+ }, Kt = (e, t) => {
1048
1048
  const a = _();
1049
1049
  return e.filter((n) => n.role && !a.hasRole(n.role) || n.permit && !a.hasPermit(xe.currentRoute.value.path, n.permit) || n.enabled === !1 ? !1 : typeof n.enabled == "function" ? n.enabled() : !0).filter((n) => {
1050
1050
  if (!t) {
@@ -1055,7 +1055,7 @@ const $t = (e) => {
1055
1055
  }
1056
1056
  return !0;
1057
1057
  });
1058
- }, Jt = (e, t) => {
1058
+ }, Qt = (e, t) => {
1059
1059
  const a = t == null ? void 0 : t.filter((s) => {
1060
1060
  const n = e.find(
1061
1061
  (o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
@@ -1102,7 +1102,7 @@ const $t = (e) => {
1102
1102
  ...a
1103
1103
  }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
1104
1104
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1105
- }, 50), s)), jt = (e, t) => {
1105
+ }, 50), s)), Jt = (e, t) => {
1106
1106
  const a = {};
1107
1107
  return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Za(e, a, {
1108
1108
  loadingText: !1,
@@ -1113,10 +1113,10 @@ const $t = (e) => {
1113
1113
  url: a,
1114
1114
  params: t,
1115
1115
  loadingState: e.isGridLoading
1116
- }), Gt = (e, t) => {
1116
+ }), jt = (e, t) => {
1117
1117
  const a = t;
1118
1118
  return la(e, { [e.primaryKey]: a[e.primaryKey] }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && s.data && (e.expandRows.value[a[e.primaryKey]] = s), s));
1119
- }, Wt = (e, t) => {
1119
+ }, Gt = (e, t) => {
1120
1120
  let a = e.editor;
1121
1121
  e.rowData.value = t, a && (oa(a, t), a.visible.value = !0);
1122
1122
  }, qt = (e, t) => Ba(e, t, {
@@ -1125,14 +1125,14 @@ const $t = (e) => {
1125
1125
  }).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && setTimeout(() => {
1126
1126
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1127
1127
  }, 50), a));
1128
- var De = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(De || {});
1128
+ var Ne = /* @__PURE__ */ ((e) => (e.SelectReload = "Select.Reload", e.RadioReload = "Radio.Reload", e.CheckboxReload = "Checkbox.Reload", e.TreeSelectReload = "TreeSelect.Reload", e.TreeCheckReload = "TreeCheck.Reload", e))(Ne || {});
1129
1129
  class et {
1130
1130
  constructor() {
1131
- $(this, "listeners", {});
1131
+ L(this, "listeners", {});
1132
1132
  }
1133
1133
  // 检查事件名是否符合前缀
1134
1134
  isValidPrefix(t) {
1135
- return Object.values(De).some((a) => t.startsWith(a + "."));
1135
+ return Object.values(Ne).some((a) => t.startsWith(a + "."));
1136
1136
  }
1137
1137
  /**
1138
1138
  * 事件订阅
@@ -1141,7 +1141,7 @@ class et {
1141
1141
  */
1142
1142
  on(t, a) {
1143
1143
  if (!this.isValidPrefix(t)) {
1144
- console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(De).join(", ")} 开头`);
1144
+ console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Ne).join(", ")} 开头`);
1145
1145
  return;
1146
1146
  }
1147
1147
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
@@ -1191,7 +1191,7 @@ const B = new et(), ee = (e, t, a) => {
1191
1191
  e && ua(t.url, t, t.params ?? {});
1192
1192
  else {
1193
1193
  const s = f(se(U.LabelText, ""));
1194
- A.error("`" + s.value + "` 未配置选项数据!", {
1194
+ E.error("`" + s.value + "` 未配置选项数据!", {
1195
1195
  duration: 5e3
1196
1196
  });
1197
1197
  }
@@ -1368,7 +1368,7 @@ const B = new et(), ee = (e, t, a) => {
1368
1368
  value: "Id"
1369
1369
  }
1370
1370
  }
1371
- }, Bt = (e) => {
1371
+ }, Wt = (e) => {
1372
1372
  S.PageOption = {
1373
1373
  ...S.PageOption,
1374
1374
  ...e.pageOption
@@ -1440,7 +1440,7 @@ const B = new et(), ee = (e, t, a) => {
1440
1440
  ), {
1441
1441
  gridCtrl: s
1442
1442
  };
1443
- }, zt = (e, t) => {
1443
+ }, Bt = (e, t) => {
1444
1444
  ke(e);
1445
1445
  const a = {
1446
1446
  ...S.TreeOption,
@@ -1483,7 +1483,7 @@ const B = new et(), ee = (e, t, a) => {
1483
1483
  ), {
1484
1484
  optionCtrl: a
1485
1485
  };
1486
- }, Ct = (e, t, a) => {
1486
+ }, zt = (e, t, a) => {
1487
1487
  ke(e);
1488
1488
  const s = {
1489
1489
  ...S.PageOption,
@@ -1494,9 +1494,9 @@ const B = new et(), ee = (e, t, a) => {
1494
1494
  editorCtrl: n,
1495
1495
  gridCtrl: o
1496
1496
  };
1497
- }, ot = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), j = f({}), Yt = j, Xt = (e) => {
1497
+ }, ot = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), j = f({}), Ct = j, Yt = (e) => {
1498
1498
  var n;
1499
- if (!e.iconUrl) return Ne;
1499
+ if (!e.iconUrl) return De;
1500
1500
  const t = f(!0), a = f("");
1501
1501
  let s = !0;
1502
1502
  return (n = e.icons) != null && n.length && (s = e.icons.every((o) => j.value[o] !== void 0)), (e.icon && !j.value[e.icon] || !s) && it(e, t).then(() => {
@@ -1558,7 +1558,7 @@ const B = new et(), ee = (e, t, a) => {
1558
1558
  },
1559
1559
  render() {
1560
1560
  if (!t.value)
1561
- return Ne;
1561
+ return De;
1562
1562
  let o = this.class, r = "";
1563
1563
  Array.isArray(o) ? r = o.join(" ") : typeof o == "string" && (r = o);
1564
1564
  let l = [r];
@@ -1591,7 +1591,7 @@ const B = new et(), ee = (e, t, a) => {
1591
1591
  try {
1592
1592
  const a = await fetch(e);
1593
1593
  if (!a.ok) {
1594
- A.error("网络异常,无法加载图标库!");
1594
+ E.error("网络异常,无法加载图标库!");
1595
1595
  return;
1596
1596
  }
1597
1597
  let s = await a.text();
@@ -1631,7 +1631,7 @@ const B = new et(), ee = (e, t, a) => {
1631
1631
  return console.error("解析缓存失败:", n), null;
1632
1632
  }
1633
1633
  return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
1634
- }, Zt = () => {
1634
+ }, Xt = () => {
1635
1635
  const e = Date.now();
1636
1636
  for (const t in localStorage)
1637
1637
  if (t.startsWith("icon_cache:")) {
@@ -1642,7 +1642,7 @@ const B = new et(), ee = (e, t, a) => {
1642
1642
  setTimeout(() => {
1643
1643
  t.value = a, t.value && (e.value = j.value[t.value]);
1644
1644
  }, 1);
1645
- }, Ne = H(
1645
+ }, De = H(
1646
1646
  "svg",
1647
1647
  { class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
1648
1648
  [
@@ -1678,7 +1678,7 @@ const B = new et(), ee = (e, t, a) => {
1678
1678
  }, pt = (e, t) => {
1679
1679
  let a = "";
1680
1680
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1681
- }, es = (e, t, a, s) => {
1681
+ }, Zt = (e, t, a, s) => {
1682
1682
  da(e, [], a, s).forEach((o) => t.push(o));
1683
1683
  }, da = (e, t, a, s) => {
1684
1684
  var r, l, u, i, c;
@@ -1698,7 +1698,7 @@ const B = new et(), ee = (e, t, a) => {
1698
1698
  (d.length > 0 || !p.children) && n.push(O);
1699
1699
  }
1700
1700
  return n;
1701
- }, Xe = ga([]), as = () => {
1701
+ }, Xe = ga([]), es = () => {
1702
1702
  Xe.length = 0;
1703
1703
  const e = V();
1704
1704
  let a = Ve().TabActive;
@@ -1723,7 +1723,7 @@ const B = new et(), ee = (e, t, a) => {
1723
1723
  // 不显示错误
1724
1724
  hideErrorToast: !0
1725
1725
  }
1726
- }, ts = ue("hostInfo", {
1726
+ }, as = ue("hostInfo", {
1727
1727
  state: () => ({
1728
1728
  hostInfo: {
1729
1729
  Host: "",
@@ -1814,99 +1814,101 @@ const B = new et(), ee = (e, t, a) => {
1814
1814
  // pick: ['hostInfo'],
1815
1815
  // },
1816
1816
  });
1817
- class ht {
1818
- constructor() {
1819
- this.ensureMicroAppReady();
1820
- }
1817
+ class A {
1821
1818
  /**
1822
- * 确保micro-app环境就绪
1819
+ * 检查是否在微前端环境中运行
1820
+ * @returns boolean
1823
1821
  */
1824
- ensureMicroAppReady() {
1825
- if (typeof window > "u")
1826
- throw new Error("MicroAppSDK can only be used in browser environment");
1822
+ static isInMicroApp() {
1823
+ return typeof window < "u" && !!window.microApp;
1827
1824
  }
1828
1825
  /**
1829
- * 获取基座API
1826
+ * 调用主应用方法的通用方法
1827
+ * @param method 方法名
1828
+ * @param params 参数
1829
+ * @returns Promise
1830
1830
  */
1831
- getMainApis() {
1832
- if (this.isInMicroApp() && window.microApp && window.microApp.getData) {
1833
- const t = window.microApp.getData();
1834
- return (t == null ? void 0 : t.MainApis) || {};
1835
- }
1836
- return {};
1831
+ static async callMainAppMethod(t, a) {
1832
+ if (!this.isInMicroApp())
1833
+ throw new Error(`未配置${t}接口!`);
1834
+ const s = ++this.messageId, n = new Promise((r, l) => {
1835
+ this.callbacks.set(s, { resolve: r, reject: l }), setTimeout(() => {
1836
+ this.callbacks.has(s) && (this.callbacks.delete(s), l(new Error(`API调用超时: ${t}`)));
1837
+ }, 1e4);
1838
+ }), o = {
1839
+ type: "API_REQUEST",
1840
+ id: s,
1841
+ method: t,
1842
+ params: a
1843
+ };
1844
+ return window.microApp.dispatch(o), n;
1837
1845
  }
1838
1846
  /**
1839
- * 检查是否在微前端环境中
1847
+ * 处理来自主应用的响应数据
1848
+ * @param data 响应数据
1840
1849
  */
1841
- isInMicroApp() {
1842
- return !!window.microApp;
1850
+ static handleResponseData(t) {
1851
+ if (t && t.type === "API_RESPONSE" && typeof t.id == "number") {
1852
+ const { id: a, success: s, result: n, error: o } = t, r = this.callbacks.get(a);
1853
+ r && (this.callbacks.delete(a), s ? r.resolve(n) : r.reject(new Error(o || "未知错误")));
1854
+ }
1843
1855
  }
1844
1856
  /**
1845
- * API调用包装器
1857
+ * 初始化通信监听器
1846
1858
  */
1847
- async callMainApi(t, a) {
1848
- const n = this.getMainApis()[t];
1849
- if (!n)
1850
- throw new Error(`Main API method '${t}' is not available`);
1851
- try {
1852
- return a !== void 0 ? await n(a) : await n();
1853
- } catch (o) {
1854
- throw console.error(`Failed to call main API '${t}':`, o), o;
1855
- }
1859
+ static init() {
1860
+ this.isInMicroApp() && window.microApp.addDataListener((t) => {
1861
+ console.log("收到来自主应用的数据:", t), this.handleResponseData(t);
1862
+ });
1856
1863
  }
1857
1864
  /**
1858
1865
  * 获取应用信息
1859
1866
  */
1860
- async getAppInfo() {
1861
- return this.callMainApi("getAppInfo");
1867
+ static async getAppInfo() {
1868
+ return this.callMainAppMethod("getAppInfo");
1862
1869
  }
1863
1870
  /**
1864
1871
  * 获取主机信息
1865
1872
  */
1866
- async getHostInfo() {
1867
- return this.callMainApi("getHostInfo");
1873
+ static async getHostInfo() {
1874
+ return this.callMainAppMethod("getHostInfo");
1868
1875
  }
1869
1876
  /**
1870
1877
  * 获取用户信息
1871
1878
  */
1872
- async getUserInfo() {
1873
- return this.callMainApi("getUserInfo");
1879
+ static async getUserInfo() {
1880
+ return this.callMainAppMethod("getUserInfo");
1874
1881
  }
1875
1882
  /**
1876
1883
  * 获取授权令牌
1877
1884
  */
1878
- async getToken() {
1879
- return this.callMainApi("getToken");
1880
- }
1881
- /**
1882
- * 用户登录
1883
- */
1884
- async userLogin(t) {
1885
- return this.callMainApi("userLogin", t);
1885
+ static async getToken() {
1886
+ return this.callMainAppMethod("getToken");
1886
1887
  }
1887
1888
  /**
1888
1889
  * 用户登出
1889
1890
  */
1890
- async userLogout() {
1891
- return this.callMainApi("userLogout");
1891
+ static async userLogout() {
1892
+ return this.callMainAppMethod("userLogout");
1892
1893
  }
1893
1894
  /**
1894
1895
  * 主应用推送
1895
1896
  */
1896
- async mainAppPush(t) {
1897
- return this.callMainApi("mainAppPush", t);
1897
+ static async mainAppPush(t) {
1898
+ return this.callMainAppMethod("mainAppPush", t);
1898
1899
  }
1899
1900
  }
1900
- const x = new ht(), ss = {
1901
- getAppInfo: x.getAppInfo.bind(x),
1902
- getHostInfo: x.getHostInfo.bind(x),
1903
- getUserInfo: x.getUserInfo.bind(x),
1904
- getToken: x.getToken.bind(x),
1905
- userLogin: x.userLogin.bind(x),
1906
- userLogout: x.userLogout.bind(x),
1907
- mainAppPush: x.mainAppPush.bind(x),
1908
- isInMicroApp: x.isInMicroApp.bind(x)
1909
- }, ns = ue("settingInfo", {
1901
+ L(A, "messageId", 0), L(A, "callbacks", /* @__PURE__ */ new Map());
1902
+ A.init();
1903
+ const ts = {
1904
+ getAppInfo: A.getAppInfo.bind(A),
1905
+ getHostInfo: A.getHostInfo.bind(A),
1906
+ getUserInfo: A.getUserInfo.bind(A),
1907
+ getToken: A.getToken.bind(A),
1908
+ userLogout: A.userLogout.bind(A),
1909
+ mainAppPush: A.mainAppPush.bind(A),
1910
+ isInMicroApp: A.isInMicroApp.bind(A)
1911
+ }, ss = ue("settingInfo", {
1910
1912
  state: () => ({
1911
1913
  fullscreen: !1,
1912
1914
  menuCollapse: !1,
@@ -1948,7 +1950,7 @@ const x = new ht(), ss = {
1948
1950
  }
1949
1951
  },
1950
1952
  persist: !1
1951
- }), rs = /* @__PURE__ */ Z({
1953
+ }), ns = /* @__PURE__ */ Z({
1952
1954
  __name: "index",
1953
1955
  props: {
1954
1956
  ...fe,
@@ -1977,7 +1979,7 @@ const x = new ht(), ss = {
1977
1979
  };
1978
1980
  return be(() => {
1979
1981
  if (!a.data || a.data.length != 2) {
1980
- console.error("Switch组件: ", a.data), A.error("Switch组件必须有且只有两个选项");
1982
+ console.error("Switch组件: ", a.data), E.error("Switch组件必须有且只有两个选项");
1981
1983
  return;
1982
1984
  }
1983
1985
  o && ee(o.autoload, o, a);
@@ -2000,7 +2002,7 @@ const x = new ht(), ss = {
2000
2002
  }, p.$attrs), null, 16, ["class", "checkedChildren", "checkedValue", "unCheckedChildren", "unCheckedValue"])) : z("", !0);
2001
2003
  };
2002
2004
  }
2003
- }), os = /* @__PURE__ */ Z({
2005
+ }), rs = /* @__PURE__ */ Z({
2004
2006
  inheritAttrs: !1,
2005
2007
  __name: "index",
2006
2008
  props: {
@@ -2059,19 +2061,19 @@ const x = new ht(), ss = {
2059
2061
  };
2060
2062
  r.params = ce(r.params, h), r && ee(!0, r, a);
2061
2063
  }, O = (y) => {
2062
- const E = Pe(r, a, y);
2064
+ const x = Pe(r, a, y);
2063
2065
  p("update:value", y), p("select", y);
2064
- const h = Te(E);
2066
+ const h = Te(x);
2065
2067
  p("update:labels", h), i != null && i.value.errClass && u && pe(u);
2066
2068
  };
2067
2069
  return ie(() => {
2068
2070
  r && de(r, a);
2069
- }), (y, E) => {
2071
+ }), (y, x) => {
2070
2072
  var h;
2071
- return w(), M("div", null, [
2073
+ return w(), $("div", null, [
2072
2074
  C(b(ba), le({
2073
2075
  value: l.value,
2074
- "onUpdate:value": E[0] || (E[0] = (I) => l.value = I),
2076
+ "onUpdate:value": x[0] || (x[0] = (I) => l.value = I),
2075
2077
  class: ["w-full", (h = b(i)) == null ? void 0 : h.errClass],
2076
2078
  options: v.value,
2077
2079
  onSearch: d,
@@ -2091,10 +2093,10 @@ const x = new ht(), ss = {
2091
2093
  ]);
2092
2094
  };
2093
2095
  }
2094
- }), mt = { class: "min-h-[32px] pt-[5px]" }, vt = {
2096
+ }), ht = { class: "min-h-[32px] pt-[5px]" }, mt = {
2095
2097
  key: 1,
2096
2098
  class: "text-center text-gray-500"
2097
- }, is = /* @__PURE__ */ Z({
2099
+ }, os = /* @__PURE__ */ Z({
2098
2100
  inheritAttrs: !1,
2099
2101
  __name: "index",
2100
2102
  props: {
@@ -2147,13 +2149,13 @@ const x = new ht(), ss = {
2147
2149
  }), r && ee(r.autoload, r, a);
2148
2150
  }), ie(() => {
2149
2151
  r && de(r, a);
2150
- }), (y, E) => (w(), M("div", mt, [
2152
+ }), (y, x) => (w(), $("div", ht, [
2151
2153
  C(b(Aa), le({
2152
2154
  onChange: p,
2153
2155
  class: "w-full mb-[-3px]"
2154
2156
  }, b(s)), {
2155
2157
  default: K(() => [
2156
- c.value.length > 0 ? (w(!0), M(re, { key: 0 }, Ue(c.value, (h) => {
2158
+ c.value.length > 0 ? (w(!0), $(re, { key: 0 }, Ue(c.value, (h) => {
2157
2159
  var I;
2158
2160
  return w(), Ie(b(Ea), {
2159
2161
  key: h.value,
@@ -2171,16 +2173,16 @@ const x = new ht(), ss = {
2171
2173
  ]),
2172
2174
  _: 2
2173
2175
  }, 1032, ["value", "disabled", "class"]);
2174
- }), 128)) : e.nodata ? (w(), M("div", vt, Y(e.nodata), 1)) : z("", !0)
2176
+ }), 128)) : e.nodata ? (w(), $("div", mt, Y(e.nodata), 1)) : z("", !0)
2175
2177
  ]),
2176
2178
  _: 1
2177
2179
  }, 16)
2178
2180
  ]));
2179
2181
  }
2180
- }), gt = { class: "min-h-[32px] pt-1" }, yt = {
2182
+ }), vt = { class: "min-h-[32px] pt-1" }, gt = {
2181
2183
  key: 1,
2182
2184
  class: "text-center text-gray-500"
2183
- }, ls = /* @__PURE__ */ Z({
2185
+ }, is = /* @__PURE__ */ Z({
2184
2186
  inheritAttrs: !1,
2185
2187
  __name: "index",
2186
2188
  props: {
@@ -2202,14 +2204,14 @@ const x = new ht(), ss = {
2202
2204
  },
2203
2205
  emits: ["change", "update:value", "update:labels"],
2204
2206
  setup(e, { emit: t }) {
2205
- var O, y, E;
2207
+ var O, y, x;
2206
2208
  const a = e, s = Ae(), n = X(), o = he(a.url, a), r = a.optionCtrl ?? o.optionCtrl;
2207
2209
  r.inputFactory = Q(n);
2208
2210
  const l = f({
2209
2211
  ...r == null ? void 0 : r.url,
2210
2212
  url: ((O = r == null ? void 0 : r.url) == null ? void 0 : O.url) || "",
2211
2213
  fieldMap: (r == null ? void 0 : r.fieldMap) || ((y = r == null ? void 0 : r.url) == null ? void 0 : y.fieldMap),
2212
- params: (r == null ? void 0 : r.params) || ((E = r == null ? void 0 : r.url) == null ? void 0 : E.params),
2214
+ params: (r == null ? void 0 : r.params) || ((x = r == null ? void 0 : r.url) == null ? void 0 : x.params),
2213
2215
  loadingText: !1
2214
2216
  }), u = f(a.value), { errInfo: i } = n, c = f((r == null ? void 0 : r.options.value) || []), p = t;
2215
2217
  n.inputEmit = p, r && g(
@@ -2247,7 +2249,7 @@ const x = new ht(), ss = {
2247
2249
  }), r && ee(r.autoload, r, a);
2248
2250
  }), ie(() => {
2249
2251
  r && de(r, a);
2250
- }), (h, I) => (w(), M("div", gt, [
2252
+ }), (h, I) => (w(), $("div", vt, [
2251
2253
  C(b(xa), le({
2252
2254
  value: u.value,
2253
2255
  "onUpdate:value": I[0] || (I[0] = (R) => u.value = R),
@@ -2256,9 +2258,9 @@ const x = new ht(), ss = {
2256
2258
  class: "w-full flex align-items flex-wrap mb-[-3px]"
2257
2259
  }, b(s)), {
2258
2260
  default: K(() => [
2259
- c.value.length > 0 ? (w(!0), M(re, { key: 0 }, Ue(c.value, (R) => {
2261
+ c.value.length > 0 ? (w(!0), $(re, { key: 0 }, Ue(c.value, (R) => {
2260
2262
  var J;
2261
- return w(), M(re, {
2263
+ return w(), $(re, {
2262
2264
  key: R.value
2263
2265
  }, [
2264
2266
  R.visible !== !1 ? (w(), Ie(b(wa), {
@@ -2278,16 +2280,16 @@ const x = new ht(), ss = {
2278
2280
  _: 2
2279
2281
  }, 1032, ["checked", "value", "class"])) : z("", !0)
2280
2282
  ], 64);
2281
- }), 128)) : e.nodata ? (w(), M("div", yt, Y(e.nodata), 1)) : z("", !0)
2283
+ }), 128)) : e.nodata ? (w(), $("div", gt, Y(e.nodata), 1)) : z("", !0)
2282
2284
  ]),
2283
2285
  _: 1
2284
2286
  }, 16, ["value"])
2285
2287
  ]));
2286
2288
  }
2287
- }), St = {
2289
+ }), yt = {
2288
2290
  key: 0,
2289
2291
  class: "absolute z-10 mt-[5px] mr-[10px] text-[#999] flex items-center"
2290
- }, us = /* @__PURE__ */ Z({
2292
+ }, ls = /* @__PURE__ */ Z({
2291
2293
  inheritAttrs: !1,
2292
2294
  __name: "index",
2293
2295
  props: {
@@ -2334,14 +2336,14 @@ const x = new ht(), ss = {
2334
2336
  }), v = f(c.placeholder), d = f(i == null ? void 0 : i.selected.value), O = t;
2335
2337
  n.inputEmit = O;
2336
2338
  const y = (m) => {
2337
- const k = Pe(i, a, m), N = Te(k);
2338
- d.value = m, O("update:labels", N), O("update:label", N.join(";")), O("change", m), r != null && r.value.errClass && o && pe(o);
2339
- }, E = f((i == null ? void 0 : i.options.value) || []), h = (m) => {
2339
+ const k = Pe(i, a, m), D = Te(k);
2340
+ d.value = m, O("update:labels", D), O("update:label", D.join(";")), O("change", m), r != null && r.value.errClass && o && pe(o);
2341
+ }, x = f((i == null ? void 0 : i.options.value) || []), h = (m) => {
2340
2342
  if (m.length > 0 && F(a.value) && a.selectFirst)
2341
2343
  for (let k = 0; k < m.length; k++) {
2342
- const N = m[k];
2343
- if (N.disabled === void 0 || N.disabled === !1) {
2344
- d.value = N.value;
2344
+ const D = m[k];
2345
+ if (D.disabled === void 0 || D.disabled === !1) {
2346
+ d.value = D.value;
2345
2347
  break;
2346
2348
  }
2347
2349
  }
@@ -2351,7 +2353,7 @@ const x = new ht(), ss = {
2351
2353
  return i && (g(
2352
2354
  () => i.options.value,
2353
2355
  (m) => {
2354
- E.value = m || [];
2356
+ x.value = m || [];
2355
2357
  },
2356
2358
  { immediate: !0, deep: !0 }
2357
2359
  ), g(
@@ -2360,7 +2362,7 @@ const x = new ht(), ss = {
2360
2362
  d.value = m;
2361
2363
  }
2362
2364
  )), g(
2363
- () => E.value,
2365
+ () => x.value,
2364
2366
  (m) => {
2365
2367
  h(m);
2366
2368
  }
@@ -2388,40 +2390,40 @@ const x = new ht(), ss = {
2388
2390
  value: "Id",
2389
2391
  key: "Id"
2390
2392
  }), a.dataKey) {
2391
- const m = JSON.parse(JSON.stringify(D.getOptions(a.dataKey)));
2392
- E.value = m, h(m);
2393
+ const m = JSON.parse(JSON.stringify(N.getOptions(a.dataKey)));
2394
+ x.value = m, h(m);
2393
2395
  } else if (i) {
2394
2396
  const m = i.options.value || [];
2395
- m.length > 0 ? (E.value = m, h(m)) : ee(i.autoload, i, a);
2397
+ m.length > 0 ? (x.value = m, h(m)) : ee(i.autoload, i, a);
2396
2398
  }
2397
2399
  }), ie(() => {
2398
2400
  i && de(i, a);
2399
2401
  }), (m, k) => {
2400
- var N, We, qe;
2401
- return w(), M("div", null, [
2402
- (We = (N = b(i)) == null ? void 0 : N.url) != null && We.loading ? (w(), M("div", St, [
2403
- C(b(Ne), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2402
+ var D, qe, We;
2403
+ return w(), $("div", null, [
2404
+ (qe = (D = b(i)) == null ? void 0 : D.url) != null && qe.loading ? (w(), $("div", yt, [
2405
+ C(b(De), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
2404
2406
  k[1] || (k[1] = ya("span", null, "数据加载中...", -1))
2405
2407
  ])) : z("", !0),
2406
2408
  C(b(Oa), le({
2407
- class: [(qe = b(r)) == null ? void 0 : qe.errClass, "w-full"],
2409
+ class: [(We = b(r)) == null ? void 0 : We.errClass, "w-full"],
2408
2410
  value: d.value,
2409
- "onUpdate:value": k[0] || (k[0] = (W) => d.value = W),
2411
+ "onUpdate:value": k[0] || (k[0] = (q) => d.value = q),
2410
2412
  "allow-clear": !0,
2411
2413
  onChange: y,
2412
2414
  placeholder: v.value,
2413
2415
  "label-in-value": !1
2414
2416
  }, b(c)), {
2415
2417
  default: K(() => [
2416
- (w(!0), M(re, null, Ue(E.value, (W) => (w(), M(re, {
2417
- key: W.value
2418
+ (w(!0), $(re, null, Ue(x.value, (q) => (w(), $(re, {
2419
+ key: q.value
2418
2420
  }, [
2419
- W.visible !== !1 ? (w(), Ie(b(Ra), {
2421
+ q.visible !== !1 ? (w(), Ie(b(Ra), {
2420
2422
  key: 0,
2421
- value: W.value
2423
+ value: q.value
2422
2424
  }, {
2423
2425
  default: K(() => [
2424
- Ee(Y(W.label), 1)
2426
+ Ee(Y(q.label), 1)
2425
2427
  ]),
2426
2428
  _: 2
2427
2429
  }, 1032, ["value"])) : z("", !0)
@@ -2434,67 +2436,67 @@ const x = new ht(), ss = {
2434
2436
  }
2435
2437
  });
2436
2438
  export {
2437
- $t as $,
2439
+ Mt as $,
2438
2440
  pe as A,
2439
- is as B,
2440
- ls as C,
2441
- us as D,
2441
+ os as B,
2442
+ is as C,
2443
+ ls as D,
2442
2444
  Qe as E,
2443
2445
  _a as F,
2444
- Bt as G,
2446
+ Wt as G,
2445
2447
  nt as H,
2446
2448
  rt as I,
2447
- zt as J,
2448
- Ct as K,
2449
+ Bt as J,
2450
+ zt as K,
2449
2451
  we as L,
2450
2452
  st as M,
2451
2453
  ca as N,
2452
- D as O,
2454
+ N as O,
2453
2455
  U as P,
2454
- Yt as Q,
2455
- Zt as R,
2456
+ Ct as Q,
2457
+ Xt as R,
2456
2458
  ft as S,
2457
2459
  pt as T,
2458
- es as U,
2460
+ Zt as U,
2459
2461
  Xe as V,
2460
- as as W,
2462
+ es as W,
2461
2463
  ra as X,
2462
- Vt as Y,
2464
+ Ht as Y,
2463
2465
  oa as Z,
2464
- rs as _,
2465
- ns as a,
2466
- _t as a0,
2466
+ ns as _,
2467
+ ss as a,
2468
+ Ft as a0,
2467
2469
  Je as a1,
2468
- Ft as a2,
2469
- Jt as a3,
2470
+ $t as a2,
2471
+ Qt as a3,
2470
2472
  Za as a4,
2471
2473
  la as a5,
2472
- Gt as a6,
2473
- Mt as a7,
2474
+ jt as a6,
2475
+ Lt as a7,
2474
2476
  na as a8,
2475
2477
  Ba as a9,
2476
- De as aa,
2478
+ Ne as aa,
2477
2479
  B as ab,
2478
- ss as ac,
2480
+ ts as ac,
2479
2481
  ne as ad,
2480
2482
  ge as ae,
2481
2483
  V as af,
2482
- ts as ag,
2484
+ as as ag,
2483
2485
  Ve as ah,
2484
2486
  oe as ai,
2485
- Ut as b,
2486
- Xt as c,
2487
- Ht as d,
2488
- Dt as e,
2489
- Wt as f,
2487
+ Dt as b,
2488
+ Yt as c,
2489
+ Ut as d,
2490
+ _t as e,
2491
+ Gt as f,
2490
2492
  qt as g,
2491
- Qt as h,
2493
+ Kt as h,
2492
2494
  F as i,
2493
- Kt as j,
2495
+ Vt as j,
2494
2496
  ia as k,
2495
2497
  Xa as l,
2496
- jt as m,
2497
- os as n,
2498
+ Jt as m,
2499
+ rs as n,
2498
2500
  Nt as o,
2499
2501
  fe as p,
2500
2502
  za as q,
@@ -2504,7 +2506,7 @@ export {
2504
2506
  _ as u,
2505
2507
  ee as v,
2506
2508
  de as w,
2507
- Ne as x,
2509
+ De as x,
2508
2510
  Pe as y,
2509
2511
  Te as z
2510
2512
  };