@bsgoal/common 1.7.6 → 1.7.7
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.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ne = Object.defineProperty;
|
|
2
2
|
var Te = Object.getOwnPropertySymbols;
|
|
3
3
|
var ke = Object.prototype.hasOwnProperty, Se = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var xe = (e, u, a) => u in e ? Ne(e, u, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[u] = a,
|
|
4
|
+
var xe = (e, u, a) => u in e ? Ne(e, u, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[u] = a, pe = (e, u) => {
|
|
5
5
|
for (var a in u || (u = {}))
|
|
6
6
|
ke.call(u, a) && xe(e, a, u[a]);
|
|
7
7
|
if (Te)
|
|
@@ -9,7 +9,7 @@ var xe = (e, u, a) => u in e ? Ne(e, u, { enumerable: !0, configurable: !0, writ
|
|
|
9
9
|
Se.call(u, a) && xe(e, a, u[a]);
|
|
10
10
|
return e;
|
|
11
11
|
};
|
|
12
|
-
import { computed as K, resolveComponent as g, openBlock as o, createElementBlock as E, createVNode as B, withCtx as x, renderSlot as J, createTextVNode as H, toDisplayString as j, ref as N, watchEffect as
|
|
12
|
+
import { computed as K, resolveComponent as g, openBlock as o, createElementBlock as E, createVNode as B, withCtx as x, renderSlot as J, createTextVNode as H, toDisplayString as j, ref as N, watchEffect as fe, unref as c, createElementVNode as S, withDirectives as W, createBlock as y, Fragment as z, renderList as Z, createCommentVNode as M, nextTick as Ce, inject as Ve, watch as _e, resolveDirective as De, normalizeClass as me, vShow as le, isProxy as Oe, toRaw as Ie, provide as Fe, useSlots as Re, createSlots as Ue, normalizeStyle as Pe } from "vue";
|
|
13
13
|
import { ElMessage as Le } from "element-plus";
|
|
14
14
|
const l = {
|
|
15
15
|
INPUT: "text",
|
|
@@ -33,8 +33,8 @@ const l = {
|
|
|
33
33
|
OPERATION: "operation",
|
|
34
34
|
CASCADER: "cascader"
|
|
35
35
|
};
|
|
36
|
-
let
|
|
37
|
-
const
|
|
36
|
+
let he = null;
|
|
37
|
+
const Ee = (e) => {
|
|
38
38
|
const u = [], a = [], i = (s = []) => {
|
|
39
39
|
const t = s.map((_) => _.width), d = Math.max(...t);
|
|
40
40
|
s.forEach((_) => {
|
|
@@ -54,7 +54,7 @@ const he = (e) => {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
he && clearTimeout(he), he = setTimeout(() => {
|
|
58
58
|
r(), i(u), i(a);
|
|
59
59
|
}, 50);
|
|
60
60
|
}, be = {
|
|
@@ -64,14 +64,14 @@ const he = (e) => {
|
|
|
64
64
|
align: {
|
|
65
65
|
created(e) {
|
|
66
66
|
window.addEventListener("resize", () => {
|
|
67
|
-
|
|
67
|
+
Ee(e);
|
|
68
68
|
});
|
|
69
69
|
},
|
|
70
70
|
mounted(e) {
|
|
71
|
-
|
|
71
|
+
Ee(e);
|
|
72
72
|
},
|
|
73
73
|
unmounted(e) {
|
|
74
|
-
window.removeEventListener("resize",
|
|
74
|
+
window.removeEventListener("resize", Ee(e));
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
/**
|
|
@@ -223,7 +223,7 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
223
223
|
emits: ["on-form", "on-clear", "on-change", "on-fold"],
|
|
224
224
|
setup(e, { expose: u, emit: a }) {
|
|
225
225
|
const i = e, r = N(null), s = be.align, t = N({});
|
|
226
|
-
|
|
226
|
+
fe(() => {
|
|
227
227
|
const { configOptions: p, values: b } = i, T = c(p), C = c(b);
|
|
228
228
|
T.forEach(($) => {
|
|
229
229
|
const { value: h = "", prop: O = "", type: I = "" } = $;
|
|
@@ -287,8 +287,8 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
287
287
|
for (const C of T) {
|
|
288
288
|
const { type: $ = "", range: h = [], prop: O = "" } = C;
|
|
289
289
|
if ($.endsWith("range") && h && h.length === 2) {
|
|
290
|
-
const { 0: I = "", 1: P = "" } = p[O], { 0:
|
|
291
|
-
p[
|
|
290
|
+
const { 0: I = "", 1: P = "" } = p[O], { 0: U = "", 1: Y = "" } = h;
|
|
291
|
+
p[U] = I, p[Y] = P;
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
return a("on-form", p), p;
|
|
@@ -323,7 +323,7 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
325
|
}), (p, b) => {
|
|
326
|
-
const T = g("el-input"), C = g("el-input-number"), $ = g("el-radio"), h = g("el-radio-group"), O = g("el-option"), I = g("el-select"), P = g("el-slider"),
|
|
326
|
+
const T = g("el-input"), C = g("el-input-number"), $ = g("el-radio"), h = g("el-radio-group"), O = g("el-option"), I = g("el-select"), P = g("el-slider"), U = g("el-switch"), Y = g("el-date-picker"), F = g("el-time-picker"), X = g("el-checkbox"), q = g("el-checkbox-group"), ne = g("el-form-item"), oe = g("el-col"), re = g("el-row"), ie = g("el-form");
|
|
327
327
|
return o(), E("div", Ye, [
|
|
328
328
|
S("div", Ge, [
|
|
329
329
|
W((o(), y(ie, {
|
|
@@ -342,7 +342,7 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
342
342
|
placeholder: f = "",
|
|
343
343
|
readonly: v = e.readonlys,
|
|
344
344
|
clearable: G = !0,
|
|
345
|
-
rows:
|
|
345
|
+
rows: ve = 2,
|
|
346
346
|
min: de = 1,
|
|
347
347
|
max: ge = 10,
|
|
348
348
|
range: ee = [],
|
|
@@ -385,7 +385,7 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
385
385
|
modelValue: t.value[A],
|
|
386
386
|
"onUpdate:modelValue": (n) => t.value[A] = n,
|
|
387
387
|
type: "textarea",
|
|
388
|
-
rows:
|
|
388
|
+
rows: ve,
|
|
389
389
|
clearable: G,
|
|
390
390
|
placeholder: _(m, L, f),
|
|
391
391
|
onChange: (n) => k(m, A)
|
|
@@ -441,7 +441,7 @@ const Ye = { class: "bsgoal-base-form" }, Ge = { class: "base_form" }, He = { ke
|
|
|
441
441
|
max: ge,
|
|
442
442
|
onChange: (n) => k(m, A)
|
|
443
443
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "min", "max", "onChange"])) : M("", !0),
|
|
444
|
-
m === c(l).SWITCH ? (o(), y(
|
|
444
|
+
m === c(l).SWITCH ? (o(), y(U, {
|
|
445
445
|
key: 6,
|
|
446
446
|
modelValue: t.value[A],
|
|
447
447
|
"onUpdate:modelValue": (n) => t.value[A] = n,
|
|
@@ -952,29 +952,31 @@ const ft = { class: "bsgoal-base-table" }, vt = { class: "base_table" }, pt = {
|
|
|
952
952
|
},
|
|
953
953
|
setup(e, { expose: u }) {
|
|
954
954
|
const a = e, i = K(() => {
|
|
955
|
-
const { configOptions: h = [], operation: O = !1, operationWidth: I = 0 } = a, P = c(h),
|
|
956
|
-
return O &&
|
|
955
|
+
const { configOptions: h = [], operation: O = !1, operationWidth: I = 0 } = a, P = c(h), U = [];
|
|
956
|
+
return O && U.push({
|
|
957
957
|
label: "操作",
|
|
958
958
|
fixed: "right",
|
|
959
959
|
prop: "operation",
|
|
960
960
|
width: I
|
|
961
|
-
}), [...P, ...
|
|
961
|
+
}), [...P, ...U];
|
|
962
962
|
}), r = N(null), s = Ve("transferFoldStatus");
|
|
963
|
-
|
|
963
|
+
fe(() => {
|
|
964
964
|
const { height: h } = a, O = s ? s.value : !1, I = c(a.expression);
|
|
965
965
|
gt(h) || _t(r, { arg: O, expression: I, height: h });
|
|
966
966
|
});
|
|
967
|
-
const t = c(a.mapProps), d =
|
|
967
|
+
const t = c(a.mapProps), d = pe({
|
|
968
968
|
currentPage: "currentPage",
|
|
969
969
|
pageSize: "pageSize",
|
|
970
970
|
rows: "rows",
|
|
971
971
|
total: "total"
|
|
972
|
-
}, t), _ = N(1), V = N(10), w = N(0), D = N({}), k = N(a.loading),
|
|
973
|
-
const { fetch: h, call: O, hasPage: I } = a, P = D.value,
|
|
974
|
-
I && (F[d.currentPage] =
|
|
972
|
+
}, t), _ = N(1), V = N(10), w = N(0), D = N({}), k = N(a.loading), R = N(), p = N({}), b = () => {
|
|
973
|
+
const { fetch: h, call: O, hasPage: I } = a, P = D.value, U = _.value, Y = V.value, F = pe({}, P);
|
|
974
|
+
I && (F[d.currentPage] = U, F[d.pageSize] = Y), ye(h(F), O, k, p);
|
|
975
975
|
};
|
|
976
|
-
|
|
977
|
-
|
|
976
|
+
fe(() => {
|
|
977
|
+
R.value = a.data;
|
|
978
|
+
}), _e(p, (h) => {
|
|
979
|
+
a.hasPage ? (R.value = h[d.rows], w.value = h[d.total]) : R.value = h;
|
|
978
980
|
});
|
|
979
981
|
const T = (h = {}) => {
|
|
980
982
|
D.value = h, _.value = 1, b();
|
|
@@ -988,7 +990,7 @@ const ft = { class: "bsgoal-base-table" }, vt = { class: "base_table" }, pt = {
|
|
|
988
990
|
}), u({
|
|
989
991
|
refreshList: T
|
|
990
992
|
}), (h, O) => {
|
|
991
|
-
const I = g("el-table-column"), P = g("el-table"),
|
|
993
|
+
const I = g("el-table-column"), P = g("el-table"), U = De("loading");
|
|
992
994
|
return o(), E("div", ft, [
|
|
993
995
|
S("div", vt, [
|
|
994
996
|
h.$slots.menu ? (o(), E("div", pt, [
|
|
@@ -1003,7 +1005,7 @@ const ft = { class: "bsgoal-base-table" }, vt = { class: "base_table" }, pt = {
|
|
|
1003
1005
|
border: "",
|
|
1004
1006
|
"highlight-current-row": "",
|
|
1005
1007
|
style: { width: "100%" },
|
|
1006
|
-
data:
|
|
1008
|
+
data: R.value,
|
|
1007
1009
|
"header-cell-style": {
|
|
1008
1010
|
fontWeight: "bold",
|
|
1009
1011
|
backgroundColor: "#EBEEF5",
|
|
@@ -1051,7 +1053,7 @@ const ft = { class: "bsgoal-base-table" }, vt = { class: "base_table" }, pt = {
|
|
|
1051
1053
|
]),
|
|
1052
1054
|
_: 3
|
|
1053
1055
|
}, 8, ["data", "header-cell-style"])), [
|
|
1054
|
-
[
|
|
1056
|
+
[U, k.value]
|
|
1055
1057
|
])
|
|
1056
1058
|
], 512),
|
|
1057
1059
|
e.hasPage ? (o(), y(ot, {
|
|
@@ -1399,7 +1401,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1399
1401
|
emits: ["on-search", "on-clear", "on-change", "on-fold"],
|
|
1400
1402
|
setup(e, { expose: u, emit: a }) {
|
|
1401
1403
|
const i = e, r = N(null), s = be.align, t = N({});
|
|
1402
|
-
|
|
1404
|
+
fe(() => {
|
|
1403
1405
|
const { configOptions: T } = i;
|
|
1404
1406
|
c(T).forEach(($) => {
|
|
1405
1407
|
const { value: h, prop: O = "", type: I = "" } = $;
|
|
@@ -1460,12 +1462,12 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1460
1462
|
}, w = () => {
|
|
1461
1463
|
const { configOptions: T } = i, C = c(t), $ = c(T), h = {};
|
|
1462
1464
|
for (const O of $) {
|
|
1463
|
-
const { type: I = "", range: P = [], prop:
|
|
1465
|
+
const { type: I = "", range: P = [], prop: U = "", single: Y = !1 } = O, F = C[U];
|
|
1464
1466
|
if ([l.CASCADER].includes(I) && Array.isArray(F) && Y) {
|
|
1465
1467
|
const X = F.length;
|
|
1466
|
-
X ? h[
|
|
1468
|
+
X ? h[U] = F[X - 1] : h[U] = F;
|
|
1467
1469
|
} else
|
|
1468
|
-
Oe(F) ? h[
|
|
1470
|
+
Oe(F) ? h[U] = Ie(F) : h[U] = F;
|
|
1469
1471
|
if (I.endsWith("range") && P && P.length === 2) {
|
|
1470
1472
|
const { 0: X = "", 1: q = "" } = F, { 0: ne = "", 1: oe = "" } = P;
|
|
1471
1473
|
h[ne] = X, h[oe] = q;
|
|
@@ -1478,8 +1480,8 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1478
1480
|
});
|
|
1479
1481
|
const D = () => {
|
|
1480
1482
|
r.value.resetFields(), a("on-clear", t.value);
|
|
1481
|
-
}, k = Ve("transferFoldStatus"),
|
|
1482
|
-
|
|
1483
|
+
}, k = Ve("transferFoldStatus"), R = N(!1), p = (T = !1) => {
|
|
1484
|
+
R.value = T, k && (k.value = T), a("on-fold", R);
|
|
1483
1485
|
}, b = (T, C) => {
|
|
1484
1486
|
w();
|
|
1485
1487
|
const $ = {
|
|
@@ -1492,7 +1494,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1492
1494
|
return u({
|
|
1493
1495
|
triggerOperationSearch: w
|
|
1494
1496
|
}), (T, C) => {
|
|
1495
|
-
const $ = g("el-input"), h = g("el-input-number"), O = g("el-radio"), I = g("el-radio-group"), P = g("el-option"),
|
|
1497
|
+
const $ = g("el-input"), h = g("el-input-number"), O = g("el-radio"), I = g("el-radio-group"), P = g("el-option"), U = g("el-select"), Y = g("el-slider"), F = g("el-switch"), X = g("el-date-picker"), q = g("el-time-picker"), ne = g("el-checkbox"), oe = g("el-checkbox-group"), re = g("el-form-item"), ie = g("el-col"), L = g("el-row"), A = g("el-form");
|
|
1496
1498
|
return o(), E("div", ma, [
|
|
1497
1499
|
S("div", ga, [
|
|
1498
1500
|
W((o(), y(A, {
|
|
@@ -1510,7 +1512,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1510
1512
|
prop: f = "",
|
|
1511
1513
|
type: v = "text",
|
|
1512
1514
|
placeholder: G = "",
|
|
1513
|
-
readonly:
|
|
1515
|
+
readonly: ve = !1,
|
|
1514
1516
|
clearable: de = !0,
|
|
1515
1517
|
rows: ge = 2,
|
|
1516
1518
|
min: ee = 1,
|
|
@@ -1529,7 +1531,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1529
1531
|
prop: f
|
|
1530
1532
|
}, {
|
|
1531
1533
|
default: x(() => [
|
|
1532
|
-
|
|
1534
|
+
ve ? (o(), E("div", fa, j(t.value[f]), 1)) : (o(), E(z, { key: 0 }, [
|
|
1533
1535
|
v === c(l).INPUT ? (o(), y($, {
|
|
1534
1536
|
key: 0,
|
|
1535
1537
|
modelValue: t.value[f],
|
|
@@ -1574,7 +1576,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1574
1576
|
]),
|
|
1575
1577
|
_: 2
|
|
1576
1578
|
}, 1032, ["modelValue", "onUpdate:modelValue", "onChange"])) : M("", !0),
|
|
1577
|
-
v === c(l).SELECT ? (o(), y(
|
|
1579
|
+
v === c(l).SELECT ? (o(), y(U, {
|
|
1578
1580
|
key: 4,
|
|
1579
1581
|
modelValue: t.value[f],
|
|
1580
1582
|
"onUpdate:modelValue": (n) => t.value[f] = n,
|
|
@@ -1693,7 +1695,7 @@ const ma = { class: "bsgoal-base-search" }, ga = { class: "base_search" }, fa =
|
|
|
1693
1695
|
]),
|
|
1694
1696
|
_: 2
|
|
1695
1697
|
}, 1032, ["md"])), [
|
|
1696
|
-
[le, ce < 7 || v === c(l).OPERATION || ce >= 7 &&
|
|
1698
|
+
[le, ce < 7 || v === c(l).OPERATION || ce >= 7 && R.value]
|
|
1697
1699
|
])), 128))
|
|
1698
1700
|
]),
|
|
1699
1701
|
_: 1
|
|
@@ -1966,19 +1968,19 @@ const Ca = { class: "bsgoal-base-tree" }, Va = { class: "base_tree" }, $a = { cl
|
|
|
1966
1968
|
_e(r, (w) => {
|
|
1967
1969
|
s.value.filter(w);
|
|
1968
1970
|
});
|
|
1969
|
-
const t = (w, D) => w ? D.label.includes(w) : !0, d = N(!0), _ = (w, D, k,
|
|
1970
|
-
u("on-click", w, D, k,
|
|
1971
|
+
const t = (w, D) => w ? D.label.includes(w) : !0, d = N(!0), _ = (w, D, k, R) => {
|
|
1972
|
+
u("on-click", w, D, k, R);
|
|
1971
1973
|
}, V = async (w, D, k) => {
|
|
1972
1974
|
if (w.level === 0) {
|
|
1973
|
-
const
|
|
1974
|
-
return D(
|
|
1975
|
+
const R = await k.initNode(w);
|
|
1976
|
+
return D(R || []);
|
|
1975
1977
|
} else {
|
|
1976
|
-
const
|
|
1977
|
-
D(
|
|
1978
|
+
const R = await k.lazyLoad(w);
|
|
1979
|
+
D(R || []);
|
|
1978
1980
|
}
|
|
1979
1981
|
};
|
|
1980
1982
|
return (w, D) => {
|
|
1981
|
-
const k = g("el-input"),
|
|
1983
|
+
const k = g("el-input"), R = g("el-tree");
|
|
1982
1984
|
return o(), E("div", Ca, [
|
|
1983
1985
|
W((o(), E("div", Va, [
|
|
1984
1986
|
W(S("div", $a, [
|
|
@@ -1988,7 +1990,7 @@ const Ca = { class: "bsgoal-base-tree" }, Va = { class: "base_tree" }, $a = { cl
|
|
|
1988
1990
|
class: "base_tree_main_input",
|
|
1989
1991
|
placeholder: "输入关键字过滤"
|
|
1990
1992
|
}, null, 8, ["modelValue"]),
|
|
1991
|
-
B(
|
|
1993
|
+
B(R, {
|
|
1992
1994
|
ref_key: "EL_TREE_REF",
|
|
1993
1995
|
ref: s,
|
|
1994
1996
|
lazy: "",
|