erp-plus 1.0.28 → 1.0.30
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/erp-plus.css +1 -1
- package/dist/erp-plus.es.js +36 -34
- package/dist/erp-plus.umd.js +1 -1
- package/dist/packages/Table/Table.vue.d.ts +1 -0
- package/package.json +2 -1
package/dist/erp-plus.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import YA, { ElOption as yA, ElSelect as SA } from "element-plus";
|
|
2
|
-
import { defineComponent as O, useSlots as fA, resolveComponent as V, createBlock as z, openBlock as i, mergeProps as U, createSlots as lA, renderList as j, unref as E, withCtx as f, renderSlot as P, normalizeProps as nA, guardReactiveProps as wA, computed as Y, createElementBlock as D, normalizeStyle as _, normalizeClass as rA, h as J, createVNode as
|
|
2
|
+
import { defineComponent as O, useSlots as fA, resolveComponent as V, createBlock as z, openBlock as i, mergeProps as U, createSlots as lA, renderList as j, unref as E, withCtx as f, renderSlot as P, normalizeProps as nA, guardReactiveProps as wA, computed as Y, createElementBlock as D, normalizeStyle as _, normalizeClass as rA, h as J, createVNode as Z, isRef as oA, ref as N, Fragment as W, resolveDynamicComponent as ZA, createTextVNode as iA, toDisplayString as AA, createElementVNode as H, createCommentVNode as $, watch as BA, withKeys as bA } from "vue";
|
|
3
3
|
const sA = /* @__PURE__ */ O({
|
|
4
4
|
__name: "Button",
|
|
5
5
|
props: {
|
|
@@ -163,8 +163,10 @@ const ge = ["innerHTML"], re = /* @__PURE__ */ O({
|
|
|
163
163
|
},
|
|
164
164
|
setup(A) {
|
|
165
165
|
const c = A, e = Y(() => c.className ? `erp-svg-icon ${c.className}` : "erp-svg-icon"), o = Y(() => {
|
|
166
|
+
if (c.iconClass.trim().startsWith("<svg"))
|
|
167
|
+
return c.iconClass;
|
|
166
168
|
const r = KA[c.iconClass];
|
|
167
|
-
return r || (console.warn(`[ErpPlus] 图标 "${c.iconClass}"
|
|
169
|
+
return r || (console.warn(`[ErpPlus] 图标 "${c.iconClass}" 不存在`), "");
|
|
168
170
|
}), t = Y(() => {
|
|
169
171
|
const r = typeof c.size == "number" ? c.size + "px" : c.size;
|
|
170
172
|
return {
|
|
@@ -189,7 +191,7 @@ const ge = ["innerHTML"], re = /* @__PURE__ */ O({
|
|
|
189
191
|
for (const [o, t] of c)
|
|
190
192
|
e[o] = t;
|
|
191
193
|
return e;
|
|
192
|
-
}, x = /* @__PURE__ */ DA(re, [["__scopeId", "data-v-
|
|
194
|
+
}, x = /* @__PURE__ */ DA(re, [["__scopeId", "data-v-11f48d33"]]), pA = /* @__PURE__ */ O({
|
|
193
195
|
__name: "DatePicker",
|
|
194
196
|
props: {
|
|
195
197
|
modelValue: {
|
|
@@ -386,28 +388,28 @@ const ge = ["innerHTML"], re = /* @__PURE__ */ O({
|
|
|
386
388
|
onPanelChange: G
|
|
387
389
|
}), {
|
|
388
390
|
"prev-month": f(() => [
|
|
389
|
-
|
|
391
|
+
Z(x, {
|
|
390
392
|
iconClass: "16_16_arrow_left",
|
|
391
393
|
color: "#1a1a1a",
|
|
392
394
|
style: { width: "16px", height: "16px" }
|
|
393
395
|
})
|
|
394
396
|
]),
|
|
395
397
|
"next-month": f(() => [
|
|
396
|
-
|
|
398
|
+
Z(x, {
|
|
397
399
|
iconClass: "16_16_arrow_right",
|
|
398
400
|
color: "#1a1a1a",
|
|
399
401
|
style: { width: "16px", height: "16px" }
|
|
400
402
|
})
|
|
401
403
|
]),
|
|
402
404
|
"prev-year": f(() => [
|
|
403
|
-
|
|
405
|
+
Z(x, {
|
|
404
406
|
iconClass: "16_16_arrow_2left",
|
|
405
407
|
color: "#1a1a1a",
|
|
406
408
|
style: { width: "16px", height: "16px" }
|
|
407
409
|
})
|
|
408
410
|
]),
|
|
409
411
|
"next-year": f(() => [
|
|
410
|
-
|
|
412
|
+
Z(x, {
|
|
411
413
|
iconClass: "16_16_arrow_2right",
|
|
412
414
|
color: "#1a1a1a",
|
|
413
415
|
style: { width: "16px", height: "16px" }
|
|
@@ -1223,13 +1225,13 @@ const he = {
|
|
|
1223
1225
|
}), lA({
|
|
1224
1226
|
footer: f(() => [
|
|
1225
1227
|
G.$slots.footer ? P(G.$slots, "footer", { key: 0 }) : (i(), D("div", he, [
|
|
1226
|
-
|
|
1228
|
+
Z(sA, { onClick: p }, {
|
|
1227
1229
|
default: f(() => [
|
|
1228
1230
|
iA(AA(A.cancelText), 1)
|
|
1229
1231
|
]),
|
|
1230
1232
|
_: 1
|
|
1231
1233
|
}),
|
|
1232
|
-
|
|
1234
|
+
Z(sA, {
|
|
1233
1235
|
type: "primary",
|
|
1234
1236
|
onClick: M
|
|
1235
1237
|
}, {
|
|
@@ -1500,7 +1502,7 @@ const Ie = /* @__PURE__ */ O({
|
|
|
1500
1502
|
const o = e, t = (n) => n == null || typeof n == "string" && n.trim() === "", r = A, l = N({}), p = N(), s = (n, C) => l.value[n]?.[C], g = (n, C, v) => {
|
|
1501
1503
|
l.value[n] || (l.value[n] = {}), v ? l.value[n][C] = v : (delete l.value[n][C], Object.keys(l.value[n]).length === 0 && delete l.value[n]);
|
|
1502
1504
|
}, u = (n, C) => {
|
|
1503
|
-
const v = r.columns?.find((
|
|
1505
|
+
const v = r.columns?.find((S) => S.prop === C), y = r.data?.[n];
|
|
1504
1506
|
if (!v || !v.required || !C || !y)
|
|
1505
1507
|
return g(n, C, null), !0;
|
|
1506
1508
|
const aA = y[C];
|
|
@@ -1595,13 +1597,13 @@ const Ie = /* @__PURE__ */ O({
|
|
|
1595
1597
|
onScroll: kA
|
|
1596
1598
|
}), {
|
|
1597
1599
|
default: f(() => [
|
|
1598
|
-
(i(!0), D(W, null, j(r.columns.filter((
|
|
1600
|
+
(i(!0), D(W, null, j(r.columns.filter((S) => S.visible !== !1), (S, zA) => (i(), z(y, U({ key: zA }, { ref_for: !0 }, S), lA({
|
|
1599
1601
|
default: f((eA) => [
|
|
1600
|
-
|
|
1602
|
+
S.slotName ? (i(), z(v, {
|
|
1601
1603
|
key: 0,
|
|
1602
|
-
visible: !!s(eA.$index,
|
|
1604
|
+
visible: !!s(eA.$index, S.prop),
|
|
1603
1605
|
"show-arrow": !1,
|
|
1604
|
-
content: s(eA.$index,
|
|
1606
|
+
content: s(eA.$index, S.prop),
|
|
1605
1607
|
placement: "bottom-start",
|
|
1606
1608
|
manual: "",
|
|
1607
1609
|
effect: "light",
|
|
@@ -1609,11 +1611,11 @@ const Ie = /* @__PURE__ */ O({
|
|
|
1609
1611
|
}, {
|
|
1610
1612
|
default: f(() => [
|
|
1611
1613
|
H("div", {
|
|
1612
|
-
class: rA(["yw-table-cell-content", { "is-error": s(eA.$index,
|
|
1614
|
+
class: rA(["yw-table-cell-content", { "is-error": s(eA.$index, S.prop) }])
|
|
1613
1615
|
}, [
|
|
1614
|
-
|
|
1616
|
+
S.prop && !S.isEdit && t(M(eA.row, S.prop)) ? (i(), D(W, { key: 0 }, [
|
|
1615
1617
|
iA(" - ")
|
|
1616
|
-
], 64)) : P(n.$slots,
|
|
1618
|
+
], 64)) : P(n.$slots, S.slotName, U({
|
|
1617
1619
|
key: 1,
|
|
1618
1620
|
ref_for: !0
|
|
1619
1621
|
}, eA), void 0, !0)
|
|
@@ -1621,17 +1623,17 @@ const Ie = /* @__PURE__ */ O({
|
|
|
1621
1623
|
]),
|
|
1622
1624
|
_: 2
|
|
1623
1625
|
}, 1032, ["visible", "content"])) : (i(), D(W, { key: 1 }, [
|
|
1624
|
-
["selection", "index", "expand"].includes(
|
|
1625
|
-
iA(AA(t(M(eA.row,
|
|
1626
|
+
["selection", "index", "expand"].includes(S.type) ? (i(), D(W, { key: 0 }, [], 64)) : (i(), D(W, { key: 1 }, [
|
|
1627
|
+
iA(AA(t(M(eA.row, S.prop)) ? "-" : M(eA.row, S.prop)), 1)
|
|
1626
1628
|
], 64))
|
|
1627
1629
|
], 64))
|
|
1628
1630
|
]),
|
|
1629
1631
|
_: 2
|
|
1630
1632
|
}, [
|
|
1631
|
-
|
|
1633
|
+
S.slotHeaderName ? {
|
|
1632
1634
|
name: "header",
|
|
1633
1635
|
fn: f((eA) => [
|
|
1634
|
-
P(n.$slots,
|
|
1636
|
+
P(n.$slots, S.slotHeaderName, U({ ref_for: !0 }, eA), void 0, !0)
|
|
1635
1637
|
]),
|
|
1636
1638
|
key: "0"
|
|
1637
1639
|
} : void 0
|
|
@@ -1641,7 +1643,7 @@ const Ie = /* @__PURE__ */ O({
|
|
|
1641
1643
|
}, 16, ["data"]);
|
|
1642
1644
|
};
|
|
1643
1645
|
}
|
|
1644
|
-
}), gA = /* @__PURE__ */ DA(Ie, [["__scopeId", "data-v-
|
|
1646
|
+
}), gA = /* @__PURE__ */ DA(Ie, [["__scopeId", "data-v-378ac542"]]);
|
|
1645
1647
|
gA.install = (A) => {
|
|
1646
1648
|
A.component("YwTable", gA);
|
|
1647
1649
|
};
|
|
@@ -1851,7 +1853,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
1851
1853
|
style: _({ cursor: A.currentPage === 1 ? "not-allowed" : "pointer" }),
|
|
1852
1854
|
onClick: d
|
|
1853
1855
|
}, [
|
|
1854
|
-
|
|
1856
|
+
Z(E(x), {
|
|
1855
1857
|
"icon-class": "12_12_arrow_left",
|
|
1856
1858
|
class: "svg-icon-page",
|
|
1857
1859
|
style: _({ color: A.currentPage == 1 ? "#B3B5C7" : "#1A1A1A" })
|
|
@@ -1866,7 +1868,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
1866
1868
|
onMouseleave: I[1] || (I[1] = (R) => s.value = !1),
|
|
1867
1869
|
onClick: q
|
|
1868
1870
|
}, [
|
|
1869
|
-
|
|
1871
|
+
Z(E(x), {
|
|
1870
1872
|
"icon-class": E(s) ? "arrow_2left" : "more",
|
|
1871
1873
|
class: "svg-icon-page",
|
|
1872
1874
|
style: _({ color: E(s) ? "#1951FA" : "" })
|
|
@@ -1879,7 +1881,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
1879
1881
|
onMouseleave: I[3] || (I[3] = (R) => g.value = !1),
|
|
1880
1882
|
onClick: F
|
|
1881
1883
|
}, [
|
|
1882
|
-
|
|
1884
|
+
Z(E(x), {
|
|
1883
1885
|
"icon-class": E(g) ? "arrow_2right" : "more",
|
|
1884
1886
|
class: "svg-icon-page",
|
|
1885
1887
|
style: _({ color: E(g) ? "#1951FA" : "" })
|
|
@@ -1895,14 +1897,14 @@ const uA = /* @__PURE__ */ O({
|
|
|
1895
1897
|
style: _({ cursor: A.currentPage === E(Q) ? "not-allowed" : "pointer" }),
|
|
1896
1898
|
onClick: K
|
|
1897
1899
|
}, [
|
|
1898
|
-
|
|
1900
|
+
Z(E(x), {
|
|
1899
1901
|
"icon-class": "12_12_arrow_right",
|
|
1900
1902
|
class: "svg-icon-page",
|
|
1901
1903
|
style: _({ color: A.currentPage == E(Q) ? "#B3B5C7" : "#1A1A1A" })
|
|
1902
1904
|
}, null, 8, ["style"])
|
|
1903
1905
|
], 4),
|
|
1904
1906
|
E(t) ? (i(), D("div", fe, [
|
|
1905
|
-
|
|
1907
|
+
Z(X, {
|
|
1906
1908
|
modelValue: E(M),
|
|
1907
1909
|
"onUpdate:modelValue": I[4] || (I[4] = (k) => oA(M) ? M.value = k : null),
|
|
1908
1910
|
"suffix-icon": E(p),
|
|
@@ -1920,7 +1922,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
1920
1922
|
])) : $("", !0),
|
|
1921
1923
|
E(r) ? (i(), D("div", Ke, [
|
|
1922
1924
|
I[6] || (I[6] = H("span", null, "前往", -1)),
|
|
1923
|
-
|
|
1925
|
+
Z(uA, {
|
|
1924
1926
|
modelValue: E(G),
|
|
1925
1927
|
"onUpdate:modelValue": I[5] || (I[5] = (k) => oA(G) ? G.value = k : null),
|
|
1926
1928
|
min: 1,
|
|
@@ -2063,7 +2065,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
2063
2065
|
default: f(() => [
|
|
2064
2066
|
H("div", ke, [
|
|
2065
2067
|
A.isTree ? (i(), D("div", ze, [
|
|
2066
|
-
|
|
2068
|
+
Z(cA, {
|
|
2067
2069
|
ref: "treeRef",
|
|
2068
2070
|
class: "organization-tree",
|
|
2069
2071
|
data: A.treeData,
|
|
@@ -2097,20 +2099,20 @@ const uA = /* @__PURE__ */ O({
|
|
|
2097
2099
|
onRowClick: d
|
|
2098
2100
|
}, lA({
|
|
2099
2101
|
"header-selection": f((B) => [
|
|
2100
|
-
|
|
2102
|
+
Z(E(x), {
|
|
2101
2103
|
"icon-class": q(),
|
|
2102
2104
|
style: { width: "16px", height: "16px" },
|
|
2103
2105
|
onClick: F
|
|
2104
2106
|
}, null, 8, ["icon-class"])
|
|
2105
2107
|
]),
|
|
2106
2108
|
selection: f((B) => [
|
|
2107
|
-
|
|
2109
|
+
Z(E(x), {
|
|
2108
2110
|
"icon-class": b(B.row),
|
|
2109
2111
|
style: { width: "16px", height: "16px" }
|
|
2110
2112
|
}, null, 8, ["icon-class"])
|
|
2111
2113
|
]),
|
|
2112
2114
|
radio: f((B) => [
|
|
2113
|
-
|
|
2115
|
+
Z(E(x), {
|
|
2114
2116
|
"icon-class": L(B.row),
|
|
2115
2117
|
style: { width: "16px", height: "16px" }
|
|
2116
2118
|
}, null, 8, ["icon-class"])
|
|
@@ -2124,7 +2126,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
2124
2126
|
])
|
|
2125
2127
|
}))
|
|
2126
2128
|
]), 1032, ["columns", "data"])),
|
|
2127
|
-
|
|
2129
|
+
Z(dA, {
|
|
2128
2130
|
class: "selector-pagination",
|
|
2129
2131
|
total: A.tableTotal,
|
|
2130
2132
|
pagerCount: 3,
|
|
@@ -2138,7 +2140,7 @@ const uA = /* @__PURE__ */ O({
|
|
|
2138
2140
|
], 4),
|
|
2139
2141
|
A.multiple ? (i(), D("div", Ze, [
|
|
2140
2142
|
H("div", be, "已选(" + AA(E(u).length) + ")", 1),
|
|
2141
|
-
|
|
2143
|
+
Z(gA, {
|
|
2142
2144
|
border: !0,
|
|
2143
2145
|
columns: A.selectedTableColumns,
|
|
2144
2146
|
data: E(u),
|