@antsoo-lib/core 2.0.2 → 2.0.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.
- package/.turbo/turbo-build.log +0 -0
- package/CHANGELOG.md +14 -0
- package/dist/core.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +92 -91
- package/dist/types/BaseSearch/index.d.ts +1 -1
- package/dist/types/BaseTable/index.d.ts +478 -6
- package/package.json +6 -5
- package/src/BaseTable/index.vue +19 -15
- package/dist/types/Form/CoreForm.d.ts +0 -82
- package/dist/types/SSelectPage/index.d.ts +0 -102
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
|
|
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
|
|
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 =
|
|
1152
|
-
var i = Ot(o), u = Ge(
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
1567
|
+
_e(e, n, r[n]);
|
|
1568
1568
|
});
|
|
1569
1569
|
}
|
|
1570
1570
|
return e;
|
|
1571
1571
|
}
|
|
1572
|
-
function
|
|
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 =
|
|
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",
|
|
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
|
|
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 =
|
|
1640
|
-
return V(Ae,
|
|
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[
|
|
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
|
|
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 !== "",
|
|
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
|
|
2931
|
-
if (
|
|
2932
|
-
if (Array.isArray(
|
|
2933
|
-
const v = O && typeof O == "object" && !Array.isArray(O),
|
|
2934
|
-
if (
|
|
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 $ =
|
|
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
|
|
2946
|
-
const v = O && typeof O == "object" && !Array.isArray(O),
|
|
2947
|
-
if (
|
|
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,
|
|
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
|
|
2979
|
-
if (
|
|
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,
|
|
2982
|
+
wn(s.value, g, _, O, U, F);
|
|
2983
2983
|
try {
|
|
2984
|
-
const $ = Object.entries(
|
|
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,
|
|
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
|
|
3038
|
-
Object.prototype.hasOwnProperty.call(s.value,
|
|
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
|
|
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[
|
|
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"]]),
|
|
3355
|
+
}), Bb = /* @__PURE__ */ Ze(Dn, [["__scopeId", "data-v-d0d954f4"]]), Un = {
|
|
3356
3356
|
key: 0,
|
|
3357
3357
|
class: "base-table-toolbar-container"
|
|
3358
|
-
},
|
|
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(() =>
|
|
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
|
|
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
|
|
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",
|
|
@@ -3719,20 +3719,21 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3719
3719
|
"--vxe-ui-table-column-hover-background-color": e.hoverColor,
|
|
3720
3720
|
"--vxe-ui-table-row-hover-striped-background-color": e.hoverColor
|
|
3721
3721
|
},
|
|
3722
|
+
onSortChange: j[0] || (j[0] = (D) => n("sortChange", D)),
|
|
3722
3723
|
onCellClick: cr,
|
|
3723
|
-
onCheckboxAll:
|
|
3724
|
+
onCheckboxAll: U,
|
|
3724
3725
|
onCheckboxChange: Z,
|
|
3725
3726
|
onRadioChange: v
|
|
3726
3727
|
}), Nt({
|
|
3727
3728
|
lToolBar: L(() => [
|
|
3728
|
-
I.value.length > 0 ? (z(), ie("div",
|
|
3729
|
+
I.value.length > 0 ? (z(), ie("div", Un, [
|
|
3729
3730
|
(z(!0), ie(be, null, Oe(I.value, (D) => (z(), ee(Be(D), {
|
|
3730
3731
|
key: D.key
|
|
3731
3732
|
}))), 128))
|
|
3732
3733
|
])) : ue("", !0)
|
|
3733
3734
|
]),
|
|
3734
3735
|
rToolBar: L(() => [
|
|
3735
|
-
P.value.length > 0 ? (z(), ie("div",
|
|
3736
|
+
P.value.length > 0 ? (z(), ie("div", _n, [
|
|
3736
3737
|
(z(!0), ie(be, null, Oe(P.value, (D) => (z(), ee(Be(D), {
|
|
3737
3738
|
key: D.key
|
|
3738
3739
|
}))), 128))
|
|
@@ -3796,7 +3797,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3796
3797
|
type: "link",
|
|
3797
3798
|
size: "small"
|
|
3798
3799
|
}, {
|
|
3799
|
-
default: L(() => [...j[
|
|
3800
|
+
default: L(() => [...j[1] || (j[1] = [
|
|
3800
3801
|
oe(" 更多 ", -1)
|
|
3801
3802
|
])]),
|
|
3802
3803
|
_: 1
|
|
@@ -3838,7 +3839,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3838
3839
|
]), 1040, ["footer-data", "style"]);
|
|
3839
3840
|
};
|
|
3840
3841
|
}
|
|
3841
|
-
}), Ib = /* @__PURE__ */ Ze(zn, [["__scopeId", "data-v-
|
|
3842
|
+
}), Ib = /* @__PURE__ */ Ze(zn, [["__scopeId", "data-v-f5f6e904"]]), Sn = { style: { padding: "8px", "text-align": "center" } }, qn = /* @__PURE__ */ Te({
|
|
3842
3843
|
__name: "index",
|
|
3843
3844
|
props: {
|
|
3844
3845
|
placeholder: { default: "请选择" },
|
|
@@ -3894,18 +3895,18 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3894
3895
|
}), I = W(() => {
|
|
3895
3896
|
const v = {};
|
|
3896
3897
|
o.pagination && d.value && (v[x.value.pageField] = p.value, v[x.value.pageSizeField] = o.pageSize);
|
|
3897
|
-
const
|
|
3898
|
+
const _ = {
|
|
3898
3899
|
...o.extraParams,
|
|
3899
3900
|
...o.params,
|
|
3900
3901
|
...c
|
|
3901
3902
|
};
|
|
3902
|
-
return s.value && x.value.searchField && (
|
|
3903
|
+
return s.value && x.value.searchField && (_[x.value.searchField] = s.value), {
|
|
3903
3904
|
...v,
|
|
3904
|
-
...
|
|
3905
|
+
..._
|
|
3905
3906
|
};
|
|
3906
|
-
}), P = (v,
|
|
3907
|
+
}), P = (v, _) => {
|
|
3907
3908
|
const T = v ?? {};
|
|
3908
|
-
return
|
|
3909
|
+
return _.split(".").reduce((F, $) => F?.[$], T);
|
|
3909
3910
|
}, k = (v) => P(v, b.value.value), y = (v) => P(v, b.value.label), A = (v) => {
|
|
3910
3911
|
if (!v || typeof v != "object")
|
|
3911
3912
|
return { listData: [], totalCount: 0, shouldDisablePagination: !0 };
|
|
@@ -3938,10 +3939,10 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3938
3939
|
}
|
|
3939
3940
|
if (Array.isArray(v))
|
|
3940
3941
|
return { listData: v, totalCount: v.length, shouldDisablePagination: !0 };
|
|
3941
|
-
const
|
|
3942
|
-
if (Array.isArray(
|
|
3943
|
-
const T = b.value.total ? P(v, b.value.total) :
|
|
3944
|
-
return { listData:
|
|
3942
|
+
const _ = b.value.list ? P(v, b.value.list) : v;
|
|
3943
|
+
if (Array.isArray(_)) {
|
|
3944
|
+
const T = b.value.total ? P(v, b.value.total) : _.length, F = !b.value.list || b.value.list === "list";
|
|
3945
|
+
return { listData: _, totalCount: T, shouldDisablePagination: F };
|
|
3945
3946
|
}
|
|
3946
3947
|
return { listData: [], totalCount: 0, shouldDisablePagination: !0 };
|
|
3947
3948
|
}, G = (v) => v && typeof v == "object" && "data" in v ? v.data : v, R = async () => {
|
|
@@ -3953,8 +3954,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3953
3954
|
const v = ++f;
|
|
3954
3955
|
u.value = !0;
|
|
3955
3956
|
try {
|
|
3956
|
-
const
|
|
3957
|
-
method:
|
|
3957
|
+
const _ = o.api.method || "GET", T = o.api.request, F = {
|
|
3958
|
+
method: _,
|
|
3958
3959
|
url: o.api.url,
|
|
3959
3960
|
headers: o.api.headers || {},
|
|
3960
3961
|
params: { ...I.value, ...o.api.params },
|
|
@@ -3965,9 +3966,9 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3965
3966
|
const { listData: Fe, totalCount: ye, shouldDisablePagination: xe } = A(ne);
|
|
3966
3967
|
if (v !== f) return;
|
|
3967
3968
|
l.value = Fe, a.value = ye, d.value = !xe, xe && (p.value = 1);
|
|
3968
|
-
} catch (
|
|
3969
|
+
} catch (_) {
|
|
3969
3970
|
if (v !== f) return;
|
|
3970
|
-
l.value = [], a.value = 0, d.value = !0, console.error("SSelectPage 数据加载失败:",
|
|
3971
|
+
l.value = [], a.value = 0, d.value = !0, console.error("SSelectPage 数据加载失败:", _);
|
|
3971
3972
|
} finally {
|
|
3972
3973
|
v === f && (u.value = !1);
|
|
3973
3974
|
}
|
|
@@ -3975,12 +3976,12 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3975
3976
|
Re(
|
|
3976
3977
|
() => o.value,
|
|
3977
3978
|
(v) => {
|
|
3978
|
-
let
|
|
3979
|
-
v != null && !Array.isArray(v) && typeof v != "object" && v !== i.value && (Array.isArray(l.value) && l.value.some(($) => k($) === v) || (
|
|
3979
|
+
let _ = !1;
|
|
3980
|
+
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
3981
|
Object.keys(c).forEach(($) => {
|
|
3981
3982
|
delete c[$];
|
|
3982
3983
|
});
|
|
3983
|
-
}))), !
|
|
3984
|
+
}))), !_ && 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
3985
|
},
|
|
3985
3986
|
{ immediate: !0 }
|
|
3986
3987
|
);
|
|
@@ -3989,8 +3990,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3989
3990
|
};
|
|
3990
3991
|
Re(
|
|
3991
3992
|
() => o.extraParams,
|
|
3992
|
-
(v,
|
|
3993
|
-
ut(v,
|
|
3993
|
+
(v, _) => {
|
|
3994
|
+
ut(v, _) || (p.value = 1, R());
|
|
3994
3995
|
},
|
|
3995
3996
|
{
|
|
3996
3997
|
deep: !0,
|
|
@@ -3998,8 +3999,8 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
3998
3999
|
}
|
|
3999
4000
|
), Re(
|
|
4000
4001
|
() => o.params,
|
|
4001
|
-
(v,
|
|
4002
|
-
ut(v,
|
|
4002
|
+
(v, _) => {
|
|
4003
|
+
ut(v, _) || (p.value = 1, R());
|
|
4003
4004
|
},
|
|
4004
4005
|
{
|
|
4005
4006
|
deep: !0,
|
|
@@ -4022,9 +4023,9 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4022
4023
|
});
|
|
4023
4024
|
}, H = (v) => {
|
|
4024
4025
|
i.value = v;
|
|
4025
|
-
let
|
|
4026
|
+
let _ = null, T = null;
|
|
4026
4027
|
if (Array.isArray(v))
|
|
4027
|
-
|
|
4028
|
+
_ = v.map((F) => {
|
|
4028
4029
|
const $ = l.value.find((ne) => k(ne) === F);
|
|
4029
4030
|
return $ ? {
|
|
4030
4031
|
[b.value.value]: k($),
|
|
@@ -4034,14 +4035,14 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4034
4035
|
}).filter(Boolean), T = v;
|
|
4035
4036
|
else {
|
|
4036
4037
|
const F = l.value.find(($) => k($) === v);
|
|
4037
|
-
|
|
4038
|
+
_ = F ? {
|
|
4038
4039
|
[b.value.value]: k(F),
|
|
4039
4040
|
[b.value.label]: y(F),
|
|
4040
4041
|
__raw: F
|
|
4041
4042
|
} : null, T = F;
|
|
4042
4043
|
}
|
|
4043
4044
|
n("update:value", v), re(() => {
|
|
4044
|
-
n("change", v,
|
|
4045
|
+
n("change", v, _, T);
|
|
4045
4046
|
}), s.value = "";
|
|
4046
4047
|
}, O = W(() => {
|
|
4047
4048
|
const v = {
|
|
@@ -4051,7 +4052,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4051
4052
|
focus: B
|
|
4052
4053
|
};
|
|
4053
4054
|
return o.showSearch && (v.search = h), v;
|
|
4054
|
-
}),
|
|
4055
|
+
}), U = () => {
|
|
4055
4056
|
p.value = 1, s.value = "", R();
|
|
4056
4057
|
}, Z = Te({
|
|
4057
4058
|
name: "VNodes",
|
|
@@ -4066,14 +4067,14 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4066
4067
|
}
|
|
4067
4068
|
});
|
|
4068
4069
|
return t({
|
|
4069
|
-
reload:
|
|
4070
|
+
reload: U,
|
|
4070
4071
|
fetchData: R
|
|
4071
|
-
}), (v,
|
|
4072
|
+
}), (v, _) => (z(), ee(Y(Ke), N({
|
|
4072
4073
|
ref_key: "selectRef",
|
|
4073
4074
|
ref: m
|
|
4074
4075
|
}, v.$attrs, {
|
|
4075
4076
|
value: i.value,
|
|
4076
|
-
"onUpdate:value":
|
|
4077
|
+
"onUpdate:value": _[0] || (_[0] = (T) => i.value = T),
|
|
4077
4078
|
mode: e.mode,
|
|
4078
4079
|
placeholder: e.placeholder,
|
|
4079
4080
|
loading: u.value,
|
|
@@ -4087,7 +4088,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4087
4088
|
te("div", null, [
|
|
4088
4089
|
V(Y(Z), { vnodes: T }, null, 8, ["vnodes"]),
|
|
4089
4090
|
o.pagination && d.value && l.value.length > 0 ? (z(), ie(be, { key: 0 }, [
|
|
4090
|
-
V(Y(
|
|
4091
|
+
V(Y(_r), { style: { margin: "4px 0" } }),
|
|
4091
4092
|
te("div", Sn, [
|
|
4092
4093
|
V(Y(Jt), {
|
|
4093
4094
|
current: p.value,
|
|
@@ -4103,7 +4104,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4103
4104
|
])
|
|
4104
4105
|
]),
|
|
4105
4106
|
default: L(() => [
|
|
4106
|
-
(z(!0), ie(be, null, Oe(l.value, (T) => (z(), ee(Y(
|
|
4107
|
+
(z(!0), ie(be, null, Oe(l.value, (T) => (z(), ee(Y(Ur), {
|
|
4107
4108
|
key: k(T),
|
|
4108
4109
|
value: k(T),
|
|
4109
4110
|
disabled: T.disabled
|
|
@@ -4117,7 +4118,7 @@ const Vn = /* @__PURE__ */ Symbol("CommonCodeService"), On = { class: "form-cont
|
|
|
4117
4118
|
_: 1
|
|
4118
4119
|
}, 16, ["value", "mode", "placeholder", "loading", "disabled", "allow-clear", "show-search", "max-tag-count"]));
|
|
4119
4120
|
}
|
|
4120
|
-
}), Db = /* @__PURE__ */ Ze(qn, [["__scopeId", "data-v-1454f306"]]),
|
|
4121
|
+
}), Db = /* @__PURE__ */ Ze(qn, [["__scopeId", "data-v-1454f306"]]), Ub = "0.0.0";
|
|
4121
4122
|
export {
|
|
4122
4123
|
Bb as BaseSearch,
|
|
4123
4124
|
Ib as BaseTable,
|
|
@@ -4150,5 +4151,5 @@ export {
|
|
|
4150
4151
|
kn as renderUpload,
|
|
4151
4152
|
Ie as rendererMap,
|
|
4152
4153
|
ft as useToolbarState,
|
|
4153
|
-
|
|
4154
|
+
Ub as version
|
|
4154
4155
|
};
|
|
@@ -38,10 +38,10 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {
|
|
|
38
38
|
onSearch?: ((values: AnyObject) => any) | undefined;
|
|
39
39
|
onReset?: ((values: AnyObject) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
+
gutter: number;
|
|
41
42
|
padding: boolean;
|
|
42
43
|
labelWidth: number;
|
|
43
44
|
actionsSpan: number;
|
|
44
|
-
gutter: number;
|
|
45
45
|
searchFields: FormField[];
|
|
46
46
|
outerBaseForm: Component;
|
|
47
47
|
innerBaseForm: Component;
|