@skyfox2000/webui 1.4.13 → 1.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/webui.es.js CHANGED
@@ -4,7 +4,7 @@ import { A as vs, U as ms, p as hs } from "./assets/modules/file-upload-CYNi1NsW
4
4
  import { EnvConfig as we } from "@skyfox2000/microbase";
5
5
  import { FrontCache as re, httpPost as Oe, ResStatus as Ae, SERVER_HOST as _a, fieldMapping as oe } from "@skyfox2000/fapi";
6
6
  import he from "vue-m-message";
7
- import { defineComponent as C, createBlock as b, openBlock as m, withModifiers as ae, unref as l, useAttrs as X, withCtx as g, createElementVNode as $, createVNode as w, mergeProps as N, renderSlot as I, normalizeClass as P, toDisplayString as F, createCommentVNode as k, ref as x, provide as ge, watch as T, onMounted as K, createTextVNode as M, inject as ne, resolveDirective as le, withDirectives as Q, computed as J, createElementBlock as S, normalizeStyle as be, createSlots as Le, useSlots as ya, Fragment as R, renderList as z, resolveDynamicComponent as ka, onActivated as wa, shallowRef as Sa, onUnmounted as Ca, withKeys as Se } from "vue";
7
+ import { defineComponent as C, createBlock as b, openBlock as m, withModifiers as ae, unref as l, useAttrs as X, withCtx as g, createElementVNode as I, createVNode as w, mergeProps as N, renderSlot as D, normalizeClass as P, toDisplayString as F, createCommentVNode as k, ref as x, provide as ge, watch as T, onMounted as K, createTextVNode as B, inject as ne, resolveDirective as le, withDirectives as Q, computed as J, createElementBlock as S, normalizeStyle as be, createSlots as Le, useSlots as ya, Fragment as O, renderList as z, resolveDynamicComponent as ka, onActivated as wa, shallowRef as Sa, onUnmounted as Ca, withKeys as Se } from "vue";
8
8
  import "async-validator";
9
9
  import fe from "dayjs";
10
10
  import { Popover as Ta, theme as ze, Drawer as $a, Space as te, Form as Ue, message as Ia, FormItem as Ve, ConfigProvider as Ce, Popconfirm as Da, Button as Ye, DropdownButton as Ea, Menu as xe, MenuItem as _e, Dropdown as ve, Checkbox as Pa, Table as Ke, Tree as Fa, Cascader as Na, DatePicker as Ma, Input as ee, InputPassword as Ba, InputNumber as Ra, RangePicker as Oa, Textarea as Aa, TimePicker as La, Transfer as za, TreeSelect as Ua, LayoutContent as Va } from "ant-design-vue";
@@ -366,14 +366,14 @@ const Xt = async (s, t) => {
366
366
  return a.api || (a.api = o.api), a.authorize === void 0 && (a.authorize = o.authorize), e.isGridLoading.value = !0, Oe(a, f).then((r) => {
367
367
  if (e.isGridLoading.value = !1, (r == null ? void 0 : r.status) === Ae.SUCCESS) {
368
368
  if (r.data) {
369
- const c = r.data.map((O) => {
370
- const _ = { ...O };
369
+ const c = r.data.map((M) => {
370
+ const _ = { ...M };
371
371
  return p.forEach((E) => {
372
- const B = E.dataIndex || E.key;
373
- B && E.customRender && (_[B] = E.customRender(O[B], O));
372
+ const R = E.dataIndex || E.key;
373
+ R && E.customRender && (_[R] = E.customRender(M[R], M));
374
374
  }), _;
375
- }), y = new i({ fields: d }).parse(c), D = new Blob([`\uFEFF${y}`], { type: "text/csv" });
376
- We(D, u);
375
+ }), y = new i({ fields: d }).parse(c), $ = new Blob([`\uFEFF${y}`], { type: "text/csv" });
376
+ We($, u);
377
377
  }
378
378
  } else if ((r == null ? void 0 : r.errno) == Xe) {
379
379
  Ee().logout(!1);
@@ -408,14 +408,14 @@ const Xt = async (s, t) => {
408
408
  placement: e.placement ?? "topRight"
409
409
  }, {
410
410
  content: g(() => [
411
- I(e.$slots, "default", {}, () => [
412
- $("div", {
411
+ D(e.$slots, "default", {}, () => [
412
+ I("div", {
413
413
  class: P(["text-[14px]", [e.maxWidth]])
414
414
  }, F(e.text), 3)
415
415
  ])
416
416
  ]),
417
417
  default: g(() => [
418
- $("span", tt, [
418
+ I("span", tt, [
419
419
  w(U, N({
420
420
  icon: "icon-question-circle",
421
421
  class: ["text-[#888]", [e.size ? "w-" + e.size + " h-" + e.size : "w-5 h-5"]]
@@ -500,8 +500,8 @@ const Xt = async (s, t) => {
500
500
  onClose: d
501
501
  }, {
502
502
  extra: g(() => [
503
- I(o.$slots, "extra", {}, () => [
504
- $("div", st, [
503
+ D(o.$slots, "extra", {}, () => [
504
+ I("div", st, [
505
505
  w(l(U), {
506
506
  class: "top-[-2px] left-[2px] w-6 h-6",
507
507
  icon: "icon-new",
@@ -516,10 +516,10 @@ const Xt = async (s, t) => {
516
516
  ])
517
517
  ]),
518
518
  default: g(() => [
519
- I(o.$slots, "default")
519
+ D(o.$slots, "default")
520
520
  ]),
521
521
  footer: g(() => [
522
- I(o.$slots, "footer", {}, () => [
522
+ D(o.$slots, "footer", {}, () => [
523
523
  w(l(te), null, {
524
524
  default: g(() => [
525
525
  o.cancelText !== "" ? (m(), b(l(A), {
@@ -527,7 +527,7 @@ const Xt = async (s, t) => {
527
527
  onClick: d
528
528
  }, {
529
529
  default: g(() => [
530
- M(F(o.cancelText ?? "取消"), 1)
530
+ B(F(o.cancelText ?? "取消"), 1)
531
531
  ]),
532
532
  _: 1
533
533
  })) : k("", !0),
@@ -538,7 +538,7 @@ const Xt = async (s, t) => {
538
538
  loading: l(i).isFormSaving.value
539
539
  }, {
540
540
  default: g(() => [
541
- M(F(o.saveAsText ?? "另存为"), 1)
541
+ B(F(o.saveAsText ?? "另存为"), 1)
542
542
  ]),
543
543
  _: 1
544
544
  }, 8, ["loading"])) : k("", !0),
@@ -549,7 +549,7 @@ const Xt = async (s, t) => {
549
549
  loading: l(i).isFormSaving.value
550
550
  }, {
551
551
  default: g(() => [
552
- M(F(o.saveText ?? "保存"), 1)
552
+ B(F(o.saveText ?? "保存"), 1)
553
553
  ]),
554
554
  _: 1
555
555
  }, 8, ["loading"])) : k("", !0)
@@ -583,7 +583,7 @@ const Xt = async (s, t) => {
583
583
  }
584
584
  }, {
585
585
  default: g(() => [
586
- I(a.$slots, "default")
586
+ D(a.$slots, "default")
587
587
  ]),
588
588
  _: 3
589
589
  }, 8, ["label-col", "wrapper-col"])), [
@@ -639,19 +639,19 @@ const Xt = async (s, t) => {
639
639
  class: ["relative", [o.nextLine ? "mb-0" : o.rule ? "" : "mb-3"]]
640
640
  }, l(e)), {
641
641
  label: g(() => [
642
- $("span", {
642
+ I("span", {
643
643
  class: P([l(i).errClass ? "text-[#ff4d4f]" : "", "w-full"])
644
644
  }, F(o.label), 3)
645
645
  ]),
646
646
  default: g(() => [
647
- $("div", {
647
+ I("div", {
648
648
  class: P(["flex items-center", o.width ? o.width : "w-full"])
649
649
  }, [
650
650
  o.nextLine ? k("", !0) : (m(), S("div", rt, [
651
- I(o.$slots, "default")
651
+ D(o.$slots, "default")
652
652
  ])),
653
- $("div", ot, [
654
- I(o.$slots, "helper", {}, () => [
653
+ I("div", ot, [
654
+ D(o.$slots, "helper", {}, () => [
655
655
  o.helper ? (m(), b(l(lt), {
656
656
  key: 0,
657
657
  text: o.helper
@@ -666,7 +666,7 @@ const Xt = async (s, t) => {
666
666
  key: 1,
667
667
  class: P(["w-[95%] flex items-center relative", [o.nextLine ? o.rule ? "mb-7" : "mb-3" : ""]])
668
668
  }, [
669
- I(o.$slots, "default")
669
+ D(o.$slots, "default")
670
670
  ], 2)) : k("", !0),
671
671
  l(i).errClass ? (m(), S("span", {
672
672
  key: 2,
@@ -697,9 +697,9 @@ const Xt = async (s, t) => {
697
697
  labelCol: { span: 6 }
698
698
  }), Le({
699
699
  default: g(() => [
700
- $("div", it, [
701
- $("div", ct, [
702
- I(i.$slots, "default")
700
+ I("div", it, [
701
+ I("div", ct, [
702
+ D(i.$slots, "default")
703
703
  ])
704
704
  ])
705
705
  ]),
@@ -708,7 +708,7 @@ const Xt = async (s, t) => {
708
708
  i.label ? {
709
709
  name: "label",
710
710
  fn: g(() => [
711
- $("span", {
711
+ I("span", {
712
712
  class: P([l(n).errClass ? "text-[#ff4d4f]" : "", "w-full"])
713
713
  }, F(i.label), 3)
714
714
  ]),
@@ -785,8 +785,8 @@ const Xt = async (s, t) => {
785
785
  class: "flex mb-[10px]"
786
786
  }, {
787
787
  default: g(() => [
788
- I(c.$slots, "default"),
789
- c.gridCtrl.searchBar ? I(c.$slots, "control", { key: 0 }) : k("", !0),
788
+ D(c.$slots, "default"),
789
+ c.gridCtrl.searchBar ? D(c.$slots, "control", { key: 0 }) : k("", !0),
790
790
  n.value >= 1 ? (m(), b(pe, {
791
791
  key: 1,
792
792
  class: "w-1/3"
@@ -809,7 +809,7 @@ const Xt = async (s, t) => {
809
809
  icon: "icon-search"
810
810
  }, {
811
811
  default: g(() => h[0] || (h[0] = [
812
- M("搜索")
812
+ B("搜索")
813
813
  ])),
814
814
  _: 1,
815
815
  __: [0]
@@ -819,7 +819,7 @@ const Xt = async (s, t) => {
819
819
  icon: "icon-reset"
820
820
  }, {
821
821
  default: g(() => h[1] || (h[1] = [
822
- M("重置")
822
+ B("重置")
823
823
  ])),
824
824
  _: 1,
825
825
  __: [1]
@@ -890,7 +890,7 @@ const Xt = async (s, t) => {
890
890
  default: g(() => [
891
891
  w(l(te), null, {
892
892
  default: g(() => [
893
- (m(!0), S(R, null, z(l(i), (r) => (m(), S(R, {
893
+ (m(!0), S(O, null, z(l(i), (r) => (m(), S(O, {
894
894
  key: r.key
895
895
  }, [
896
896
  l(G)(r, t.record) ? (m(), b(l(Da), {
@@ -916,7 +916,7 @@ const Xt = async (s, t) => {
916
916
  })
917
917
  }, {
918
918
  default: g(() => [
919
- M(F(r.label), 1)
919
+ B(F(r.label), 1)
920
920
  ]),
921
921
  _: 2
922
922
  }, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
@@ -938,7 +938,7 @@ const Xt = async (s, t) => {
938
938
  overlay: g(() => [
939
939
  w(l(xe), null, {
940
940
  default: g(() => [
941
- (m(!0), S(R, null, z(l(u), (r) => (m(), S(R, {
941
+ (m(!0), S(O, null, z(l(u), (r) => (m(), S(O, {
942
942
  key: r.key
943
943
  }, [
944
944
  l(G)(r, t.record) ? Q((m(), b(l(_e), {
@@ -947,7 +947,7 @@ const Xt = async (s, t) => {
947
947
  onClick: (v) => l(V)(r, l(e).page, l(e), t.record)
948
948
  }, {
949
949
  default: g(() => [
950
- M(F(r.label), 1)
950
+ B(F(r.label), 1)
951
951
  ]),
952
952
  _: 2
953
953
  }, 1032, ["disabled", "onClick"])), [
@@ -959,7 +959,7 @@ const Xt = async (s, t) => {
959
959
  })
960
960
  ]),
961
961
  default: g(() => [
962
- o[0] || (o[0] = M(" 更多 "))
962
+ o[0] || (o[0] = B(" 更多 "))
963
963
  ]),
964
964
  _: 1,
965
965
  __: [0]
@@ -1000,7 +1000,7 @@ const Xt = async (s, t) => {
1000
1000
  e.columns.value.splice(0, e.columns.value.length, ...i.value), n.setTableColumns(ce.currentRoute.value.path, e.columns.value);
1001
1001
  };
1002
1002
  return (p, d) => (m(), S("div", pt, [
1003
- (m(!0), S(R, null, z(l(a), (o, f) => (m(), S(R, {
1003
+ (m(!0), S(O, null, z(l(a), (o, f) => (m(), S(O, {
1004
1004
  key: o.key
1005
1005
  }, [
1006
1006
  l(G)(o) && o.dropdown ? (m(), b(l(ve), {
@@ -1009,7 +1009,7 @@ const Xt = async (s, t) => {
1009
1009
  class: "p-0 rounded-none"
1010
1010
  }, {
1011
1011
  overlay: g(() => [
1012
- $("div", {
1012
+ I("div", {
1013
1013
  class: P(["min-w-[100px] bg-white rounded shadow-md p-4", o.dropdownClass])
1014
1014
  }, [
1015
1015
  o.dropdown === "headset" ? (m(), b(l(Ya), {
@@ -1021,13 +1021,13 @@ const Xt = async (s, t) => {
1021
1021
  handle: ".drag-handle"
1022
1022
  }, {
1023
1023
  default: g(() => [
1024
- (m(!0), S(R, null, z(i.value, (r) => (m(), S("div", {
1024
+ (m(!0), S(O, null, z(i.value, (r) => (m(), S("div", {
1025
1025
  key: r.name,
1026
1026
  onClick: d[0] || (d[0] = ae(() => {
1027
1027
  }, ["stop"])),
1028
1028
  class: "flex items-center mb-2 last:mb-0 select-none"
1029
1029
  }, [
1030
- d[2] || (d[2] = $("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
1030
+ d[2] || (d[2] = I("span", { class: "drag-handle mr-2 text-gray-400 hover:text-gray-600 cursor-move" }, "⋮⋮", -1)),
1031
1031
  w(l(Pa), {
1032
1032
  checked: r.visible !== !1,
1033
1033
  onChange: ae(
@@ -1039,7 +1039,7 @@ const Xt = async (s, t) => {
1039
1039
  class: "text-gray-700 hover:text-gray-900 select-none"
1040
1040
  }, {
1041
1041
  default: g(() => [
1042
- M(F(r.title), 1)
1042
+ B(F(r.title), 1)
1043
1043
  ]),
1044
1044
  _: 2
1045
1045
  }, 1032, ["checked", "onChange"])
@@ -1098,12 +1098,12 @@ const Xt = async (s, t) => {
1098
1098
  overlay: g(() => [
1099
1099
  w(l(xe), null, {
1100
1100
  default: g(() => [
1101
- (m(!0), S(R, null, z(o.children, (r) => (m(), b(l(_e), {
1101
+ (m(!0), S(O, null, z(o.children, (r) => (m(), b(l(_e), {
1102
1102
  key: r.key,
1103
1103
  disabled: l(H)(r)
1104
1104
  }, {
1105
1105
  default: g(() => [
1106
- M(F(r.label), 1)
1106
+ B(F(r.label), 1)
1107
1107
  ]),
1108
1108
  _: 2
1109
1109
  }, 1032, ["disabled"]))), 128))
@@ -1180,7 +1180,7 @@ const Xt = async (s, t) => {
1180
1180
  return m(), S("div", vt, [
1181
1181
  w(l(te), null, {
1182
1182
  default: g(() => [
1183
- (m(!0), S(R, null, z(p.value, (v) => Q((m(), b(l(A), {
1183
+ (m(!0), S(O, null, z(p.value, (v) => Q((m(), b(l(A), {
1184
1184
  key: v.key,
1185
1185
  type: v.type,
1186
1186
  danger: v.danger,
@@ -1189,7 +1189,7 @@ const Xt = async (s, t) => {
1189
1189
  onClick: (c) => l(V)(v, l(a), l(e))
1190
1190
  }, {
1191
1191
  default: g(() => [
1192
- M(F(v.label), 1)
1192
+ B(F(v.label), 1)
1193
1193
  ]),
1194
1194
  _: 2
1195
1195
  }, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
@@ -1199,13 +1199,13 @@ const Xt = async (s, t) => {
1199
1199
  overlay: g(() => [
1200
1200
  w(l(xe), null, {
1201
1201
  default: g(() => [
1202
- (m(!0), S(R, null, z(d.value, (v) => Q((m(), b(l(_e), {
1202
+ (m(!0), S(O, null, z(d.value, (v) => Q((m(), b(l(_e), {
1203
1203
  key: v.key,
1204
1204
  disabled: l(H)(v),
1205
1205
  onClick: (c) => l(V)(v, l(a), l(e))
1206
1206
  }, {
1207
1207
  default: g(() => [
1208
- M(F(v.label), 1)
1208
+ B(F(v.label), 1)
1209
1209
  ]),
1210
1210
  _: 2
1211
1211
  }, 1032, ["disabled", "onClick"])), [
@@ -1218,7 +1218,7 @@ const Xt = async (s, t) => {
1218
1218
  default: g(() => [
1219
1219
  w(l(A), null, {
1220
1220
  default: g(() => f[0] || (f[0] = [
1221
- M(" 更多操作 ")
1221
+ B(" 更多操作 ")
1222
1222
  ])),
1223
1223
  _: 1,
1224
1224
  __: [0]
@@ -1304,15 +1304,15 @@ const Xt = async (s, t) => {
1304
1304
  return wa(() => {
1305
1305
  v.value && a && (a.reload.value = !0);
1306
1306
  }), K(async () => {
1307
- var c, h;
1308
- ge(j.GridControl, a), a.tableData.value ? (p.value = a.tableData.value, a.total.value = p.value.length, d.value !== !1 && (d.value.total = a.total.value ?? 0)) : a.autoload !== !1 && (a.page && (((c = a.gridUrl) == null ? void 0 : c.url) === a.page.urls.list && (a.remotePage = !1), ((h = a.gridUrl) == null ? void 0 : h.url) === a.page.urls.find && (a.remotePage = !0)), a.remotePage ? p.value = (await ke(a)).rows : p.value = await ra(a)), setTimeout(() => {
1307
+ var c, h, y, $, M;
1308
+ ge(j.GridControl, a), a.page && ((c = a.gridUrl) != null && c.url) && (((h = a.gridUrl) == null ? void 0 : h.url) === ((y = a.page.urls.list) == null ? void 0 : y.url) && (a.remotePage = !1), (($ = a.gridUrl) == null ? void 0 : $.url) === ((M = a.page.urls.find) == null ? void 0 : M.url) && (a.remotePage = !0)), a.tableData.value ? (p.value = a.tableData.value, a.total.value = p.value.length, d.value !== !1 && (d.value.total = a.total.value ?? 0)) : a.autoload !== !1 && (a.remotePage ? p.value = (await ke(a)).rows : p.value = await ra(a)), setTimeout(() => {
1309
1309
  v.value = !0;
1310
1310
  }, 50);
1311
1311
  }), (c, h) => {
1312
- var D, O;
1312
+ var $, M;
1313
1313
  const y = le("auth");
1314
- return m(), S(R, null, [
1315
- (D = l(a).buttons) != null && D.value.length || (O = l(a).tools) != null && O.length ? (m(), b(gt, {
1314
+ return m(), S(O, null, [
1315
+ ($ = l(a).buttons) != null && $.value.length || (M = l(a).tools) != null && M.length ? (m(), b(gt, {
1316
1316
  key: 0,
1317
1317
  "grid-ctrl": l(a),
1318
1318
  "editor-ctrl": l(a).editor
@@ -1331,9 +1331,9 @@ const Xt = async (s, t) => {
1331
1331
  bordered: ""
1332
1332
  }, l(e)), {
1333
1333
  bodyCell: g((_) => {
1334
- var E, B;
1334
+ var E, R;
1335
1335
  return [
1336
- I(c.$slots, "bodyCell", {
1336
+ D(c.$slots, "bodyCell", {
1337
1337
  column: _ == null ? void 0 : _.column,
1338
1338
  record: _ == null ? void 0 : _.record
1339
1339
  }),
@@ -1352,7 +1352,7 @@ const Xt = async (s, t) => {
1352
1352
  }, null, 8, ["checked", "onUpdate:checked", "disabled", "data", "onClick", "class", "loading"])), [
1353
1353
  [y, { url: n.value, role: ["Super", "Admin"], permit: ":enabled" }, "disable"]
1354
1354
  ]) : k("", !0),
1355
- l(a) && ((B = _ == null ? void 0 : _.column) == null ? void 0 : B.dataIndex) === "operation" ? I(c.$slots, "operate", {
1355
+ l(a) && ((R = _ == null ? void 0 : _.column) == null ? void 0 : R.dataIndex) === "operation" ? D(c.$slots, "operate", {
1356
1356
  key: 1,
1357
1357
  record: _ == null ? void 0 : _.record
1358
1358
  }, () => [
@@ -1439,14 +1439,14 @@ const Xt = async (s, t) => {
1439
1439
  onSelect: o
1440
1440
  }, l(a)), {
1441
1441
  title: g(({ key: v, label: c, icon: h }) => [
1442
- I(f.$slots, "title", {
1442
+ D(f.$slots, "title", {
1443
1443
  label: c,
1444
1444
  key: v,
1445
1445
  icon: h
1446
1446
  }, () => [
1447
- $("div", bt, [
1447
+ I("div", bt, [
1448
1448
  w(l(U), { icon: h }, null, 8, ["icon"]),
1449
- $("span", xt, F(c), 1)
1449
+ I("span", xt, F(c), 1)
1450
1450
  ])
1451
1451
  ])
1452
1452
  ]),
@@ -1462,14 +1462,14 @@ const Xt = async (s, t) => {
1462
1462
  props: ua,
1463
1463
  emits: ["change", "update:labels", "update:value"],
1464
1464
  setup(s, { emit: t }) {
1465
- var y, D, O;
1465
+ var y, $, M;
1466
1466
  const e = s, a = X(), n = L(), i = da(e.url, e), u = e.optionCtrl ?? i.optionCtrl;
1467
1467
  u.inputFactory = Sa(n);
1468
1468
  const p = x({
1469
1469
  ...u == null ? void 0 : u.url,
1470
1470
  url: ((y = u == null ? void 0 : u.url) == null ? void 0 : y.url) || "",
1471
- fieldMap: (u == null ? void 0 : u.fieldMap) || ((D = u == null ? void 0 : u.url) == null ? void 0 : D.fieldMap),
1472
- params: (u == null ? void 0 : u.params) || ((O = u == null ? void 0 : u.url) == null ? void 0 : O.params),
1471
+ fieldMap: (u == null ? void 0 : u.fieldMap) || (($ = u == null ? void 0 : u.url) == null ? void 0 : $.fieldMap),
1472
+ params: (u == null ? void 0 : u.params) || ((M = u == null ? void 0 : u.url) == null ? void 0 : M.params),
1473
1473
  loadingText: !1
1474
1474
  }), { editorCtrl: d, errInfo: o, labelText: f } = n, r = x(a.placeholder);
1475
1475
  T(
@@ -1494,8 +1494,8 @@ const Xt = async (s, t) => {
1494
1494
  v("update:labels", []), v("update:value", []);
1495
1495
  return;
1496
1496
  }
1497
- const B = E.map((Je) => Je.value), se = ma(u, e, B), Ge = ha(se);
1498
- v("update:labels", Ge), v("update:value", B), o != null && o.value.errClass && d && Y(d);
1497
+ const R = E.map((Je) => Je.value), se = ma(u, e, R), Ge = ha(se);
1498
+ v("update:labels", Ge), v("update:value", R), o != null && o.value.errClass && d && Y(d);
1499
1499
  };
1500
1500
  return K(() => {
1501
1501
  p.value && !p.value.fieldMap && (p.value.fieldMap = {
@@ -1507,15 +1507,15 @@ const Xt = async (s, t) => {
1507
1507
  }), Ca(() => {
1508
1508
  u && fa(u, e);
1509
1509
  }), (_, E) => {
1510
- var B;
1510
+ var R;
1511
1511
  return m(), S("div", _t, [
1512
1512
  c.value.length ? k("", !0) : (m(), S("div", yt, [
1513
1513
  w(l(va), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
1514
- E[0] || (E[0] = $("span", null, "数据加载中...", -1))
1514
+ E[0] || (E[0] = I("span", null, "数据加载中...", -1))
1515
1515
  ])),
1516
1516
  w(l(Na), N({
1517
1517
  options: c.value,
1518
- class: [(B = l(o)) == null ? void 0 : B.errClass],
1518
+ class: [(R = l(o)) == null ? void 0 : R.errClass],
1519
1519
  "allow-clear": !0,
1520
1520
  placeholder: c.value.length > 0 ? "请选择" + l(f) : "",
1521
1521
  onChange: h
@@ -1648,14 +1648,14 @@ const fl = /* @__PURE__ */ C({
1648
1648
  r.$slots.addonBefore ? {
1649
1649
  name: "addonBefore",
1650
1650
  fn: g(() => [
1651
- I(r.$slots, "addonBefore")
1651
+ D(r.$slots, "addonBefore")
1652
1652
  ]),
1653
1653
  key: "0"
1654
1654
  } : void 0,
1655
1655
  r.$slots.addonAfter ? {
1656
1656
  name: "addonAfter",
1657
1657
  fn: g(() => [
1658
- I(r.$slots, "addonAfter")
1658
+ D(r.$slots, "addonAfter")
1659
1659
  ]),
1660
1660
  key: "1"
1661
1661
  } : void 0
@@ -1778,11 +1778,11 @@ const fl = /* @__PURE__ */ C({
1778
1778
  d();
1779
1779
  };
1780
1780
  return (r, v) => (m(), S("div", $t, [
1781
- (m(!0), S(R, null, z(i.value, (c) => (m(), S("div", {
1781
+ (m(!0), S(O, null, z(i.value, (c) => (m(), S("div", {
1782
1782
  key: c.id,
1783
1783
  class: "flex items-center gap-2"
1784
1784
  }, [
1785
- $("div", {
1785
+ I("div", {
1786
1786
  class: P([r.fieldWidth ? `w-[${r.fieldWidth}%]` : "w-[33%]"])
1787
1787
  }, [
1788
1788
  !r.selectList || r.selectList.length === 0 ? (m(), b(l(ee), {
@@ -1809,8 +1809,8 @@ const fl = /* @__PURE__ */ C({
1809
1809
  }, null, 8, ["value", "onUpdate:value"])
1810
1810
  ]))
1811
1811
  ], 2),
1812
- v[0] || (v[0] = $("div", { class: "w-[3%]" }, "=", -1)),
1813
- $("div", {
1812
+ v[0] || (v[0] = I("div", { class: "w-[3%]" }, "=", -1)),
1813
+ I("div", {
1814
1814
  class: P([r.fieldWidth ? `w-[${97 - r.fieldWidth}%]` : "w-[64%]"])
1815
1815
  }, [
1816
1816
  w(l(ee), {
@@ -1829,7 +1829,7 @@ const fl = /* @__PURE__ */ C({
1829
1829
  size: "small"
1830
1830
  }, {
1831
1831
  default: g(() => v[1] || (v[1] = [
1832
- M(" 新增配置行 ")
1832
+ B(" 新增配置行 ")
1833
1833
  ])),
1834
1834
  _: 1,
1835
1835
  __: [1]
@@ -1989,12 +1989,12 @@ const fl = /* @__PURE__ */ C({
1989
1989
  targetKeys: o.value,
1990
1990
  onChange: f
1991
1991
  }, r.$attrs), {
1992
- children: g(({ direction: h, disabled: y, filteredItems: D, onItemSelectAll: O, onItemSelect: _, selectedKeys: E }) => [
1993
- I(r.$slots, "children", {
1992
+ children: g(({ direction: h, disabled: y, filteredItems: $, onItemSelectAll: M, onItemSelect: _, selectedKeys: E }) => [
1993
+ D(r.$slots, "children", {
1994
1994
  direction: h,
1995
1995
  disabled: y,
1996
- filteredItems: D,
1997
- onItemSelectAll: O,
1996
+ filteredItems: $,
1997
+ onItemSelectAll: M,
1998
1998
  onItemSelect: _,
1999
1999
  selectedKeys: E
2000
2000
  })
@@ -2048,7 +2048,7 @@ const fl = /* @__PURE__ */ C({
2048
2048
  disabled: o || c.disabled
2049
2049
  }),
2050
2050
  onSelectAll(c, h) {
2051
- const y = h.filter((D) => !D.disabled).map(({ [u.value]: D }) => D);
2051
+ const y = h.filter(($) => !$.disabled).map(({ [u.value]: $ }) => $);
2052
2052
  r(y, c);
2053
2053
  },
2054
2054
  onSelect({ [u.value]: c }, h) {
@@ -2100,8 +2100,8 @@ const fl = /* @__PURE__ */ C({
2100
2100
  scroll: { x: 300 },
2101
2101
  "custom-row": (y) => ({
2102
2102
  onClick: () => {
2103
- const D = y[u.value];
2104
- c(D, !h.includes(D));
2103
+ const $ = y[u.value];
2104
+ c($, !h.includes($));
2105
2105
  }
2106
2106
  })
2107
2107
  }, null, 8, ["columns", "row-key", "row-selection", "data-source", "custom-row"])
@@ -2178,7 +2178,7 @@ const fl = /* @__PURE__ */ C({
2178
2178
  multiple: s.multiple,
2179
2179
  "tree-default-expanded-keys": ["-"],
2180
2180
  value: f.value,
2181
- "onUpdate:value": h[0] || (h[0] = (D) => f.value = D),
2181
+ "onUpdate:value": h[0] || (h[0] = ($) => f.value = $),
2182
2182
  "tree-data": o.value,
2183
2183
  placeholder: "请选择" + l(p),
2184
2184
  onChange: r,
@@ -2204,12 +2204,12 @@ const fl = /* @__PURE__ */ C({
2204
2204
  })
2205
2205
  }, {
2206
2206
  default: g(() => [
2207
- $("div", Nt, [
2207
+ I("div", Nt, [
2208
2208
  a.left ? (m(), S("div", Mt, [
2209
- I(a.$slots, "left")
2209
+ D(a.$slots, "left")
2210
2210
  ])) : k("", !0),
2211
- $("div", Bt, [
2212
- I(a.$slots, "default")
2211
+ I("div", Bt, [
2212
+ D(a.$slots, "default")
2213
2213
  ])
2214
2214
  ])
2215
2215
  ]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyfox2000/webui",
3
- "version": "1.4.13",
3
+ "version": "1.4.14",
4
4
  "description": "后台前端通用组件定义",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -173,6 +173,15 @@ onActivated(() => {
173
173
  onMounted(async () => {
174
174
  provide(ProviderKeys.GridControl, gridCtrl);
175
175
 
176
+ if (gridCtrl.page && gridCtrl.gridUrl?.url) {
177
+ if (gridCtrl.gridUrl?.url === gridCtrl.page.urls.list?.url) {
178
+ gridCtrl.remotePage = false;
179
+ }
180
+ if (gridCtrl.gridUrl?.url === gridCtrl.page.urls.find?.url) {
181
+ gridCtrl.remotePage = true;
182
+ }
183
+ }
184
+
176
185
  if (gridCtrl.tableData.value) {
177
186
  dataList.value = gridCtrl.tableData.value;
178
187
  gridCtrl.total.value = dataList.value.length;
@@ -180,14 +189,6 @@ onMounted(async () => {
180
189
  pagination.value.total = gridCtrl.total.value ?? 0;
181
190
  }
182
191
  } else if (gridCtrl.autoload !== false) {
183
- if (gridCtrl.page) {
184
- if (gridCtrl.gridUrl?.url === gridCtrl.page.urls.list) {
185
- gridCtrl.remotePage = false;
186
- }
187
- if (gridCtrl.gridUrl?.url === gridCtrl.page.urls.find) {
188
- gridCtrl.remotePage = true;
189
- }
190
- }
191
192
  if (gridCtrl.remotePage) {
192
193
  dataList.value = (await gridQueryFind(gridCtrl)).rows;
193
194
  } else {