@skyfox2000/webui 1.4.2 → 1.4.4

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, isMicroApp as B, 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
  }
@@ -302,7 +302,102 @@ const Ua = (e) => {
302
302
  }
303
303
  },
304
304
  persist: !1
305
- }), Ka = {
305
+ });
306
+ class A {
307
+ /**
308
+ * 检查是否在微前端环境中运行
309
+ * @returns boolean
310
+ */
311
+ static isInMicroApp() {
312
+ return typeof window < "u" && !!window.microApp;
313
+ }
314
+ /**
315
+ * 调用主应用方法的通用方法
316
+ * @param method 方法名
317
+ * @param params 参数
318
+ * @returns Promise
319
+ */
320
+ static async callMainAppMethod(t, a) {
321
+ if (!this.isInMicroApp())
322
+ throw new Error(`未配置${t}接口!`);
323
+ const s = ++this.messageId, n = new Promise((r, l) => {
324
+ this.callbacks.set(s, { resolve: r, reject: l }), setTimeout(() => {
325
+ this.callbacks.has(s) && (this.callbacks.delete(s), l(new Error(`API调用超时: ${t}`)));
326
+ }, 1e4);
327
+ }), o = {
328
+ type: "API_REQUEST",
329
+ id: s,
330
+ method: t,
331
+ params: a
332
+ };
333
+ return window.microApp.dispatch(o), n;
334
+ }
335
+ /**
336
+ * 处理来自主应用的响应数据
337
+ * @param data 响应数据
338
+ */
339
+ static handleResponseData(t) {
340
+ if (t && t.type === "API_RESPONSE" && typeof t.id == "number") {
341
+ const { id: a, success: s, result: n, error: o } = t, r = this.callbacks.get(a);
342
+ r && (this.callbacks.delete(a), s ? r.resolve(n) : r.reject(new Error(o || "未知错误")));
343
+ }
344
+ }
345
+ /**
346
+ * 初始化通信监听器
347
+ */
348
+ static init() {
349
+ this.isInMicroApp() && window.microApp.addDataListener((t) => {
350
+ console.log("收到来自主应用的数据:", t), this.handleResponseData(t);
351
+ });
352
+ }
353
+ /**
354
+ * 获取应用信息
355
+ */
356
+ static async getAppInfo() {
357
+ return this.callMainAppMethod("getAppInfo");
358
+ }
359
+ /**
360
+ * 获取主机信息
361
+ */
362
+ static async getHostInfo() {
363
+ return this.callMainAppMethod("getHostInfo");
364
+ }
365
+ /**
366
+ * 获取用户信息
367
+ */
368
+ static async getUserInfo() {
369
+ return this.callMainAppMethod("getUserInfo");
370
+ }
371
+ /**
372
+ * 获取授权令牌
373
+ */
374
+ static async getToken() {
375
+ return this.callMainAppMethod("getToken");
376
+ }
377
+ /**
378
+ * 用户登出
379
+ */
380
+ static async userLogout() {
381
+ return this.callMainAppMethod("userLogout");
382
+ }
383
+ /**
384
+ * 主应用推送
385
+ */
386
+ static async mainAppPush(t) {
387
+ return this.callMainAppMethod("mainAppPush", t);
388
+ }
389
+ }
390
+ L(A, "messageId", 0), L(A, "callbacks", /* @__PURE__ */ new Map());
391
+ A.init();
392
+ const _e = {
393
+ getAppInfo: A.getAppInfo.bind(A),
394
+ getHostInfo: A.getHostInfo.bind(A),
395
+ getUserInfo: A.getUserInfo.bind(A),
396
+ getToken: A.getToken.bind(A),
397
+ userLogout: A.userLogout.bind(A),
398
+ mainAppPush: A.mainAppPush.bind(A),
399
+ isInMicroApp: A.isInMicroApp.bind(A)
400
+ }, Ka = {
306
401
  appList: {
307
402
  api: "PLATFORM_API",
308
403
  authorize: !0,
@@ -385,7 +480,7 @@ const Ua = (e) => {
385
480
  },
386
481
  async toDefaultApp(e) {
387
482
  if (this.appList.length === 0 && await this.loadAppList(), this.appList.length === 0) {
388
- A.error("加载应用列表失败");
483
+ E.error("加载应用列表失败");
389
484
  return;
390
485
  }
391
486
  let t = "";
@@ -413,7 +508,7 @@ const Ua = (e) => {
413
508
  flattenRoutes: {},
414
509
  Routes: t ?? [],
415
510
  defaultPage: ""
416
- }), (!_e() || !ka()) && (await _().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
511
+ }), (!B() || !ka()) && (await _().getRolePermits(a.Id), this.appInfo.Routes.length && this.setAppRoutes(this.appInfo.Routes)));
417
512
  },
418
513
  /**
419
514
  * 设置当前应用路由信息
@@ -434,10 +529,10 @@ const Ua = (e) => {
434
529
  s.children || !s.component || (s.meta && s.meta.keepAlive === !1 ? this.ExcludeComponents.push(a) : this.CachedComponents.push(a));
435
530
  }), _().isLogin) {
436
531
  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) {
532
+ if (Na(a), this.appInfo.defaultPage = sa(a) || "", this.appInfo.defaultPage) {
533
+ if (this.menuLoaded = !0, B()) {
439
534
  const s = this.formatRoute(this.appInfo.defaultPage);
440
- q.value.mainAppPush(s);
535
+ _e.mainAppPush(s);
441
536
  }
442
537
  Ua(this.appInfo.defaultPage);
443
538
  }
@@ -458,9 +553,9 @@ const Ua = (e) => {
458
553
  */
459
554
  push(e) {
460
555
  this.findRoute(e) && Ve().setTabActive(e), va(() => {
461
- if (xe.push({ path: e }), q.value && q.value.mainAppPush) {
556
+ if (xe.push({ path: e }), B()) {
462
557
  const a = this.formatRoute(e);
463
- q.value.mainAppPush(a);
558
+ _e.mainAppPush(a);
464
559
  }
465
560
  });
466
561
  },
@@ -571,22 +666,22 @@ const Ua = (e) => {
571
666
  _().logout(!1);
572
667
  return;
573
668
  }
574
- return A.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null;
669
+ return E.error("获取授权信息失败," + (a == null ? void 0 : a.msg)), null;
575
670
  });
576
- }, Wa = () => {
671
+ }, qa = () => {
577
672
  let e = {
578
673
  Option: {},
579
674
  Query: {}
580
675
  };
581
676
  return G(Ke.logout, e).then((t) => (t == null ? void 0 : t.status) === T.SUCCESS ? t.data : null);
582
- }, qa = (e) => {
677
+ }, Wa = (e) => {
583
678
  try {
584
679
  const t = JSON.parse(atob(e.token.split(".")[1]));
585
680
  return t.user = JSON.parse(t.user), e.UserInfo = t.user, !0;
586
681
  } catch (t) {
587
682
  return console.error(Ja, t), !1;
588
683
  }
589
- }, L = f(""), ae = f(null), _ = ue("userInfo", {
684
+ }, M = f(""), ae = f(null), _ = ue("userInfo", {
590
685
  state: () => ({
591
686
  isLogin: !1,
592
687
  userInfo: {
@@ -604,7 +699,7 @@ const Ua = (e) => {
604
699
  * 启动时初始化用户信息
605
700
  */
606
701
  init() {
607
- _e() || (this.token ? (me(this.token), L.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
702
+ B() || (this.token ? (me(this.token), M.value = this.userInfo.UserLevel, this.isLogin = !0) : this.clean());
608
703
  },
609
704
  /**
610
705
  * 登录操作
@@ -619,13 +714,13 @@ const Ua = (e) => {
619
714
  return s;
620
715
  {
621
716
  const n = a.data;
622
- if (this.token = n.token, me(this.token), this.isLogin = !0, qa(n))
717
+ if (this.token = n.token, me(this.token), this.isLogin = !0, Wa(n))
623
718
  this.userInfo = {
624
719
  ...this.userInfo,
625
720
  ...n.UserInfo
626
- }, L.value = n.UserInfo.UserLevel;
721
+ }, M.value = n.UserInfo.UserLevel;
627
722
  else {
628
- A.error("用户信息解析失败");
723
+ E.error("用户信息解析失败");
629
724
  return;
630
725
  }
631
726
  t && V().toDefaultApp();
@@ -659,7 +754,7 @@ const Ua = (e) => {
659
754
  * @returns 是否有角色权限
660
755
  */
661
756
  hasRole(e) {
662
- return L.value ? Array.isArray(e) ? e.includes(L.value) : L.value === e : !1;
757
+ return M.value ? Array.isArray(e) ? e.includes(M.value) : M.value === e : !1;
663
758
  },
664
759
  /**
665
760
  * 检查功能权限
@@ -686,7 +781,7 @@ const Ua = (e) => {
686
781
  * @param token 用户Token
687
782
  */
688
783
  setUserInfo(e, t) {
689
- L.value || (L.value = e.UserLevel, this.userInfo = {
784
+ M.value || (M.value = e.UserLevel, this.userInfo = {
690
785
  ...this.userInfo,
691
786
  ...e
692
787
  }, this.token = t, me(this.token), this.isLogin = !0);
@@ -702,20 +797,20 @@ const Ua = (e) => {
702
797
  * 是否超级管理员
703
798
  */
704
799
  isSuperAdmin() {
705
- return L.value === "Super";
800
+ return M.value === "Super";
706
801
  },
707
802
  /**
708
803
  * 是否管理员
709
804
  */
710
805
  isAdmin() {
711
- return L.value === "Super" || L.value === "Admin";
806
+ return M.value === "Super" || M.value === "Admin";
712
807
  },
713
808
  /**
714
809
  * 获取用户级别
715
810
  * @returns 用户级别
716
811
  */
717
812
  getUserLevel() {
718
- return L.value;
813
+ return M.value;
719
814
  },
720
815
  /*
721
816
  * 清理登录信息
@@ -727,7 +822,7 @@ const Ua = (e) => {
727
822
  Code: "",
728
823
  TenantId: "",
729
824
  UserLevel: ""
730
- }, this.token = "", me(this.token), this.isLogin = !1, ae.value = null, L.value = "", V().clean(), Promise.resolve();
825
+ }, this.token = "", me(this.token), this.isLogin = !1, ae.value = null, M.value = "", V().clean(), Promise.resolve();
731
826
  },
732
827
  /**
733
828
  * 登出操作
@@ -736,12 +831,12 @@ const Ua = (e) => {
736
831
  */
737
832
  async logout(e) {
738
833
  try {
739
- e && await Wa();
834
+ e && await qa();
740
835
  } catch (t) {
741
836
  console.error("调用登出接口失败", t);
742
837
  } finally {
743
838
  await this.clean(), e && setTimeout(async () => {
744
- A.success("已退出登录");
839
+ E.success("已退出登录");
745
840
  }, 1e3), setTimeout(async () => {
746
841
  V().logout();
747
842
  }, 2e3);
@@ -749,7 +844,7 @@ const Ua = (e) => {
749
844
  return Promise.resolve();
750
845
  }
751
846
  },
752
- persist: _e() ? !1 : {
847
+ persist: B() ? !1 : {
753
848
  key: "MICROAPP_USER_INFO",
754
849
  storage: localStorage,
755
850
  pick: ["token", "userInfo"],
@@ -784,10 +879,10 @@ const Ua = (e) => {
784
879
  t.params || (t.params = {}), t.params.Query || (t.params.Query = {});
785
880
  const a = Oe(e, t);
786
881
  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 = {}) => {
882
+ }, 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
883
  const a = t.primaryKey || "Id";
789
884
  if (t.params || (t.params = {}), t.params.Query || (t.params.Query = {}), !t.params.Data)
790
- return A.error("错误!无保存数据!"), Promise.resolve(null);
885
+ return E.error("错误!无保存数据!"), Promise.resolve(null);
791
886
  const s = {
792
887
  ...t,
793
888
  urlKey: t.urlKey || "save",
@@ -795,7 +890,7 @@ const Ua = (e) => {
795
890
  };
796
891
  s.params.Query[a] = s.params.Data[a];
797
892
  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));
893
+ return s.url = n, Re(e, s).then((o) => ((o == null ? void 0 : o.status) === T.SUCCESS && (t.hideErrorToast || E.success("保存成功!")), o));
799
894
  }, Ba = (e, t, a = {}) => {
800
895
  const s = a.primaryKey || "Id";
801
896
  a.params || (a.params = {}), a.params.Query || (a.params.Query = {});
@@ -805,9 +900,9 @@ const Ua = (e) => {
805
900
  loadingText: a.loadingText === !1 ? !1 : a.loadingText || "数据删除中..."
806
901
  };
807
902
  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);
903
+ return E.error("错误!禁止无条件删除数据!"), Promise.resolve(null);
809
904
  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));
905
+ return n.url = o, Re(e, n).then((r) => ((r == null ? void 0 : r.status) === T.SUCCESS && (a.hideErrorToast || E.success("删除成功!")), r));
811
906
  }, za = (e, t) => Qe(e, {
812
907
  urlKey: "tree",
813
908
  params: {},
@@ -816,7 +911,7 @@ const Ua = (e) => {
816
911
  processParams: () => ce(e.treeQuery, t)
817
912
  }).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
913
  let oe;
819
- const $t = (e) => {
914
+ const Mt = (e) => {
820
915
  oe = new He({}), oe.messages({
821
916
  required: "${label}不能为空",
822
917
  types: {
@@ -843,7 +938,7 @@ const $t = (e) => {
843
938
  },
844
939
  ...e
845
940
  });
846
- }, Ft = (e) => {
941
+ }, $t = (e) => {
847
942
  if (!e || F(e))
848
943
  return [];
849
944
  const t = [], a = oe.messages(), s = (o, r, l) => {
@@ -901,7 +996,7 @@ const $t = (e) => {
901
996
  const t = e.formData.value, a = e.formRules.value;
902
997
  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
998
  }).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(() => {
999
+ }, Ft = async (e, t, a) => (a || (a = new He({}), a.messages(oe.messages()), a.define(t)), a.validate(e).then(() => {
905
1000
  }).catch(({ fields: s }) => s)), Je = (e) => {
906
1001
  e.ruleResults.value = void 0;
907
1002
  }, X = () => {
@@ -964,16 +1059,16 @@ const $t = (e) => {
964
1059
  });
965
1060
  }
966
1061
  }), s.value.length > 0 && (o.value = "error"), { msg: n, ruleErrors: s, errClass: o };
967
- }, Dt = (e, t) => {
1062
+ }, _t = (e, t) => {
968
1063
  Le(U.LabelText, e.label || ""), Le(U.RuleKey, e.rule || "");
969
1064
  const a = Ca(e, t);
970
1065
  return Le(U.ErrInfo, a), a;
971
1066
  }, Nt = (e) => {
972
1067
  ra(e);
973
- }, Ut = (e) => {
1068
+ }, Dt = (e) => {
974
1069
  const t = e.page, a = e.formData.value;
975
1070
  a[e.primaryKey ?? t.primaryKey] = null, ra(e);
976
- }, Ht = (e) => {
1071
+ }, Ut = (e) => {
977
1072
  je(e), e.visible.value = !1;
978
1073
  }, ra = async (e) => {
979
1074
  var s;
@@ -981,7 +1076,7 @@ const $t = (e) => {
981
1076
  if (e.isFormSaving.value = !0, Je(e), e.beforeSave && e.beforeSave() === !1)
982
1077
  return e.isFormSaving.value = !1, Promise.resolve();
983
1078
  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();
1079
+ return E.error("提交表单时,验证失败!"), console.error("表单验证失败!", e.ruleResults.value), e.isFormSaving.value = !1, Promise.resolve();
985
1080
  const a = e.formData.value;
986
1081
  return na(
987
1082
  {
@@ -1003,7 +1098,7 @@ const $t = (e) => {
1003
1098
  ).then((n) => {
1004
1099
  var o, r;
1005
1100
  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);
1101
+ E.success("保存成功!"), e.grid && (e.grid.reload.value = !0), e.afterSave && e.afterSave(n), e.autoClose !== !1 && (e.visible.value = !1);
1007
1102
  else if (n != null && n.msg && ((o = n == null ? void 0 : n.msg) == null ? void 0 : o.indexOf("Duplicate entry")) > -1) {
1008
1103
  const l = (r = n == null ? void 0 : n.msg) == null ? void 0 : r.match(/Duplicate entry '([^']+)' for key '([^']+)'/);
1009
1104
  if (l && l.length > 2 && l[1] && l[2]) {
@@ -1020,20 +1115,20 @@ const $t = (e) => {
1020
1115
  ]);
1021
1116
  }), Object.keys(p).length > 0 && (console.error("保存失败!", p), e.ruleResults.value = p);
1022
1117
  }
1023
- A.error(`保存失败!数据 \`${u}\` 已存在!`);
1024
- } else A.error((n == null ? void 0 : n.msg) ?? "保存失败!");
1118
+ E.error(`保存失败!数据 \`${u}\` 已存在!`);
1119
+ } else E.error((n == null ? void 0 : n.msg) ?? "保存失败!");
1025
1120
  e.afterSave && e.afterSave(n);
1026
1121
  } else
1027
- A.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
1122
+ E.error((n == null ? void 0 : n.msg) ?? "保存失败!"), e.afterSave && e.afterSave(n);
1028
1123
  });
1029
- }, Vt = async (e) => {
1124
+ }, Ht = async (e) => {
1030
1125
  const t = e.page, a = e.grid;
1031
1126
  e.isFormLoading.value = !0;
1032
1127
  const s = e.formData.value, n = e.primaryKey ?? t.primaryKey;
1033
1128
  return la(a, { [n]: s[n] }, e.detailUrl).then((o) => {
1034
1129
  e.isFormLoading.value = !1, o && oa(e, o);
1035
1130
  });
1036
- }, Kt = (e) => {
1131
+ }, Vt = (e) => {
1037
1132
  const t = e.grid;
1038
1133
  t && (t.rowData.value = void 0), e && (je(e), e.visible && (e.visible.value = !1), setTimeout(() => {
1039
1134
  e.visible.value = !0;
@@ -1044,7 +1139,7 @@ const $t = (e) => {
1044
1139
  e.formData.value = JSON.parse(JSON.stringify(a));
1045
1140
  }, je = (e) => {
1046
1141
  e.formData.value = e.default ? JSON.parse(JSON.stringify(e.default)) : {}, Je(e);
1047
- }, Qt = (e, t) => {
1142
+ }, Kt = (e, t) => {
1048
1143
  const a = _();
1049
1144
  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
1145
  if (!t) {
@@ -1055,7 +1150,7 @@ const $t = (e) => {
1055
1150
  }
1056
1151
  return !0;
1057
1152
  });
1058
- }, Jt = (e, t) => {
1153
+ }, Qt = (e, t) => {
1059
1154
  const a = t == null ? void 0 : t.filter((s) => {
1060
1155
  const n = e.find(
1061
1156
  (o) => o.dataIndex === s.dataIndex || o.key === s.key || o.title === s.title
@@ -1102,7 +1197,7 @@ const $t = (e) => {
1102
1197
  ...a
1103
1198
  }).then((s) => ((s == null ? void 0 : s.status) === T.SUCCESS && setTimeout(() => {
1104
1199
  e.reload.value = !0, e.afterUpdate && e.afterUpdate(t);
1105
- }, 50), s)), jt = (e, t) => {
1200
+ }, 50), s)), Jt = (e, t) => {
1106
1201
  const a = {};
1107
1202
  return a[e.primaryKey] = t[e.primaryKey], a[e.statusKey] = t[e.statusKey], Za(e, a, {
1108
1203
  loadingText: !1,
@@ -1113,10 +1208,10 @@ const $t = (e) => {
1113
1208
  url: a,
1114
1209
  params: t,
1115
1210
  loadingState: e.isGridLoading
1116
- }), Gt = (e, t) => {
1211
+ }), jt = (e, t) => {
1117
1212
  const a = t;
1118
1213
  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) => {
1214
+ }, Gt = (e, t) => {
1120
1215
  let a = e.editor;
1121
1216
  e.rowData.value = t, a && (oa(a, t), a.visible.value = !0);
1122
1217
  }, qt = (e, t) => Ba(e, t, {
@@ -1125,14 +1220,14 @@ const $t = (e) => {
1125
1220
  }).then((a) => ((a == null ? void 0 : a.status) === T.SUCCESS && setTimeout(() => {
1126
1221
  e.reload.value = !0, e.afterDelete && !Array.isArray(t) && e.afterDelete(t);
1127
1222
  }, 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 || {});
1223
+ 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
1224
  class et {
1130
1225
  constructor() {
1131
- $(this, "listeners", {});
1226
+ L(this, "listeners", {});
1132
1227
  }
1133
1228
  // 检查事件名是否符合前缀
1134
1229
  isValidPrefix(t) {
1135
- return Object.values(De).some((a) => t.startsWith(a + "."));
1230
+ return Object.values(Ne).some((a) => t.startsWith(a + "."));
1136
1231
  }
1137
1232
  /**
1138
1233
  * 事件订阅
@@ -1141,7 +1236,7 @@ class et {
1141
1236
  */
1142
1237
  on(t, a) {
1143
1238
  if (!this.isValidPrefix(t)) {
1144
- console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(De).join(", ")} 开头`);
1239
+ console.error(`事件前缀不正确: ${t}, 事件名必须以 ${Object.values(Ne).join(", ")} 开头`);
1145
1240
  return;
1146
1241
  }
1147
1242
  this.listeners[t] || (this.listeners[t] = []), this.listeners[t].push(a);
@@ -1172,12 +1267,12 @@ class et {
1172
1267
  this.listeners[t] && this.listeners[t].forEach((s) => s(t, ...a));
1173
1268
  }
1174
1269
  }
1175
- const B = new et(), ee = (e, t, a) => {
1270
+ const W = new et(), ee = (e, t, a) => {
1176
1271
  if (t.inputFactory && (a != null && a.reloadEvent)) {
1177
1272
  const s = t.inputFactory.value;
1178
1273
  s.reloadHandler = (n, o) => {
1179
1274
  at(t.url, t, o);
1180
- }, B.on(a.reloadEvent, s.reloadHandler);
1275
+ }, W.on(a.reloadEvent, s.reloadHandler);
1181
1276
  }
1182
1277
  if (a != null && a.data)
1183
1278
  g(
@@ -1191,7 +1286,7 @@ const B = new et(), ee = (e, t, a) => {
1191
1286
  e && ua(t.url, t, t.params ?? {});
1192
1287
  else {
1193
1288
  const s = f(se(U.LabelText, ""));
1194
- A.error("`" + s.value + "` 未配置选项数据!", {
1289
+ E.error("`" + s.value + "` 未配置选项数据!", {
1195
1290
  duration: 5e3
1196
1291
  });
1197
1292
  }
@@ -1210,7 +1305,7 @@ const B = new et(), ee = (e, t, a) => {
1210
1305
  Array.isArray(a) ? Ge(t, a, !0) : ua(e, t, a);
1211
1306
  }, de = (e, t) => {
1212
1307
  var a;
1213
- (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && B.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1308
+ (a = e.inputFactory) != null && a.value && t.reloadEvent && e.inputFactory.value.reloadHandler && W.off(t.reloadEvent, e.inputFactory.value.reloadHandler);
1214
1309
  }, ua = (e, t, a) => {
1215
1310
  const s = JSON.parse(JSON.stringify(e.params ?? {})), n = JSON.parse(JSON.stringify(t.params ?? {})), o = ce(s, n, a);
1216
1311
  tt(e, t, t.fieldMap, o).then((r) => {
@@ -1310,7 +1405,7 @@ const B = new et(), ee = (e, t, a) => {
1310
1405
  const c = Se(u, { selectedValues: a });
1311
1406
  try {
1312
1407
  const p = JSON.parse(c);
1313
- B.emit(i, p, a, n);
1408
+ W.emit(i, p, a, n);
1314
1409
  } catch (p) {
1315
1410
  console.error("eventParamsValue: ", c, p);
1316
1411
  }
@@ -1319,15 +1414,15 @@ const B = new et(), ee = (e, t, a) => {
1319
1414
  const i = Se(u, { selectedValues: a });
1320
1415
  try {
1321
1416
  const c = JSON.parse(i);
1322
- B.emit(l, c, a, n);
1417
+ W.emit(l, c, a, n);
1323
1418
  } catch (c) {
1324
1419
  console.error("eventParamsValue: ", i, c);
1325
1420
  }
1326
1421
  }
1327
1422
  else
1328
1423
  Array.isArray(l) ? l.every((i) => {
1329
- B.emit(i, n, a);
1330
- }) : B.emit(l, n, a);
1424
+ W.emit(i, n, a);
1425
+ }) : W.emit(l, n, a);
1331
1426
  }
1332
1427
  return s != null && s.inputEmit && s.inputEmit("change", a, n), n;
1333
1428
  }, S = {
@@ -1368,7 +1463,7 @@ const B = new et(), ee = (e, t, a) => {
1368
1463
  value: "Id"
1369
1464
  }
1370
1465
  }
1371
- }, Bt = (e) => {
1466
+ }, Wt = (e) => {
1372
1467
  S.PageOption = {
1373
1468
  ...S.PageOption,
1374
1469
  ...e.pageOption
@@ -1440,7 +1535,7 @@ const B = new et(), ee = (e, t, a) => {
1440
1535
  ), {
1441
1536
  gridCtrl: s
1442
1537
  };
1443
- }, zt = (e, t) => {
1538
+ }, Bt = (e, t) => {
1444
1539
  ke(e);
1445
1540
  const a = {
1446
1541
  ...S.TreeOption,
@@ -1483,7 +1578,7 @@ const B = new et(), ee = (e, t, a) => {
1483
1578
  ), {
1484
1579
  optionCtrl: a
1485
1580
  };
1486
- }, Ct = (e, t, a) => {
1581
+ }, zt = (e, t, a) => {
1487
1582
  ke(e);
1488
1583
  const s = {
1489
1584
  ...S.PageOption,
@@ -1494,9 +1589,9 @@ const B = new et(), ee = (e, t, a) => {
1494
1589
  editorCtrl: n,
1495
1590
  gridCtrl: o
1496
1591
  };
1497
- }, ot = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), j = f({}), Yt = j, Xt = (e) => {
1592
+ }, ot = 7 * 24 * 60 * 60 * 1e3, Fe = /* @__PURE__ */ new Map(), Ye = /* @__PURE__ */ new Set(), j = f({}), Ct = j, Yt = (e) => {
1498
1593
  var n;
1499
- if (!e.iconUrl) return Ne;
1594
+ if (!e.iconUrl) return De;
1500
1595
  const t = f(!0), a = f("");
1501
1596
  let s = !0;
1502
1597
  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 +1653,7 @@ const B = new et(), ee = (e, t, a) => {
1558
1653
  },
1559
1654
  render() {
1560
1655
  if (!t.value)
1561
- return Ne;
1656
+ return De;
1562
1657
  let o = this.class, r = "";
1563
1658
  Array.isArray(o) ? r = o.join(" ") : typeof o == "string" && (r = o);
1564
1659
  let l = [r];
@@ -1591,7 +1686,7 @@ const B = new et(), ee = (e, t, a) => {
1591
1686
  try {
1592
1687
  const a = await fetch(e);
1593
1688
  if (!a.ok) {
1594
- A.error("网络异常,无法加载图标库!");
1689
+ E.error("网络异常,无法加载图标库!");
1595
1690
  return;
1596
1691
  }
1597
1692
  let s = await a.text();
@@ -1631,7 +1726,7 @@ const B = new et(), ee = (e, t, a) => {
1631
1726
  return console.error("解析缓存失败:", n), null;
1632
1727
  }
1633
1728
  return s.expireTime < Date.now() ? (localStorage.removeItem(e), null) : s;
1634
- }, Zt = () => {
1729
+ }, Xt = () => {
1635
1730
  const e = Date.now();
1636
1731
  for (const t in localStorage)
1637
1732
  if (t.startsWith("icon_cache:")) {
@@ -1642,7 +1737,7 @@ const B = new et(), ee = (e, t, a) => {
1642
1737
  setTimeout(() => {
1643
1738
  t.value = a, t.value && (e.value = j.value[t.value]);
1644
1739
  }, 1);
1645
- }, Ne = H(
1740
+ }, De = H(
1646
1741
  "svg",
1647
1742
  { class: "w-4 h-4", viewBox: "0 0 50 50", style: { animation: "rotate 2s linear infinite" } },
1648
1743
  [
@@ -1678,7 +1773,7 @@ const B = new et(), ee = (e, t, a) => {
1678
1773
  }, pt = (e, t) => {
1679
1774
  let a = "";
1680
1775
  return e && (a += `rotate(${e}deg)`), t && (a += " scaleX(-1)"), a;
1681
- }, es = (e, t, a, s) => {
1776
+ }, Zt = (e, t, a, s) => {
1682
1777
  da(e, [], a, s).forEach((o) => t.push(o));
1683
1778
  }, da = (e, t, a, s) => {
1684
1779
  var r, l, u, i, c;
@@ -1698,7 +1793,7 @@ const B = new et(), ee = (e, t, a) => {
1698
1793
  (d.length > 0 || !p.children) && n.push(O);
1699
1794
  }
1700
1795
  return n;
1701
- }, Xe = ga([]), as = () => {
1796
+ }, Xe = ga([]), es = () => {
1702
1797
  Xe.length = 0;
1703
1798
  const e = V();
1704
1799
  let a = Ve().TabActive;
@@ -1723,7 +1818,7 @@ const B = new et(), ee = (e, t, a) => {
1723
1818
  // 不显示错误
1724
1819
  hideErrorToast: !0
1725
1820
  }
1726
- }, ts = ue("hostInfo", {
1821
+ }, as = ue("hostInfo", {
1727
1822
  state: () => ({
1728
1823
  hostInfo: {
1729
1824
  Host: "",
@@ -1745,28 +1840,28 @@ const B = new et(), ee = (e, t, a) => {
1745
1840
  * 加载站点信息
1746
1841
  * @param hostApi 启动配置主机地址
1747
1842
  * @param hostKey 站点信息,默认为当前主域名
1748
- * @param mainOpenApis 宿主机开放接口
1749
1843
  */
1750
- async loadHostInfo(e, t, a) {
1751
- if (a) {
1752
- this._setHostInfo(a.getHostInfo());
1844
+ async loadHostInfo(e, t) {
1845
+ if (B()) {
1846
+ const s = await _e.getHostInfo();
1847
+ this._setHostInfo(s);
1753
1848
  return;
1754
1849
  }
1755
- let s = (e || this.getSiteHostApi()).trim();
1756
- return (!s || s === "/") && (s = window.location.origin), s.endsWith("/") && (s = s.slice(0, -1)), new Promise((n) => {
1757
- Me.SITEHOST_API || (Me.SITEHOST_API = s);
1758
- const o = t || window.location.origin;
1850
+ let a = (e || this.getSiteHostApi()).trim();
1851
+ return (!a || a === "/") && (a = window.location.origin), a.endsWith("/") && (a = a.slice(0, -1)), new Promise((s) => {
1852
+ Me.SITEHOST_API || (Me.SITEHOST_API = a);
1853
+ const n = t || window.location.origin;
1759
1854
  G(dt.host, {
1760
1855
  Query: {
1761
- Host: o
1856
+ Host: n
1762
1857
  }
1763
- }).then((r) => {
1764
- if ((r == null ? void 0 : r.status) === T.SUCCESS && r.data) {
1765
- const l = r.data;
1766
- this._setHostInfo(l);
1858
+ }).then((o) => {
1859
+ if ((o == null ? void 0 : o.status) === T.SUCCESS && o.data) {
1860
+ const r = o.data;
1861
+ this._setHostInfo(r);
1767
1862
  } else
1768
1863
  this._setHostInfo(null);
1769
- n();
1864
+ s();
1770
1865
  });
1771
1866
  });
1772
1867
  },
@@ -1813,100 +1908,7 @@ const B = new et(), ee = (e, t, a) => {
1813
1908
  // storage: localStorage,
1814
1909
  // pick: ['hostInfo'],
1815
1910
  // },
1816
- });
1817
- class ht {
1818
- constructor() {
1819
- this.ensureMicroAppReady();
1820
- }
1821
- /**
1822
- * 确保micro-app环境就绪
1823
- */
1824
- ensureMicroAppReady() {
1825
- if (typeof window > "u")
1826
- throw new Error("MicroAppSDK can only be used in browser environment");
1827
- }
1828
- /**
1829
- * 获取基座API
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 {};
1837
- }
1838
- /**
1839
- * 检查是否在微前端环境中
1840
- */
1841
- isInMicroApp() {
1842
- return !!window.microApp;
1843
- }
1844
- /**
1845
- * API调用包装器
1846
- */
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
- }
1856
- }
1857
- /**
1858
- * 获取应用信息
1859
- */
1860
- async getAppInfo() {
1861
- return this.callMainApi("getAppInfo");
1862
- }
1863
- /**
1864
- * 获取主机信息
1865
- */
1866
- async getHostInfo() {
1867
- return this.callMainApi("getHostInfo");
1868
- }
1869
- /**
1870
- * 获取用户信息
1871
- */
1872
- async getUserInfo() {
1873
- return this.callMainApi("getUserInfo");
1874
- }
1875
- /**
1876
- * 获取授权令牌
1877
- */
1878
- async getToken() {
1879
- return this.callMainApi("getToken");
1880
- }
1881
- /**
1882
- * 用户登录
1883
- */
1884
- async userLogin(t) {
1885
- return this.callMainApi("userLogin", t);
1886
- }
1887
- /**
1888
- * 用户登出
1889
- */
1890
- async userLogout() {
1891
- return this.callMainApi("userLogout");
1892
- }
1893
- /**
1894
- * 主应用推送
1895
- */
1896
- async mainAppPush(t) {
1897
- return this.callMainApi("mainAppPush", t);
1898
- }
1899
- }
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", {
1911
+ }), ts = 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
+ }), ss = /* @__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
+ }), ns = /* @__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
+ }, rs = /* @__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
+ }, os = /* @__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
+ }, is = /* @__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
+ rs as B,
2442
+ os as C,
2443
+ is 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
+ ss as _,
2467
+ ts 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,
2477
- B as ab,
2478
- ss as ac,
2478
+ Ne as aa,
2479
+ W as ab,
2480
+ _e 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
+ ns 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
  };