@antsoo-lib/core 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { inject as Lt, ref as Q, h as Ne, getCurrentInstance as fr, nextTick as re, reactive as Qe, defineComponent as Te, createVNode as V, createTextVNode as oe, markRaw as J, mergeProps as N, computed as W, isVNode as Gt, readonly as dr, watch as Re, openBlock as z, createElementBlock as ie, unref as Y, withCtx as L, Fragment as be, renderList as Oe, withDirectives as Ht, createBlock as ee, resolveDynamicComponent as Be, createElementVNode as te, toDisplayString as Ee, createCommentVNode as ue, vShow as Wt, renderSlot as je, normalizeClass as gr, createSlots as Nt, resolveComponent as vr, withModifiers as bt, normalizeProps as yr, toHandlers as hr } from "vue";
2
- import { Button as Pe, Checkbox as br, CheckboxGroup as Cr, RangePicker as kr, DatePicker as Ar, MenuItem as xr, Menu as wr, Dropdown as Vr, Select as Ke, Textarea as Or, Input as Kt, Row as Qt, Col as st, InputGroup as Pr, InputNumber as Tr, InputPassword as Fr, Form as lt, RadioGroup as Er, Switch as jr, Tree as Br, TreeSelect as Ir, FormItem as Ct, FormItemRest as Dr, Tooltip as Yt, Popover as Zt, Pagination as Jt, SelectOption as _r, Divider as Ur } from "@antsoo-lib/components";
2
+ import { Button as Pe, Checkbox as br, CheckboxGroup as Cr, RangePicker as kr, DatePicker as Ar, MenuItem as xr, Menu as wr, Dropdown as Vr, Select as Ke, Textarea as Or, Input as Kt, Row as Qt, Col as st, InputGroup as Pr, InputNumber as Tr, InputPassword as Fr, Form as lt, RadioGroup as Er, Switch as jr, Tree as Br, TreeSelect as Ir, FormItem as Ct, FormItemRest as Dr, Tooltip as Yt, Popover as Zt, Pagination as Jt, SelectOption as Ur, Divider as _r } from "@antsoo-lib/components";
3
3
  import { isFunction as K, isEmpty as Rr, isArray as kt, isObject as $r, env as Mr, generateUniqueId as zr, isNaN as Sr } from "@antsoo-lib/utils";
4
4
  import { isEqual as ut, isBoolean as qr, isFunction as Xe, cloneDeep as At, debounce as Lr } from "lodash-es";
5
5
  import { rangePresets as Gr, PRECISION as de } from "@antsoo-lib/shared";
@@ -1022,7 +1022,7 @@ var wt = {
1022
1022
  yellow: "#ffff00",
1023
1023
  yellowgreen: "#9acd32"
1024
1024
  };
1025
- function _e(e) {
1025
+ function Ue(e) {
1026
1026
  var t = { r: 0, g: 0, b: 0 }, r = 1, o = null, n = null, i = null, u = !1, l = !1;
1027
1027
  return typeof e == "string" && (e = no(e)), typeof e == "object" && (ve(e.r) && ve(e.g) && ve(e.b) ? (t = Zr(e.r, e.g, e.b), u = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ve(e.h) && ve(e.s) && ve(e.v) ? (o = qe(e.s), n = qe(e.v), t = eo(e.h, o, n), u = !0, l = "hsv") : ve(e.h) && ve(e.s) && ve(e.l) && (o = qe(e.s), i = qe(e.l), t = Jr(e.h, o, i), u = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = Yr(r), {
1028
1028
  ok: u,
@@ -1148,8 +1148,8 @@ function Ft(e, t, r) {
1148
1148
  return r ? o = e.v + ao * t : o = e.v - so * t, o > 1 && (o = 1), Number(o.toFixed(2));
1149
1149
  }
1150
1150
  function pt(e) {
1151
- for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], o = _e(e), n = Xt; n > 0; n -= 1) {
1152
- var i = Ot(o), u = Ge(_e({
1151
+ for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], o = Ue(e), n = Xt; n > 0; n -= 1) {
1152
+ var i = Ot(o), u = Ge(Ue({
1153
1153
  h: Pt(i, n, !0),
1154
1154
  s: Tt(i, n, !0),
1155
1155
  v: Ft(i, n, !0)
@@ -1158,7 +1158,7 @@ function pt(e) {
1158
1158
  }
1159
1159
  r.push(Ge(o));
1160
1160
  for (var l = 1; l <= er; l += 1) {
1161
- var p = Ot(o), a = Ge(_e({
1161
+ var p = Ot(o), a = Ge(Ue({
1162
1162
  h: Pt(p, l),
1163
1163
  s: Tt(p, l),
1164
1164
  v: Ft(p, l)
@@ -1166,7 +1166,7 @@ function pt(e) {
1166
1166
  r.push(a);
1167
1167
  }
1168
1168
  return t.theme === "dark" ? lo.map(function(s) {
1169
- var m = s.index, g = s.opacity, d = Ge(uo(_e(t.backgroundColor || "#141414"), _e(r[m]), g * 100));
1169
+ var m = s.index, g = s.opacity, d = Ge(uo(Ue(t.backgroundColor || "#141414"), Ue(r[m]), g * 100));
1170
1170
  return d;
1171
1171
  }) : r;
1172
1172
  }
@@ -1454,7 +1454,7 @@ ke.displayName = "IconBase";
1454
1454
  ke.getTwoToneColors = jo;
1455
1455
  ke.setTwoToneColors = Eo;
1456
1456
  function Bo(e, t) {
1457
- return Uo(e) || _o(e, t) || Do(e, t) || Io();
1457
+ return _o(e) || Uo(e, t) || Do(e, t) || Io();
1458
1458
  }
1459
1459
  function Io() {
1460
1460
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -1474,7 +1474,7 @@ function It(e, t) {
1474
1474
  o[r] = e[r];
1475
1475
  return o;
1476
1476
  }
1477
- function _o(e, t) {
1477
+ function Uo(e, t) {
1478
1478
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1479
1479
  if (r != null) {
1480
1480
  var o = [], n = !0, i = !1, u, l;
@@ -1493,7 +1493,7 @@ function _o(e, t) {
1493
1493
  return o;
1494
1494
  }
1495
1495
  }
1496
- function Uo(e) {
1496
+ function _o(e) {
1497
1497
  if (Array.isArray(e)) return e;
1498
1498
  }
1499
1499
  function lr(e) {
@@ -1558,18 +1558,18 @@ function Lo(e, t) {
1558
1558
  function Go(e) {
1559
1559
  if (Array.isArray(e)) return e;
1560
1560
  }
1561
- function _t(e) {
1561
+ function Ut(e) {
1562
1562
  for (var t = 1; t < arguments.length; t++) {
1563
1563
  var r = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(r);
1564
1564
  typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(r).filter(function(n) {
1565
1565
  return Object.getOwnPropertyDescriptor(r, n).enumerable;
1566
1566
  }))), o.forEach(function(n) {
1567
- Ue(e, n, r[n]);
1567
+ _e(e, n, r[n]);
1568
1568
  });
1569
1569
  }
1570
1570
  return e;
1571
1571
  }
1572
- function Ue(e, t, r) {
1572
+ function _e(e, t, r) {
1573
1573
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
1574
1574
  }
1575
1575
  function Ho(e, t) {
@@ -1591,13 +1591,13 @@ function Wo(e, t) {
1591
1591
  }
1592
1592
  lr(po.primary);
1593
1593
  var Ae = function(t, r) {
1594
- var o, n = _t({}, t, r.attrs), i = n.class, u = n.icon, l = n.spin, p = n.rotate, a = n.tabindex, s = n.twoToneColor, m = n.onClick, g = Ho(n, Mo), d = tr(), f = d.prefixCls, c = d.rootClassName, b = (o = {}, Ue(o, c.value, !!c.value), Ue(o, f.value, !0), Ue(o, "".concat(f.value, "-").concat(u.name), !!u.name), Ue(o, "".concat(f.value, "-spin"), !!l || u.name === "loading"), o), x = a;
1594
+ var o, n = Ut({}, t, r.attrs), i = n.class, u = n.icon, l = n.spin, p = n.rotate, a = n.tabindex, s = n.twoToneColor, m = n.onClick, g = Ho(n, Mo), d = tr(), f = d.prefixCls, c = d.rootClassName, b = (o = {}, _e(o, c.value, !!c.value), _e(o, f.value, !0), _e(o, "".concat(f.value, "-").concat(u.name), !!u.name), _e(o, "".concat(f.value, "-spin"), !!l || u.name === "loading"), o), x = a;
1595
1595
  x === void 0 && m && (x = -1);
1596
1596
  var I = p ? {
1597
1597
  msTransform: "rotate(".concat(p, "deg)"),
1598
1598
  transform: "rotate(".concat(p, "deg)")
1599
1599
  } : void 0, P = ar(s), k = zo(P, 2), y = k[0], A = k[1];
1600
- return V("span", _t({
1600
+ return V("span", Ut({
1601
1601
  role: "img",
1602
1602
  "aria-label": u.name
1603
1603
  }, g, {
@@ -1621,7 +1621,7 @@ Ae.displayName = "AntdIcon";
1621
1621
  Ae.inheritAttrs = !1;
1622
1622
  Ae.getTwoToneColor = Ro;
1623
1623
  Ae.setTwoToneColor = lr;
1624
- function Ut(e) {
1624
+ function _t(e) {
1625
1625
  for (var t = 1; t < arguments.length; t++) {
1626
1626
  var r = arguments[t] != null ? Object(arguments[t]) : {}, o = Object.keys(r);
1627
1627
  typeof Object.getOwnPropertySymbols == "function" && (o = o.concat(Object.getOwnPropertySymbols(r).filter(function(n) {
@@ -1636,8 +1636,8 @@ function No(e, t, r) {
1636
1636
  return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
1637
1637
  }
1638
1638
  var vt = function(t, r) {
1639
- var o = Ut({}, t, r.attrs);
1640
- return V(Ae, Ut({}, o, {
1639
+ var o = _t({}, t, r.attrs);
1640
+ return V(Ae, _t({}, o, {
1641
1641
  icon: Wr
1642
1642
  }), null);
1643
1643
  };
@@ -2844,8 +2844,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2844
2844
  let C = w.props?.value;
2845
2845
  if (C === void 0) return;
2846
2846
  const B = w.props?.valueFormat, H = (O) => B && O && typeof O.format == "function" ? O.format(B) : O;
2847
- Array.isArray(C) ? C = C.map(H).filter((O) => O != null && O !== "") : C = H(C), w.key ? h[w.key] === void 0 && (C !== void 0 && (!Array.isArray(C) || C.length > 0) ? h[w.key] = C : (w.type === "select" || w.type === "sselectPage") && (w.props?.mode === "multiple" || w.props?.mode === "tags") ? h[w.key] = [] : w.type === "checkboxGroup" || w.type === "upload" ? h[w.key] = [] : w.type === "treeSelect" && (w.props?.multiple || w.props?.treeCheckable) && (h[w.key] = [])) : Array.isArray(w.attr) && w.attr.forEach((O, _) => {
2848
- O && h[O] === void 0 && (h[O] = Array.isArray(C) ? C[_] : C);
2847
+ Array.isArray(C) ? C = C.map(H).filter((O) => O != null && O !== "") : C = H(C), w.key ? h[w.key] === void 0 && (C !== void 0 && (!Array.isArray(C) || C.length > 0) ? h[w.key] = C : (w.type === "select" || w.type === "sselectPage") && (w.props?.mode === "multiple" || w.props?.mode === "tags") ? h[w.key] = [] : w.type === "checkboxGroup" || w.type === "upload" ? h[w.key] = [] : w.type === "treeSelect" && (w.props?.multiple || w.props?.treeCheckable) && (h[w.key] = [])) : Array.isArray(w.attr) && w.attr.forEach((O, U) => {
2848
+ O && h[O] === void 0 && (h[O] = Array.isArray(C) ? C[U] : C);
2849
2849
  });
2850
2850
  }), s.value = { ...h }, Object.keys(s.value).forEach((w) => {
2851
2851
  g.setValue(w, s.value[w]);
@@ -2873,7 +2873,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2873
2873
  Xe(w) && (w = w(s.value, g, h)), w || (w = {});
2874
2874
  let C = { ...h, props: w };
2875
2875
  if (h.commonCode && h.type === "select") {
2876
- const _ = (m ? m.getCodesByType(h.commonCode) : []).map((Z) => ({
2876
+ const U = (m ? m.getCodesByType(h.commonCode) : []).map((Z) => ({
2877
2877
  label: Z.name,
2878
2878
  value: Z.code
2879
2879
  }));
@@ -2881,21 +2881,21 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2881
2881
  ...C,
2882
2882
  props: {
2883
2883
  ...C.props,
2884
- options: _
2884
+ options: U
2885
2885
  }
2886
2886
  };
2887
2887
  }
2888
2888
  const B = () => {
2889
- const O = h.key !== void 0 && h.key !== "", _ = !!C.attr;
2890
- if (O && !_) {
2889
+ const O = h.key !== void 0 && h.key !== "", U = !!C.attr;
2890
+ if (O && !U) {
2891
2891
  const Z = s.value[h.key];
2892
2892
  return Z !== void 0 ? Z : C.props?.value;
2893
2893
  }
2894
- if (!O && _) {
2894
+ if (!O && U) {
2895
2895
  const Z = C.attr;
2896
2896
  return qt(s.value, Z);
2897
2897
  }
2898
- if (O && _) {
2898
+ if (O && U) {
2899
2899
  if (C.type === "areaCascader") {
2900
2900
  const v = qt(s.value, C.attr);
2901
2901
  if (v !== void 0) return v;
@@ -2919,7 +2919,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2919
2919
  // 注意:不要在最终 events 对象中再次展开这两个键,否则会覆盖拦截器
2920
2920
  ...(() => {
2921
2921
  const { events: O = {} } = C, {
2922
- "onUpdate:value": _,
2922
+ "onUpdate:value": U,
2923
2923
  onChange: Z,
2924
2924
  ...v
2925
2925
  } = O;
@@ -2927,13 +2927,13 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2927
2927
  })(),
2928
2928
  // 添加默认的值更新事件(组件中立):支持 key 存储或按 attr 映射拆分
2929
2929
  "onUpdate:value": (O) => {
2930
- const _ = C.attr;
2931
- if (_) {
2932
- if (Array.isArray(_)) {
2933
- const v = O && typeof O == "object" && !Array.isArray(O), U = Array.isArray(O);
2934
- if (_.forEach((T, F) => {
2930
+ const U = C.attr;
2931
+ if (U) {
2932
+ if (Array.isArray(U)) {
2933
+ const v = O && typeof O == "object" && !Array.isArray(O), _ = Array.isArray(O);
2934
+ if (U.forEach((T, F) => {
2935
2935
  if (!T) return;
2936
- const $ = U ? O[F] : v ? O[T] : void 0;
2936
+ const $ = _ ? O[F] : v ? O[T] : void 0;
2937
2937
  s.value[T] = $, g.setValue(T, $);
2938
2938
  }), h.events?.["onUpdate:value"])
2939
2939
  try {
@@ -2942,9 +2942,9 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2942
2942
  console.warn("onUpdate:value user handler error:", T);
2943
2943
  }
2944
2944
  return;
2945
- } else if (typeof _ == "object" && (Array.isArray(_.ids) || Array.isArray(_.names))) {
2946
- const v = O && typeof O == "object" && !Array.isArray(O), U = Array.isArray(_?.ids) ? _.ids : [], T = Array.isArray(_?.names) ? _.names : [];
2947
- if (U.forEach((F, $) => {
2945
+ } else if (typeof U == "object" && (Array.isArray(U.ids) || Array.isArray(U.names))) {
2946
+ const v = O && typeof O == "object" && !Array.isArray(O), _ = Array.isArray(U?.ids) ? U.ids : [], T = Array.isArray(U?.names) ? U.names : [];
2947
+ if (_.forEach((F, $) => {
2948
2948
  if (!F) return;
2949
2949
  const ne = v ? O[F] : Array.isArray(O) ? O[$] : void 0;
2950
2950
  s.value[F] = ne, g.setValue(F, ne);
@@ -2966,7 +2966,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2966
2966
  Z && Z(O, s.value, g);
2967
2967
  },
2968
2968
  // 新增:通用 onChange 事件拦截,用于对象映射(特别是 SselectPage)根据 option 写入 formData
2969
- onChange: (O, _, Z) => {
2969
+ onChange: (O, U, Z) => {
2970
2970
  const v = C.type !== "upload";
2971
2971
  if (C.type === "input") {
2972
2972
  let F;
@@ -2975,13 +2975,13 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
2975
2975
  C.key && (s.value[C.key] = $, g.setValue(C.key, $)), O = $;
2976
2976
  }
2977
2977
  }
2978
- const U = C.attr;
2979
- if (U && typeof U == "object" && !Array.isArray(U))
2978
+ const _ = C.attr;
2979
+ if (_ && typeof _ == "object" && !Array.isArray(_))
2980
2980
  try {
2981
2981
  const F = Array.isArray(O);
2982
- wn(s.value, g, U, O, _, F);
2982
+ wn(s.value, g, _, O, U, F);
2983
2983
  try {
2984
- const $ = Object.entries(U).filter(
2984
+ const $ = Object.entries(_).filter(
2985
2985
  ([ye, xe]) => typeof xe == "string" && typeof ye == "string" && ye.trim().length > 0
2986
2986
  ).map(([ye]) => ye), ne = C.key ? [C.key] : [], Fe = Array.from(/* @__PURE__ */ new Set([...$, ...ne]));
2987
2987
  Fe.length && v && re(() => {
@@ -3002,7 +3002,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3002
3002
  const T = C?.events?.onChange;
3003
3003
  if (T)
3004
3004
  try {
3005
- T(O, _, Z, s.value, g);
3005
+ T(O, U, Z, s.value, g);
3006
3006
  } catch (F) {
3007
3007
  console.warn("onChange user handler error:", F);
3008
3008
  }
@@ -3034,8 +3034,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3034
3034
  return { success: !1, message: "accessFormFields: 必须提供非空的 keys(字符串或数组)" };
3035
3035
  if (h.operation === "get") {
3036
3036
  const B = {}, H = [];
3037
- for (const _ of C)
3038
- Object.prototype.hasOwnProperty.call(s.value, _) ? B[_] = s.value[_] : H.push(_);
3037
+ for (const U of C)
3038
+ Object.prototype.hasOwnProperty.call(s.value, U) ? B[U] = s.value[U] : H.push(U);
3039
3039
  const O = {
3040
3040
  success: !0,
3041
3041
  operation: "get",
@@ -3049,13 +3049,13 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3049
3049
  if (!B || typeof B != "object")
3050
3050
  return { success: !1, message: "accessFormFields: 写入操作需要提供有效的 values 对象" };
3051
3051
  const H = [], O = [];
3052
- for (const _ of C) {
3053
- if (!Object.prototype.hasOwnProperty.call(B, _)) {
3054
- O.push(_);
3052
+ for (const U of C) {
3053
+ if (!Object.prototype.hasOwnProperty.call(B, U)) {
3054
+ O.push(U);
3055
3055
  continue;
3056
3056
  }
3057
- const Z = B[_];
3058
- s.value[_] = Z, g.setValue(_, Z), H.push(_);
3057
+ const Z = B[U];
3058
+ s.value[U] = Z, g.setValue(U, Z), H.push(U);
3059
3059
  }
3060
3060
  return { success: !0, operation: "set", keys: C, applied: H, skipped: O };
3061
3061
  }
@@ -3352,10 +3352,10 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3352
3352
  ]))
3353
3353
  ], 2));
3354
3354
  }
3355
- }), Bb = /* @__PURE__ */ Ze(Dn, [["__scopeId", "data-v-d0d954f4"]]), _n = {
3355
+ }), Bb = /* @__PURE__ */ Ze(Dn, [["__scopeId", "data-v-d0d954f4"]]), Un = {
3356
3356
  key: 0,
3357
3357
  class: "base-table-toolbar-container"
3358
- }, Un = {
3358
+ }, _n = {
3359
3359
  key: 0,
3360
3360
  class: "base-table-toolbar-container"
3361
3361
  }, Rn = { class: "base-table-buttons-container" }, $n = { class: "base-table-pager" }, Mn = { class: "base-table-pager-total" }, zn = /* @__PURE__ */ Te({
@@ -3396,7 +3396,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3396
3396
  hoverColor: { default: "#E3FCF7" },
3397
3397
  env: {}
3398
3398
  },
3399
- emits: ["pageChange", "pageShowSizeChange", "selectAllChangeEvent", "selectChangeEvent", "radioChangeEvent", "buttonClick"],
3399
+ emits: ["pageChange", "pageShowSizeChange", "selectAllChangeEvent", "selectChangeEvent", "radioChangeEvent", "buttonClick", "sortChange"],
3400
3400
  setup(e, { expose: t, emit: r }) {
3401
3401
  const o = e, n = r, { isDev: i, isTest: u } = o.env || {}, l = i || u, p = Q(), a = Q(), s = Q(10), m = W(() => o.currentPage ?? 1), g = W(() => o.pageSize ?? s.value), d = (E, j) => {
3402
3402
  if (E == null || E === "") return "";
@@ -3416,7 +3416,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3416
3416
  return o.options.id;
3417
3417
  const j = `${location.pathname}::${o.scope || "default"}`;
3418
3418
  return zr(j);
3419
- }), A = W(() => U()), G = W(() => {
3419
+ }), A = W(() => _()), G = W(() => {
3420
3420
  const E = A.value;
3421
3421
  return {
3422
3422
  id: y.value,
@@ -3544,7 +3544,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3544
3544
  function O(E, j) {
3545
3545
  s.value = j, n("pageShowSizeChange", E, j);
3546
3546
  }
3547
- function _({ checked: E }) {
3547
+ function U({ checked: E }) {
3548
3548
  const j = p.value;
3549
3549
  if (j) {
3550
3550
  const q = j.getCheckboxRecords();
@@ -3578,7 +3578,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3578
3578
  });
3579
3579
  }
3580
3580
  }
3581
- function U() {
3581
+ function _() {
3582
3582
  const E = o.columns?.findIndex((D) => !D.type) ?? -1, j = At(o.columns) || [];
3583
3583
  o.seq && j.unshift({
3584
3584
  type: "seq",
@@ -3609,7 +3609,6 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3609
3609
  };
3610
3610
  (l || S.helpText && S.helpText !== !1) && S.type !== "seq" && (S.slots = { ...S.slots, header: S.slots?.header ?? "headerHelp" }, S.params = { ...S.params, helpText: S.helpText || S.field });
3611
3611
  const le = {
3612
- width: "auto",
3613
3612
  minWidth: 80,
3614
3613
  footerAlign: "right",
3615
3614
  footerClassName: "base-table-footer-cell",
@@ -3719,20 +3718,21 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3719
3718
  "--vxe-ui-table-column-hover-background-color": e.hoverColor,
3720
3719
  "--vxe-ui-table-row-hover-striped-background-color": e.hoverColor
3721
3720
  },
3721
+ onSortChange: j[0] || (j[0] = (D) => n("sortChange", D)),
3722
3722
  onCellClick: cr,
3723
- onCheckboxAll: _,
3723
+ onCheckboxAll: U,
3724
3724
  onCheckboxChange: Z,
3725
3725
  onRadioChange: v
3726
3726
  }), Nt({
3727
3727
  lToolBar: L(() => [
3728
- I.value.length > 0 ? (z(), ie("div", _n, [
3728
+ I.value.length > 0 ? (z(), ie("div", Un, [
3729
3729
  (z(!0), ie(be, null, Oe(I.value, (D) => (z(), ee(Be(D), {
3730
3730
  key: D.key
3731
3731
  }))), 128))
3732
3732
  ])) : ue("", !0)
3733
3733
  ]),
3734
3734
  rToolBar: L(() => [
3735
- P.value.length > 0 ? (z(), ie("div", Un, [
3735
+ P.value.length > 0 ? (z(), ie("div", _n, [
3736
3736
  (z(!0), ie(be, null, Oe(P.value, (D) => (z(), ee(Be(D), {
3737
3737
  key: D.key
3738
3738
  }))), 128))
@@ -3796,7 +3796,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3796
3796
  type: "link",
3797
3797
  size: "small"
3798
3798
  }, {
3799
- default: L(() => [...j[0] || (j[0] = [
3799
+ default: L(() => [...j[1] || (j[1] = [
3800
3800
  oe(" 更多 ", -1)
3801
3801
  ])]),
3802
3802
  _: 1
@@ -3838,7 +3838,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3838
3838
  ]), 1040, ["footer-data", "style"]);
3839
3839
  };
3840
3840
  }
3841
- }), Ib = /* @__PURE__ */ Ze(zn, [["__scopeId", "data-v-038e9e5b"]]), Sn = { style: { padding: "8px", "text-align": "center" } }, qn = /* @__PURE__ */ Te({
3841
+ }), Ib = /* @__PURE__ */ Ze(zn, [["__scopeId", "data-v-729062f0"]]), Sn = { style: { padding: "8px", "text-align": "center" } }, qn = /* @__PURE__ */ Te({
3842
3842
  __name: "index",
3843
3843
  props: {
3844
3844
  placeholder: { default: "请选择" },
@@ -3894,18 +3894,18 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3894
3894
  }), I = W(() => {
3895
3895
  const v = {};
3896
3896
  o.pagination && d.value && (v[x.value.pageField] = p.value, v[x.value.pageSizeField] = o.pageSize);
3897
- const U = {
3897
+ const _ = {
3898
3898
  ...o.extraParams,
3899
3899
  ...o.params,
3900
3900
  ...c
3901
3901
  };
3902
- return s.value && x.value.searchField && (U[x.value.searchField] = s.value), {
3902
+ return s.value && x.value.searchField && (_[x.value.searchField] = s.value), {
3903
3903
  ...v,
3904
- ...U
3904
+ ..._
3905
3905
  };
3906
- }), P = (v, U) => {
3906
+ }), P = (v, _) => {
3907
3907
  const T = v ?? {};
3908
- return U.split(".").reduce((F, $) => F?.[$], T);
3908
+ return _.split(".").reduce((F, $) => F?.[$], T);
3909
3909
  }, k = (v) => P(v, b.value.value), y = (v) => P(v, b.value.label), A = (v) => {
3910
3910
  if (!v || typeof v != "object")
3911
3911
  return { listData: [], totalCount: 0, shouldDisablePagination: !0 };
@@ -3938,10 +3938,10 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3938
3938
  }
3939
3939
  if (Array.isArray(v))
3940
3940
  return { listData: v, totalCount: v.length, shouldDisablePagination: !0 };
3941
- const U = b.value.list ? P(v, b.value.list) : v;
3942
- if (Array.isArray(U)) {
3943
- const T = b.value.total ? P(v, b.value.total) : U.length, F = !b.value.list || b.value.list === "list";
3944
- return { listData: U, totalCount: T, shouldDisablePagination: F };
3941
+ const _ = b.value.list ? P(v, b.value.list) : v;
3942
+ if (Array.isArray(_)) {
3943
+ const T = b.value.total ? P(v, b.value.total) : _.length, F = !b.value.list || b.value.list === "list";
3944
+ return { listData: _, totalCount: T, shouldDisablePagination: F };
3945
3945
  }
3946
3946
  return { listData: [], totalCount: 0, shouldDisablePagination: !0 };
3947
3947
  }, G = (v) => v && typeof v == "object" && "data" in v ? v.data : v, R = async () => {
@@ -3953,8 +3953,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3953
3953
  const v = ++f;
3954
3954
  u.value = !0;
3955
3955
  try {
3956
- const U = o.api.method || "GET", T = o.api.request, F = {
3957
- method: U,
3956
+ const _ = o.api.method || "GET", T = o.api.request, F = {
3957
+ method: _,
3958
3958
  url: o.api.url,
3959
3959
  headers: o.api.headers || {},
3960
3960
  params: { ...I.value, ...o.api.params },
@@ -3965,9 +3965,9 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3965
3965
  const { listData: Fe, totalCount: ye, shouldDisablePagination: xe } = A(ne);
3966
3966
  if (v !== f) return;
3967
3967
  l.value = Fe, a.value = ye, d.value = !xe, xe && (p.value = 1);
3968
- } catch (U) {
3968
+ } catch (_) {
3969
3969
  if (v !== f) return;
3970
- l.value = [], a.value = 0, d.value = !0, console.error("SSelectPage 数据加载失败:", U);
3970
+ l.value = [], a.value = 0, d.value = !0, console.error("SSelectPage 数据加载失败:", _);
3971
3971
  } finally {
3972
3972
  v === f && (u.value = !1);
3973
3973
  }
@@ -3975,12 +3975,12 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3975
3975
  Re(
3976
3976
  () => o.value,
3977
3977
  (v) => {
3978
- let U = !1;
3979
- v != null && !Array.isArray(v) && typeof v != "object" && v !== i.value && (Array.isArray(l.value) && l.value.some(($) => k($) === v) || (U = !0, c[`${b.value.value}`] = v, R().finally(() => {
3978
+ let _ = !1;
3979
+ v != null && !Array.isArray(v) && typeof v != "object" && v !== i.value && (Array.isArray(l.value) && l.value.some(($) => k($) === v) || (_ = !0, c[`${b.value.value}`] = v, R().finally(() => {
3980
3980
  Object.keys(c).forEach(($) => {
3981
3981
  delete c[$];
3982
3982
  });
3983
- }))), !U && o.autoLoad && (!l.value || l.value.length === 0) && R(), (o.mode === "multiple" || o.mode === "tags") && v == null ? i.value = [] : i.value = v || void 0;
3983
+ }))), !_ && o.autoLoad && (!l.value || l.value.length === 0) && R(), (o.mode === "multiple" || o.mode === "tags") && v == null ? i.value = [] : i.value = v || void 0;
3984
3984
  },
3985
3985
  { immediate: !0 }
3986
3986
  );
@@ -3989,8 +3989,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3989
3989
  };
3990
3990
  Re(
3991
3991
  () => o.extraParams,
3992
- (v, U) => {
3993
- ut(v, U) || (p.value = 1, R());
3992
+ (v, _) => {
3993
+ ut(v, _) || (p.value = 1, R());
3994
3994
  },
3995
3995
  {
3996
3996
  deep: !0,
@@ -3998,8 +3998,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
3998
3998
  }
3999
3999
  ), Re(
4000
4000
  () => o.params,
4001
- (v, U) => {
4002
- ut(v, U) || (p.value = 1, R());
4001
+ (v, _) => {
4002
+ ut(v, _) || (p.value = 1, R());
4003
4003
  },
4004
4004
  {
4005
4005
  deep: !0,
@@ -4022,9 +4022,9 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4022
4022
  });
4023
4023
  }, H = (v) => {
4024
4024
  i.value = v;
4025
- let U = null, T = null;
4025
+ let _ = null, T = null;
4026
4026
  if (Array.isArray(v))
4027
- U = v.map((F) => {
4027
+ _ = v.map((F) => {
4028
4028
  const $ = l.value.find((ne) => k(ne) === F);
4029
4029
  return $ ? {
4030
4030
  [b.value.value]: k($),
@@ -4034,14 +4034,14 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4034
4034
  }).filter(Boolean), T = v;
4035
4035
  else {
4036
4036
  const F = l.value.find(($) => k($) === v);
4037
- U = F ? {
4037
+ _ = F ? {
4038
4038
  [b.value.value]: k(F),
4039
4039
  [b.value.label]: y(F),
4040
4040
  __raw: F
4041
4041
  } : null, T = F;
4042
4042
  }
4043
4043
  n("update:value", v), re(() => {
4044
- n("change", v, U, T);
4044
+ n("change", v, _, T);
4045
4045
  }), s.value = "";
4046
4046
  }, O = W(() => {
4047
4047
  const v = {
@@ -4051,7 +4051,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4051
4051
  focus: B
4052
4052
  };
4053
4053
  return o.showSearch && (v.search = h), v;
4054
- }), _ = () => {
4054
+ }), U = () => {
4055
4055
  p.value = 1, s.value = "", R();
4056
4056
  }, Z = Te({
4057
4057
  name: "VNodes",
@@ -4066,14 +4066,14 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4066
4066
  }
4067
4067
  });
4068
4068
  return t({
4069
- reload: _,
4069
+ reload: U,
4070
4070
  fetchData: R
4071
- }), (v, U) => (z(), ee(Y(Ke), N({
4071
+ }), (v, _) => (z(), ee(Y(Ke), N({
4072
4072
  ref_key: "selectRef",
4073
4073
  ref: m
4074
4074
  }, v.$attrs, {
4075
4075
  value: i.value,
4076
- "onUpdate:value": U[0] || (U[0] = (T) => i.value = T),
4076
+ "onUpdate:value": _[0] || (_[0] = (T) => i.value = T),
4077
4077
  mode: e.mode,
4078
4078
  placeholder: e.placeholder,
4079
4079
  loading: u.value,
@@ -4087,7 +4087,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4087
4087
  te("div", null, [
4088
4088
  V(Y(Z), { vnodes: T }, null, 8, ["vnodes"]),
4089
4089
  o.pagination && d.value && l.value.length > 0 ? (z(), ie(be, { key: 0 }, [
4090
- V(Y(Ur), { style: { margin: "4px 0" } }),
4090
+ V(Y(_r), { style: { margin: "4px 0" } }),
4091
4091
  te("div", Sn, [
4092
4092
  V(Y(Jt), {
4093
4093
  current: p.value,
@@ -4103,7 +4103,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4103
4103
  ])
4104
4104
  ]),
4105
4105
  default: L(() => [
4106
- (z(!0), ie(be, null, Oe(l.value, (T) => (z(), ee(Y(_r), {
4106
+ (z(!0), ie(be, null, Oe(l.value, (T) => (z(), ee(Y(Ur), {
4107
4107
  key: k(T),
4108
4108
  value: k(T),
4109
4109
  disabled: T.disabled
@@ -4117,7 +4117,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
4117
4117
  _: 1
4118
4118
  }, 16, ["value", "mode", "placeholder", "loading", "disabled", "allow-clear", "show-search", "max-tag-count"]));
4119
4119
  }
4120
- }), Db = /* @__PURE__ */ Ze(qn, [["__scopeId", "data-v-1454f306"]]), _b = "0.0.0";
4120
+ }), Db = /* @__PURE__ */ Ze(qn, [["__scopeId", "data-v-1454f306"]]), Ub = "0.0.0";
4121
4121
  export {
4122
4122
  Bb as BaseSearch,
4123
4123
  Ib as BaseTable,
@@ -4150,5 +4150,5 @@ export {
4150
4150
  kn as renderUpload,
4151
4151
  Ie as rendererMap,
4152
4152
  ft as useToolbarState,
4153
- _b as version
4153
+ Ub as version
4154
4154
  };
@@ -32,16 +32,16 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
32
32
  initAllFieldDefaults: () => void;
33
33
  setFormValue: (values: AnyObject, key?: string[]) => void;
34
34
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
- reset: (values: AnyObject) => any;
36
35
  search: (values: AnyObject) => any;
36
+ reset: (values: AnyObject) => any;
37
37
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
38
- onReset?: ((values: AnyObject) => any) | undefined;
39
38
  onSearch?: ((values: AnyObject) => any) | undefined;
39
+ onReset?: ((values: AnyObject) => any) | undefined;
40
40
  }>, {
41
41
  padding: boolean;
42
+ gutter: number;
42
43
  labelWidth: number;
43
44
  actionsSpan: number;
44
- gutter: number;
45
45
  searchFields: FormField[];
46
46
  outerBaseForm: Component;
47
47
  innerBaseForm: Component;