@yidun/antd-super-table 0.1.5 → 0.1.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/README.md +9 -0
- package/dist/index.js +680 -670
- package/example/index.vue +117 -3
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var tn = Object.defineProperty;
|
|
3
3
|
var nn = (t, e, o) => e in t ? tn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
4
4
|
var Re = (t, e, o) => nn(t, typeof e != "symbol" ? e + "" : e, o);
|
|
5
|
-
import { h as
|
|
5
|
+
import { h as W, defineComponent as de, computed as F, resolveComponent as L, createElementBlock as z, openBlock as $, normalizeClass as b, unref as h, createCommentVNode as R, Fragment as Oe, renderList as ct, normalizeStyle as ne, renderSlot as he, createBlock as N, withCtx as C, createVNode as E, createTextVNode as J, toDisplayString as ye, createElementVNode as H, withMemo as Ft, resolveDynamicComponent as Ke, normalizeProps as st, mergeProps as le, ref as oe, watchEffect as Ct, watch as we, useAttrs as on, reactive as Qe, toRaw as fe, createApp as rn, onBeforeUnmount as sn, getCurrentInstance as an, markRaw as ln, shallowRef as cn, onMounted as un, createSlots as dn, nextTick as pn } from "vue";
|
|
6
6
|
import mn, { theme as fn, Form as hn, RangePicker as yn, DatePicker as gn, TreeSelect as bn, Cascader as vn, Select as Cn, InputNumber as _n, Input as En, Empty as Sn, ConfigProvider as xn, message as at } from "ant-design-vue";
|
|
7
7
|
import { DownOutlined as Mt, HolderOutlined as Ae, EyeOutlined as wn, SettingOutlined as $n, VerticalAlignBottomOutlined as _t, PushpinOutlined as Et, VerticalAlignTopOutlined as St, MinusCircleOutlined as xt, PlusOutlined as Bt, UpOutlined as kn, PlusCircleFilled as In, SettingFilled as On, FilterFilled as An, ReloadOutlined as Pn, InfoCircleFilled as Tn } from "@ant-design/icons-vue";
|
|
8
8
|
import { slice as wt, isFunction as $e, get as Xe, castArray as Fe, debounce as ft, pick as ke, omit as Rt, set as Ue, cloneDeep as lt, sortBy as ut, unionBy as $t, uniqueId as Ln, merge as Dn } from "lodash-es";
|
|
@@ -236,8 +236,8 @@ function Hn() {
|
|
|
236
236
|
}
|
|
237
237
|
Hn();
|
|
238
238
|
const { defaultAlgorithm: qn, defaultSeed: zn } = fn, re = qn(zn);
|
|
239
|
-
var
|
|
240
|
-
const Ht = Object.values(
|
|
239
|
+
var ge = /* @__PURE__ */ ((t) => (t.order = "_order", t.orderInScene = "_orderInScene", t.defaultValue = "_defaultValue", t.selected = "_selected", t))(ge || {});
|
|
240
|
+
const Ht = Object.values(ge), G = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -650,8 +650,8 @@ class c {
|
|
|
650
650
|
prec: n,
|
|
651
651
|
right_a: c.right_associative.has(o)
|
|
652
652
|
}, f = o;
|
|
653
|
-
const
|
|
654
|
-
for (; r.length > 2 &&
|
|
653
|
+
const v = (y) => s.right_a && y.right_a ? n > y.prec : n <= y.prec;
|
|
654
|
+
for (; r.length > 2 && v(r[r.length - 2]); )
|
|
655
655
|
i = r.pop(), o = r.pop().value, l = r.pop(), e = {
|
|
656
656
|
type: c.BINARY_EXP,
|
|
657
657
|
operator: o,
|
|
@@ -1299,12 +1299,12 @@ U.prototype.evaluate = function(t, e, o, n) {
|
|
|
1299
1299
|
return;
|
|
1300
1300
|
const p = U.toPathArray(t);
|
|
1301
1301
|
p[0] === "$" && p.length > 1 && p.shift(), this._hasParentSelector = null;
|
|
1302
|
-
const f = this._trace(p, e, ["$"], r, s, o).filter(function(
|
|
1303
|
-
return
|
|
1302
|
+
const f = this._trace(p, e, ["$"], r, s, o).filter(function(v) {
|
|
1303
|
+
return v && !v.isParentSelector;
|
|
1304
1304
|
});
|
|
1305
|
-
return f.length ? !i && f.length === 1 && !f[0].hasArrExpr ? this._getPreferredOutput(f[0]) : f.reduce((
|
|
1305
|
+
return f.length ? !i && f.length === 1 && !f[0].hasArrExpr ? this._getPreferredOutput(f[0]) : f.reduce((v, y) => {
|
|
1306
1306
|
const u = this._getPreferredOutput(y);
|
|
1307
|
-
return l && Array.isArray(u) ?
|
|
1307
|
+
return l && Array.isArray(u) ? v = v.concat(u) : v.push(u), v;
|
|
1308
1308
|
}, []) : i ? [] : void 0;
|
|
1309
1309
|
};
|
|
1310
1310
|
U.prototype._getPreferredOutput = function(t) {
|
|
@@ -1342,27 +1342,27 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1342
1342
|
parentProperty: r,
|
|
1343
1343
|
hasArrExpr: l
|
|
1344
1344
|
}, this._handleCallback(p, s, "value"), p;
|
|
1345
|
-
const f = t[0],
|
|
1345
|
+
const f = t[0], v = t.slice(1), y = [];
|
|
1346
1346
|
function u(m) {
|
|
1347
1347
|
Array.isArray(m) ? m.forEach((x) => {
|
|
1348
1348
|
y.push(x);
|
|
1349
1349
|
}) : y.push(m);
|
|
1350
1350
|
}
|
|
1351
1351
|
if ((typeof f != "string" || i) && e && Object.hasOwn(e, f))
|
|
1352
|
-
u(this._trace(
|
|
1352
|
+
u(this._trace(v, e[f], xe(o, f), e, f, s, l));
|
|
1353
1353
|
else if (f === "*")
|
|
1354
1354
|
this._walk(e, (m) => {
|
|
1355
|
-
u(this._trace(
|
|
1355
|
+
u(this._trace(v, e[m], xe(o, m), e, m, s, !0, !0));
|
|
1356
1356
|
});
|
|
1357
1357
|
else if (f === "..")
|
|
1358
|
-
u(this._trace(
|
|
1358
|
+
u(this._trace(v, e, o, n, r, s, l)), this._walk(e, (m) => {
|
|
1359
1359
|
typeof e[m] == "object" && u(this._trace(t.slice(), e[m], xe(o, m), e, m, s, !0));
|
|
1360
1360
|
});
|
|
1361
1361
|
else {
|
|
1362
1362
|
if (f === "^")
|
|
1363
1363
|
return this._hasParentSelector = !0, {
|
|
1364
1364
|
path: o.slice(0, -1),
|
|
1365
|
-
expr:
|
|
1365
|
+
expr: v,
|
|
1366
1366
|
isParentSelector: !0
|
|
1367
1367
|
};
|
|
1368
1368
|
if (f === "~")
|
|
@@ -1373,23 +1373,23 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1373
1373
|
parentProperty: null
|
|
1374
1374
|
}, this._handleCallback(p, s, "property"), p;
|
|
1375
1375
|
if (f === "$")
|
|
1376
|
-
u(this._trace(
|
|
1376
|
+
u(this._trace(v, e, o, null, null, s, l));
|
|
1377
1377
|
else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))
|
|
1378
|
-
u(this._slice(f,
|
|
1378
|
+
u(this._slice(f, v, e, o, n, r, s));
|
|
1379
1379
|
else if (f.indexOf("?(") === 0) {
|
|
1380
1380
|
if (this.currEval === !1)
|
|
1381
1381
|
throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
|
|
1382
1382
|
const m = f.replace(/^\?\((.*?)\)$/u, "$1"), x = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);
|
|
1383
1383
|
x ? this._walk(e, (P) => {
|
|
1384
1384
|
const S = [x[2]], M = x[1] ? e[P][x[1]] : e[P];
|
|
1385
|
-
this._trace(S, M, o, n, r, s, !0).length > 0 && u(this._trace(
|
|
1385
|
+
this._trace(S, M, o, n, r, s, !0).length > 0 && u(this._trace(v, e[P], xe(o, P), e, P, s, !0));
|
|
1386
1386
|
}) : this._walk(e, (P) => {
|
|
1387
|
-
this._eval(m, e[P], P, o, n, r) && u(this._trace(
|
|
1387
|
+
this._eval(m, e[P], P, o, n, r) && u(this._trace(v, e[P], xe(o, P), e, P, s, !0));
|
|
1388
1388
|
});
|
|
1389
1389
|
} else if (f[0] === "(") {
|
|
1390
1390
|
if (this.currEval === !1)
|
|
1391
1391
|
throw new Error("Eval [(expr)] prevented in JSONPath expression.");
|
|
1392
|
-
u(this._trace(mt(this._eval(f, e, o.at(-1), o.slice(0, -1), n, r),
|
|
1392
|
+
u(this._trace(mt(this._eval(f, e, o.at(-1), o.slice(0, -1), n, r), v), e, o, n, r, s, l));
|
|
1393
1393
|
} else if (f[0] === "@") {
|
|
1394
1394
|
let m = !1;
|
|
1395
1395
|
const x = f.slice(1, -2);
|
|
@@ -1437,12 +1437,12 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1437
1437
|
}, this._handleCallback(p, s, "value"), p;
|
|
1438
1438
|
} else if (f[0] === "`" && e && Object.hasOwn(e, f.slice(1))) {
|
|
1439
1439
|
const m = f.slice(1);
|
|
1440
|
-
u(this._trace(
|
|
1440
|
+
u(this._trace(v, e[m], xe(o, m), e, m, s, l, !0));
|
|
1441
1441
|
} else if (f.includes(",")) {
|
|
1442
1442
|
const m = f.split(",");
|
|
1443
1443
|
for (const x of m)
|
|
1444
|
-
u(this._trace(mt(x,
|
|
1445
|
-
} else !i && e && Object.hasOwn(e, f) && u(this._trace(
|
|
1444
|
+
u(this._trace(mt(x, v), e, o, n, r, s, !0));
|
|
1445
|
+
} else !i && e && Object.hasOwn(e, f) && u(this._trace(v, e[f], xe(o, f), e, f, s, l, !0));
|
|
1446
1446
|
}
|
|
1447
1447
|
if (this._hasParentSelector)
|
|
1448
1448
|
for (let m = 0; m < y.length; m++) {
|
|
@@ -1473,10 +1473,10 @@ U.prototype._slice = function(t, e, o, n, r, s, l) {
|
|
|
1473
1473
|
if (!Array.isArray(o))
|
|
1474
1474
|
return;
|
|
1475
1475
|
const i = o.length, p = t.split(":"), f = p[2] && Number.parseInt(p[2]) || 1;
|
|
1476
|
-
let
|
|
1477
|
-
|
|
1476
|
+
let v = p[0] && Number.parseInt(p[0]) || 0, y = p[1] && Number.parseInt(p[1]) || i;
|
|
1477
|
+
v = v < 0 ? Math.max(0, v + i) : Math.min(i, v), y = y < 0 ? Math.max(0, y + i) : Math.min(i, y);
|
|
1478
1478
|
const u = [];
|
|
1479
|
-
for (let m =
|
|
1479
|
+
for (let m = v; m < y; m += f)
|
|
1480
1480
|
this._trace(mt(m, e), o, n, r, s, l, !0).forEach((P) => {
|
|
1481
1481
|
u.push(P);
|
|
1482
1482
|
});
|
|
@@ -1571,9 +1571,9 @@ class ro {
|
|
|
1571
1571
|
const n = Object.keys(e), r = [];
|
|
1572
1572
|
oo(n, r, (f) => typeof e[f] == "function");
|
|
1573
1573
|
const s = n.map((f) => e[f]);
|
|
1574
|
-
o = r.reduce((f,
|
|
1575
|
-
let y = e[
|
|
1576
|
-
return /function/u.test(y) || (y = "function " + y), "var " +
|
|
1574
|
+
o = r.reduce((f, v) => {
|
|
1575
|
+
let y = e[v].toString();
|
|
1576
|
+
return /function/u.test(y) || (y = "function " + y), "var " + v + "=" + y + ";" + f;
|
|
1577
1577
|
}, "") + o, !/(['"])use strict\1/u.test(o) && !n.includes("arguments") && (o = "var arguments = undefined;" + o), o = o.replace(/;\s*$/u, "");
|
|
1578
1578
|
const i = o.lastIndexOf(";"), p = i !== -1 ? o.slice(0, i + 1) + " return " + o.slice(i + 1) : " return " + o;
|
|
1579
1579
|
return new Function(...n, p)(...s);
|
|
@@ -1582,7 +1582,7 @@ class ro {
|
|
|
1582
1582
|
U.prototype.vm = {
|
|
1583
1583
|
Script: ro
|
|
1584
1584
|
};
|
|
1585
|
-
const
|
|
1585
|
+
const _e = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(), Ot = (t) => (ao(t), t.map((e, o) => ({
|
|
1586
1586
|
...e,
|
|
1587
1587
|
props: e.props ?? {},
|
|
1588
1588
|
visible: e.visible ?? !0,
|
|
@@ -1597,7 +1597,7 @@ const Ce = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(),
|
|
|
1597
1597
|
visible: s,
|
|
1598
1598
|
resizable: l,
|
|
1599
1599
|
ellipsis: i,
|
|
1600
|
-
component: p ?
|
|
1600
|
+
component: p ? W(p) : void 0,
|
|
1601
1601
|
index: o
|
|
1602
1602
|
};
|
|
1603
1603
|
})), so = (t, e, o) => t.sort((n, r) => o.indexOf(n.code) - o.indexOf(r.code)).map((n) => {
|
|
@@ -1628,7 +1628,7 @@ const ao = (t) => {
|
|
|
1628
1628
|
{ required: !0 },
|
|
1629
1629
|
{
|
|
1630
1630
|
validator(n, r, s) {
|
|
1631
|
-
return ["string", "function"].includes(
|
|
1631
|
+
return ["string", "function"].includes(_e(r)) ? s() : s(new Error("type must be string or function"));
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
],
|
|
@@ -1642,7 +1642,7 @@ const ao = (t) => {
|
|
|
1642
1642
|
required: e.type === "component"
|
|
1643
1643
|
},
|
|
1644
1644
|
props: {
|
|
1645
|
-
validator: (n, r, s) => r && !["object", "function"].includes(
|
|
1645
|
+
validator: (n, r, s) => r && !["object", "function"].includes(_e(r)) ? s(new Error("props must be object or function")) : s()
|
|
1646
1646
|
}
|
|
1647
1647
|
}).validate(e, (n) => {
|
|
1648
1648
|
n && console.error(`[pro-table]: defineFormItems error, [${n[0].message}]`, {
|
|
@@ -1658,24 +1658,24 @@ const ao = (t) => {
|
|
|
1658
1658
|
type: [
|
|
1659
1659
|
{
|
|
1660
1660
|
validator(n, r, s) {
|
|
1661
|
-
return r ? ["string", "function"].includes(
|
|
1661
|
+
return r ? ["string", "function"].includes(_e(r)) ? _e(r) === "string" && !Object.keys(G).includes(r) ? s(new Error(`type must be one of ${Object.keys(G).join(", ")}`)) : s() : s(new Error("type must be string or function")) : s();
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
1664
|
],
|
|
1665
1665
|
title: [{ required: !0 }, { type: "string" }],
|
|
1666
1666
|
titleTooltip: {
|
|
1667
1667
|
validator(n, r, s) {
|
|
1668
|
-
return r && !["string", "function"].includes(
|
|
1668
|
+
return r && !["string", "function"].includes(_e(r)) ? s(new Error("titleTooltip must be string or function")) : s();
|
|
1669
1669
|
}
|
|
1670
1670
|
},
|
|
1671
1671
|
content: {
|
|
1672
1672
|
validator(n, r, s) {
|
|
1673
|
-
return r && !["string", "function"].includes(
|
|
1673
|
+
return r && !["string", "function"].includes(_e(r)) ? s(new Error("content must be string or function")) : s();
|
|
1674
1674
|
}
|
|
1675
1675
|
},
|
|
1676
1676
|
tooltip: {
|
|
1677
1677
|
validator(n, r, s) {
|
|
1678
|
-
return r && !["string", "boolean", "function"].includes(
|
|
1678
|
+
return r && !["string", "boolean", "function"].includes(_e(r)) ? s(new Error("tooltip must be string, boolean, or function")) : s();
|
|
1679
1679
|
}
|
|
1680
1680
|
},
|
|
1681
1681
|
component: {
|
|
@@ -1685,7 +1685,7 @@ const ao = (t) => {
|
|
|
1685
1685
|
ellipsis: { type: "boolean" },
|
|
1686
1686
|
props: {
|
|
1687
1687
|
validator(n, r, s) {
|
|
1688
|
-
return r && !["object", "function"].includes(
|
|
1688
|
+
return r && !["object", "function"].includes(_e(r)) ? s(new Error("props must be object or function")) : s();
|
|
1689
1689
|
}
|
|
1690
1690
|
}
|
|
1691
1691
|
}).validate(e, (n) => {
|
|
@@ -1789,30 +1789,30 @@ const ao = (t) => {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
},
|
|
1791
1791
|
setup(t) {
|
|
1792
|
-
const e = t, o = F(() => e.list.map((i) =>
|
|
1792
|
+
const e = t, o = F(() => e.list.map((i) => _e(i) === "object" ? i : { label: i }).map((i, p) => ({ ...i, index: p, __key: i.key ?? `${p}-${String(i.label)}` }))), n = F(() => wt(o.value, 0, e.maxCount)), r = F(
|
|
1793
1793
|
() => wt(o.value, e.maxCount, o.value.length)
|
|
1794
|
-
), s = F(() => r.value.map(({ index: i, disabled: p, label: f, onClick:
|
|
1794
|
+
), s = F(() => r.value.map(({ index: i, disabled: p, label: f, onClick: v }) => ({
|
|
1795
1795
|
key: i + e.maxCount,
|
|
1796
1796
|
label: f,
|
|
1797
1797
|
disabled: p,
|
|
1798
|
-
onClick: () =>
|
|
1798
|
+
onClick: () => v == null ? void 0 : v(e.record)
|
|
1799
1799
|
}))), l = F(() => {
|
|
1800
|
-
const i = {}, { maxCount: p, cellWidth: f, type:
|
|
1801
|
-
return
|
|
1800
|
+
const i = {}, { maxCount: p, cellWidth: f, type: v } = e;
|
|
1801
|
+
return v === G.text && (i.flex = 1), v === G.link && n.value.length > 1 && (i.maxWidth = `${((f - 50) / f / p * 100).toFixed(2)}%`), i;
|
|
1802
1802
|
});
|
|
1803
1803
|
return (i, p) => {
|
|
1804
|
-
const f =
|
|
1805
|
-
return
|
|
1806
|
-
class:
|
|
1804
|
+
const f = L("a-tag"), v = L("a-popover"), y = L("a-button"), u = L("a-menu"), m = L("a-dropdown");
|
|
1805
|
+
return $(), z("div", {
|
|
1806
|
+
class: b([
|
|
1807
1807
|
i.$style.ellipsisElement,
|
|
1808
1808
|
{
|
|
1809
1809
|
[i.$style.ellipsisElementHasGap]: ![h(G).button, h(G).tag].includes(t.type)
|
|
1810
1810
|
}
|
|
1811
1811
|
])
|
|
1812
1812
|
}, [
|
|
1813
|
-
(
|
|
1813
|
+
($(!0), z(Oe, null, ct(n.value, (x, P) => ($(), z("div", {
|
|
1814
1814
|
key: x.__key,
|
|
1815
|
-
class:
|
|
1815
|
+
class: b(i.$style.elementItem),
|
|
1816
1816
|
style: ne(l.value)
|
|
1817
1817
|
}, [
|
|
1818
1818
|
he(i.$slots, "default", {
|
|
@@ -1820,18 +1820,18 @@ const ao = (t) => {
|
|
|
1820
1820
|
index: P
|
|
1821
1821
|
})
|
|
1822
1822
|
], 6))), 128)),
|
|
1823
|
-
r.value.length ? (
|
|
1824
|
-
t.displayType === "popover" ? (
|
|
1823
|
+
r.value.length ? ($(), z(Oe, { key: 0 }, [
|
|
1824
|
+
t.displayType === "popover" ? ($(), N(v, {
|
|
1825
1825
|
key: 0,
|
|
1826
1826
|
trigger: t.trigger,
|
|
1827
1827
|
"overlay-style": { maxWidth: "500px" },
|
|
1828
1828
|
"destroy-on-close": ""
|
|
1829
1829
|
}, {
|
|
1830
|
-
content:
|
|
1830
|
+
content: C(() => [
|
|
1831
1831
|
H("div", {
|
|
1832
|
-
class:
|
|
1832
|
+
class: b(i.$style.ellipsisList)
|
|
1833
1833
|
}, [
|
|
1834
|
-
(
|
|
1834
|
+
($(!0), z(Oe, null, ct(r.value, (x, P) => he(i.$slots, "default", {
|
|
1835
1835
|
key: x.__key,
|
|
1836
1836
|
item: x,
|
|
1837
1837
|
index: P + t.maxCount,
|
|
@@ -1839,41 +1839,41 @@ const ao = (t) => {
|
|
|
1839
1839
|
})), 128))
|
|
1840
1840
|
], 2)
|
|
1841
1841
|
]),
|
|
1842
|
-
default:
|
|
1843
|
-
|
|
1842
|
+
default: C(() => [
|
|
1843
|
+
E(f, {
|
|
1844
1844
|
size: "mini",
|
|
1845
1845
|
type: "info",
|
|
1846
|
-
class:
|
|
1846
|
+
class: b([
|
|
1847
1847
|
i.$style.ellipsisTag,
|
|
1848
1848
|
{
|
|
1849
1849
|
[i.$style.imageEllipsisTag]: t.type === h(G).image
|
|
1850
1850
|
}
|
|
1851
1851
|
])
|
|
1852
1852
|
}, {
|
|
1853
|
-
default:
|
|
1854
|
-
|
|
1853
|
+
default: C(() => [
|
|
1854
|
+
J(ye(`+${r.value.length}...`), 1)
|
|
1855
1855
|
]),
|
|
1856
1856
|
_: 1
|
|
1857
1857
|
}, 8, ["class"])
|
|
1858
1858
|
]),
|
|
1859
1859
|
_: 3
|
|
1860
1860
|
}, 8, ["trigger"])) : R("", !0),
|
|
1861
|
-
t.displayType === "dropdown" ? (
|
|
1861
|
+
t.displayType === "dropdown" ? ($(), N(m, {
|
|
1862
1862
|
key: 1,
|
|
1863
1863
|
"destroy-on-close": "",
|
|
1864
1864
|
trigger: t.trigger
|
|
1865
1865
|
}, {
|
|
1866
|
-
overlay:
|
|
1867
|
-
|
|
1866
|
+
overlay: C(() => [
|
|
1867
|
+
E(u, { items: s.value }, null, 8, ["items"])
|
|
1868
1868
|
]),
|
|
1869
|
-
default:
|
|
1870
|
-
|
|
1869
|
+
default: C(() => [
|
|
1870
|
+
E(y, {
|
|
1871
1871
|
type: "link",
|
|
1872
1872
|
size: "small"
|
|
1873
1873
|
}, {
|
|
1874
|
-
default:
|
|
1875
|
-
p[0] || (p[0] =
|
|
1876
|
-
|
|
1874
|
+
default: C(() => [
|
|
1875
|
+
p[0] || (p[0] = J(" 更多 ")),
|
|
1876
|
+
E(h(Mt))
|
|
1877
1877
|
]),
|
|
1878
1878
|
_: 1
|
|
1879
1879
|
})
|
|
@@ -1892,14 +1892,14 @@ const ao = (t) => {
|
|
|
1892
1892
|
ellipsisTag: go,
|
|
1893
1893
|
imageEllipsisTag: bo,
|
|
1894
1894
|
ellipsisList: vo
|
|
1895
|
-
},
|
|
1895
|
+
}, be = (t, e) => {
|
|
1896
1896
|
const o = t.__vccOpts || t;
|
|
1897
1897
|
for (const [n, r] of e)
|
|
1898
1898
|
o[n] = r;
|
|
1899
1899
|
return o;
|
|
1900
1900
|
}, _o = {
|
|
1901
1901
|
$style: Co
|
|
1902
|
-
}, Eo = /* @__PURE__ */
|
|
1902
|
+
}, Eo = /* @__PURE__ */ be(po, [["__cssModules", _o]]), So = { key: 1 }, xo = /* @__PURE__ */ de({
|
|
1903
1903
|
__name: "TableCellContent",
|
|
1904
1904
|
props: {
|
|
1905
1905
|
/**
|
|
@@ -1950,8 +1950,8 @@ const ao = (t) => {
|
|
|
1950
1950
|
if (S.startsWith("$")) {
|
|
1951
1951
|
let M = o.get(S);
|
|
1952
1952
|
M || (M = /* @__PURE__ */ new WeakMap(), o.set(S, M));
|
|
1953
|
-
const
|
|
1954
|
-
if (
|
|
1953
|
+
const V = M.get(x);
|
|
1954
|
+
if (V !== void 0) return V;
|
|
1955
1955
|
const q = U({ path: S, json: x });
|
|
1956
1956
|
return M.set(x, q), q;
|
|
1957
1957
|
}
|
|
@@ -1976,22 +1976,22 @@ const ao = (t) => {
|
|
|
1976
1976
|
return S(x, m);
|
|
1977
1977
|
const M = s.value[0];
|
|
1978
1978
|
return (M == null ? void 0 : M.label) || M;
|
|
1979
|
-
}), p = F(() => !(["", void 0, null].includes(r.value) && ![G.component, G.sort].includes(n.value))), f = (m) => typeof m == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(m),
|
|
1979
|
+
}), p = F(() => !(["", void 0, null].includes(r.value) && ![G.component, G.sort].includes(n.value))), f = (m) => typeof m == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(m), v = (m) => e.hasRouter && !f(m), y = (m) => v(m) ? "router-link" : "a", u = (m, x) => v(m) ? { to: m, target: x ?? "_blank" } : { href: m, target: x ?? "_blank" };
|
|
1980
1980
|
return (m, x) => {
|
|
1981
1981
|
var q;
|
|
1982
|
-
const P =
|
|
1983
|
-
return p.value ? (
|
|
1982
|
+
const P = L("a-button"), S = L("a-typography-text"), M = L("a-tag"), V = L("a-image");
|
|
1983
|
+
return p.value ? ($(), z("div", {
|
|
1984
1984
|
key: 0,
|
|
1985
|
-
class:
|
|
1985
|
+
class: b(m.$style.tableCellContent)
|
|
1986
1986
|
}, [
|
|
1987
|
-
n.value === h(G).sort ? (
|
|
1987
|
+
n.value === h(G).sort ? ($(), N(P, {
|
|
1988
1988
|
key: 0,
|
|
1989
1989
|
type: "text",
|
|
1990
1990
|
size: "small",
|
|
1991
|
-
icon:
|
|
1992
|
-
class:
|
|
1991
|
+
icon: W(h(Ae)),
|
|
1992
|
+
class: b([m.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1993
1993
|
}, null, 8, ["icon", "class"])) : R("", !0),
|
|
1994
|
-
n.value === h(G).component ? (
|
|
1994
|
+
n.value === h(G).component ? ($(), N(Ke(t.column.component), st(le({ key: 1 }, l.value)), null, 16)) : Ft([(q = t.column) == null ? void 0 : q.key, t.index, s.value], () => ($(), N(Eo, {
|
|
1995
1995
|
key: 2,
|
|
1996
1996
|
list: s.value,
|
|
1997
1997
|
"max-count": n.value === h(G).text ? 1 : t.column.maxCount,
|
|
@@ -2000,61 +2000,61 @@ const ao = (t) => {
|
|
|
2000
2000
|
"cell-width": t.column.width,
|
|
2001
2001
|
"display-type": [h(G).button].includes(n.value) ? "dropdown" : "popover"
|
|
2002
2002
|
}, {
|
|
2003
|
-
default:
|
|
2004
|
-
n.value === h(G).text ? (
|
|
2005
|
-
_ === 0 ? (
|
|
2003
|
+
default: C(({ item: w, index: _, inPopover: T }) => [
|
|
2004
|
+
n.value === h(G).text ? ($(), z(Oe, { key: 0 }, [
|
|
2005
|
+
_ === 0 ? ($(), N(S, {
|
|
2006
2006
|
key: 0,
|
|
2007
2007
|
ellipsis: { tooltip: i.value },
|
|
2008
|
-
content: String(
|
|
2009
|
-
class:
|
|
2010
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (
|
|
2008
|
+
content: String(w.label),
|
|
2009
|
+
class: b(m.$style.antTypographyEllipsis)
|
|
2010
|
+
}, null, 8, ["ellipsis", "content", "class"])) : ($(), z("div", {
|
|
2011
2011
|
key: 1,
|
|
2012
|
-
class:
|
|
2013
|
-
}, ye(
|
|
2012
|
+
class: b(m.$style.textListItem)
|
|
2013
|
+
}, ye(w.label), 3))
|
|
2014
2014
|
], 64)) : R("", !0),
|
|
2015
|
-
n.value === h(G).link ? (
|
|
2016
|
-
default:
|
|
2017
|
-
t.column.ellipsis ? (
|
|
2015
|
+
n.value === h(G).link ? ($(), N(Ke(y(w.to)), st(le({ key: 1 }, u(w.to, w.target))), {
|
|
2016
|
+
default: C(() => [
|
|
2017
|
+
t.column.ellipsis ? ($(), N(S, {
|
|
2018
2018
|
key: 0,
|
|
2019
|
-
ellipsis: { tooltip:
|
|
2020
|
-
content: String(
|
|
2019
|
+
ellipsis: { tooltip: w.label },
|
|
2020
|
+
content: String(w.label),
|
|
2021
2021
|
style: ne({ color: h(re).colorPrimary }),
|
|
2022
|
-
class:
|
|
2023
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (
|
|
2022
|
+
class: b(m.$style.antTypographyEllipsis)
|
|
2023
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : ($(), z("span", So, ye(w.label), 1))
|
|
2024
2024
|
]),
|
|
2025
2025
|
_: 2
|
|
2026
2026
|
}, 1040)) : R("", !0),
|
|
2027
|
-
n.value === h(G).tag ? (
|
|
2028
|
-
default:
|
|
2029
|
-
|
|
2027
|
+
n.value === h(G).tag ? ($(), N(M, st(le({ key: 2 }, w)), {
|
|
2028
|
+
default: C(() => [
|
|
2029
|
+
J(ye(w.label), 1)
|
|
2030
2030
|
]),
|
|
2031
2031
|
_: 2
|
|
2032
2032
|
}, 1040)) : R("", !0),
|
|
2033
|
-
n.value === h(G).button ? (
|
|
2033
|
+
n.value === h(G).button ? ($(), N(P, le({
|
|
2034
2034
|
key: 3,
|
|
2035
2035
|
type: "link",
|
|
2036
2036
|
size: "small",
|
|
2037
|
-
disabled:
|
|
2038
|
-
},
|
|
2039
|
-
onClick: (
|
|
2037
|
+
disabled: w.disabled
|
|
2038
|
+
}, w.buttonProps, {
|
|
2039
|
+
onClick: (Z) => {
|
|
2040
2040
|
var ie;
|
|
2041
|
-
return (ie =
|
|
2041
|
+
return (ie = w.onClick) == null ? void 0 : ie.call(w, t.record, t.index);
|
|
2042
2042
|
}
|
|
2043
2043
|
}), {
|
|
2044
|
-
default:
|
|
2045
|
-
|
|
2044
|
+
default: C(() => [
|
|
2045
|
+
J(ye(w.label), 1)
|
|
2046
2046
|
]),
|
|
2047
2047
|
_: 2
|
|
2048
2048
|
}, 1040, ["disabled", "onClick"])) : R("", !0),
|
|
2049
|
-
n.value === h(G).image ? (
|
|
2049
|
+
n.value === h(G).image ? ($(), N(V, {
|
|
2050
2050
|
key: 4,
|
|
2051
|
-
width:
|
|
2052
|
-
height:
|
|
2053
|
-
src:
|
|
2051
|
+
width: T ? 100 : 32,
|
|
2052
|
+
height: T ? 100 : 32,
|
|
2053
|
+
src: w.label,
|
|
2054
2054
|
style: { objectFit: "cover" }
|
|
2055
2055
|
}, {
|
|
2056
|
-
previewMask:
|
|
2057
|
-
|
|
2056
|
+
previewMask: C(() => [
|
|
2057
|
+
E(h(wn))
|
|
2058
2058
|
]),
|
|
2059
2059
|
_: 2
|
|
2060
2060
|
}, 1032, ["width", "height", "src"])) : R("", !0)
|
|
@@ -2071,7 +2071,7 @@ const ao = (t) => {
|
|
|
2071
2071
|
textListItem: Io
|
|
2072
2072
|
}, Ao = {
|
|
2073
2073
|
$style: Oo
|
|
2074
|
-
}, Po = /* @__PURE__ */
|
|
2074
|
+
}, Po = /* @__PURE__ */ be(xo, [["__cssModules", Ao]]), To = de({
|
|
2075
2075
|
name: "VNodes",
|
|
2076
2076
|
props: {
|
|
2077
2077
|
vnodes: {
|
|
@@ -2097,18 +2097,18 @@ const ao = (t) => {
|
|
|
2097
2097
|
},
|
|
2098
2098
|
emits: ["change"],
|
|
2099
2099
|
setup(t, { emit: e }) {
|
|
2100
|
-
const o = oe(!1), n = t, r = e, s = oe([]), l = oe([]), i = oe([]), p = oe([]), f = oe(""),
|
|
2100
|
+
const o = oe(!1), n = t, r = e, s = oe([]), l = oe([]), i = oe([]), p = oe([]), f = oe(""), v = oe(""), y = () => {
|
|
2101
2101
|
l.value = s.value.filter((_) => _.fixed === "left"), i.value = s.value.filter((_) => !_.fixed), p.value = s.value.filter((_) => _.fixed === "right");
|
|
2102
2102
|
};
|
|
2103
2103
|
Ct(() => {
|
|
2104
2104
|
s.value = n.columns, y();
|
|
2105
2105
|
});
|
|
2106
2106
|
const u = ({ title: _ }) => {
|
|
2107
|
-
var
|
|
2108
|
-
const
|
|
2109
|
-
return
|
|
2107
|
+
var Z;
|
|
2108
|
+
const T = (Z = v.value) == null ? void 0 : Z.trim();
|
|
2109
|
+
return T ? _.toLocaleLowerCase().includes(T.toLocaleLowerCase()) : !0;
|
|
2110
2110
|
}, m = F(() => s.value.every((_) => !u(_))), x = ft((_) => {
|
|
2111
|
-
|
|
2111
|
+
v.value = _.target.value;
|
|
2112
2112
|
}, 300), P = () => {
|
|
2113
2113
|
s.value = [
|
|
2114
2114
|
...l.value,
|
|
@@ -2125,141 +2125,141 @@ const ao = (t) => {
|
|
|
2125
2125
|
return s.value.every((_) => _.visible);
|
|
2126
2126
|
},
|
|
2127
2127
|
set(_) {
|
|
2128
|
-
s.value.forEach((
|
|
2129
|
-
|
|
2128
|
+
s.value.forEach((T) => {
|
|
2129
|
+
T.visible = _;
|
|
2130
2130
|
}), S();
|
|
2131
2131
|
}
|
|
2132
|
-
}),
|
|
2133
|
-
const _ = s.value.filter((
|
|
2132
|
+
}), V = F(() => {
|
|
2133
|
+
const _ = s.value.filter((T) => T.visible).length;
|
|
2134
2134
|
return _ > 0 && _ < s.value.length;
|
|
2135
2135
|
}), q = () => {
|
|
2136
2136
|
r("change", []);
|
|
2137
|
-
},
|
|
2138
|
-
_.fixed =
|
|
2137
|
+
}, w = (_, T) => {
|
|
2138
|
+
_.fixed = T, y(), P(), S();
|
|
2139
2139
|
};
|
|
2140
2140
|
return Ct(() => {
|
|
2141
|
-
o.value || (f.value = "",
|
|
2142
|
-
}), (_,
|
|
2143
|
-
const
|
|
2144
|
-
return
|
|
2141
|
+
o.value || (f.value = "", v.value = "");
|
|
2142
|
+
}), (_, T) => {
|
|
2143
|
+
const Z = L("a-button"), ie = L("a-checkbox"), Pe = L("a-input"), Se = L("a-typography-text"), pe = L("a-tooltip"), Me = L("a-popover"), Te = L("a-config-provider");
|
|
2144
|
+
return $(), N(Te, { theme: {
|
|
2145
2145
|
token: {
|
|
2146
2146
|
borderRadius: 2
|
|
2147
2147
|
}
|
|
2148
2148
|
} }, {
|
|
2149
|
-
default:
|
|
2150
|
-
|
|
2149
|
+
default: C(() => [
|
|
2150
|
+
E(Me, {
|
|
2151
2151
|
open: o.value,
|
|
2152
|
-
"onUpdate:open":
|
|
2152
|
+
"onUpdate:open": T[2] || (T[2] = (D) => o.value = D),
|
|
2153
2153
|
placement: "bottomRight",
|
|
2154
2154
|
trigger: "click",
|
|
2155
2155
|
"overlay-inner-style": { padding: 0 },
|
|
2156
2156
|
"overlay-class-name": "pro-table-config-popover"
|
|
2157
2157
|
}, {
|
|
2158
|
-
content:
|
|
2158
|
+
content: C(() => [
|
|
2159
2159
|
H("div", {
|
|
2160
|
-
class:
|
|
2160
|
+
class: b(_.$style.tableConfig)
|
|
2161
2161
|
}, [
|
|
2162
2162
|
H("div", {
|
|
2163
|
-
class:
|
|
2163
|
+
class: b(_.$style.tableConfigActions)
|
|
2164
2164
|
}, [
|
|
2165
|
-
|
|
2165
|
+
E(ie, {
|
|
2166
2166
|
checked: M.value,
|
|
2167
|
-
"onUpdate:checked":
|
|
2168
|
-
indeterminate:
|
|
2167
|
+
"onUpdate:checked": T[0] || (T[0] = (D) => M.value = D),
|
|
2168
|
+
indeterminate: V.value
|
|
2169
2169
|
}, {
|
|
2170
|
-
default:
|
|
2171
|
-
|
|
2170
|
+
default: C(() => T[3] || (T[3] = [
|
|
2171
|
+
J(" 全选 ")
|
|
2172
2172
|
])),
|
|
2173
2173
|
_: 1
|
|
2174
2174
|
}, 8, ["checked", "indeterminate"]),
|
|
2175
|
-
|
|
2175
|
+
E(Z, {
|
|
2176
2176
|
type: "link",
|
|
2177
2177
|
size: "small",
|
|
2178
2178
|
onClick: q
|
|
2179
2179
|
}, {
|
|
2180
|
-
default:
|
|
2181
|
-
|
|
2180
|
+
default: C(() => T[4] || (T[4] = [
|
|
2181
|
+
J(" 重置 ")
|
|
2182
2182
|
])),
|
|
2183
2183
|
_: 1
|
|
2184
2184
|
})
|
|
2185
2185
|
], 2),
|
|
2186
2186
|
H("div", {
|
|
2187
|
-
class:
|
|
2187
|
+
class: b(_.$style.tableConfigHead)
|
|
2188
2188
|
}, [
|
|
2189
|
-
|
|
2189
|
+
E(Pe, {
|
|
2190
2190
|
value: f.value,
|
|
2191
|
-
"onUpdate:value":
|
|
2191
|
+
"onUpdate:value": T[1] || (T[1] = (D) => f.value = D),
|
|
2192
2192
|
placeholder: "搜索标题",
|
|
2193
2193
|
onChange: h(x)
|
|
2194
2194
|
}, null, 8, ["value", "onChange"])
|
|
2195
2195
|
], 2),
|
|
2196
2196
|
H("div", {
|
|
2197
|
-
class:
|
|
2197
|
+
class: b(_.$style.tableConfigContent)
|
|
2198
2198
|
}, [
|
|
2199
|
-
l.value.some((D) => u(D)) ? (
|
|
2199
|
+
l.value.some((D) => u(D)) ? ($(), z("div", {
|
|
2200
2200
|
key: 0,
|
|
2201
|
-
class:
|
|
2201
|
+
class: b(_.$style.columnGroup)
|
|
2202
2202
|
}, [
|
|
2203
2203
|
H("div", {
|
|
2204
|
-
class:
|
|
2204
|
+
class: b(_.$style.groupTitle)
|
|
2205
2205
|
}, "固定在左侧", 2),
|
|
2206
|
-
|
|
2206
|
+
E(h(Ne), {
|
|
2207
2207
|
list: l.value,
|
|
2208
2208
|
"item-key": "key",
|
|
2209
|
-
class:
|
|
2209
|
+
class: b(_.$style.columnList),
|
|
2210
2210
|
handle: ".table-column-draggable-handle",
|
|
2211
2211
|
disabled: l.value.length <= 1,
|
|
2212
2212
|
onEnd: S
|
|
2213
2213
|
}, {
|
|
2214
|
-
item:
|
|
2215
|
-
u(D) ? (
|
|
2214
|
+
item: C(({ element: D }) => [
|
|
2215
|
+
u(D) ? ($(), z("div", {
|
|
2216
2216
|
key: 0,
|
|
2217
|
-
class:
|
|
2217
|
+
class: b(_.$style.columnItem),
|
|
2218
2218
|
style: ne({ background: h(re).colorBgContainer })
|
|
2219
2219
|
}, [
|
|
2220
|
-
|
|
2220
|
+
E(Z, {
|
|
2221
2221
|
type: "text",
|
|
2222
2222
|
size: "small",
|
|
2223
|
-
icon:
|
|
2223
|
+
icon: W(h(Ae)),
|
|
2224
2224
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2225
|
-
class:
|
|
2225
|
+
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2226
2226
|
}, null, 8, ["icon", "style", "class"]),
|
|
2227
|
-
|
|
2227
|
+
E(ie, {
|
|
2228
2228
|
checked: D.visible,
|
|
2229
2229
|
"onUpdate:checked": (se) => D.visible = se,
|
|
2230
2230
|
onChange: S
|
|
2231
2231
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2232
|
-
|
|
2232
|
+
E(Se, {
|
|
2233
2233
|
ellipsis: { tooltip: D.title },
|
|
2234
2234
|
content: D.title,
|
|
2235
|
-
class:
|
|
2235
|
+
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2236
2236
|
onClick: () => {
|
|
2237
2237
|
D.visible = !D.visible, S();
|
|
2238
2238
|
}
|
|
2239
2239
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2240
2240
|
H("div", {
|
|
2241
|
-
class:
|
|
2241
|
+
class: b(_.$style.fixedActions)
|
|
2242
2242
|
}, [
|
|
2243
|
-
|
|
2244
|
-
default:
|
|
2245
|
-
|
|
2243
|
+
E(pe, { title: "固定在右侧" }, {
|
|
2244
|
+
default: C(() => [
|
|
2245
|
+
E(Z, {
|
|
2246
2246
|
type: "text",
|
|
2247
2247
|
size: "small",
|
|
2248
|
-
icon:
|
|
2248
|
+
icon: W(h(_t)),
|
|
2249
2249
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2250
|
-
onClick: (se) =>
|
|
2250
|
+
onClick: (se) => w(D, "right")
|
|
2251
2251
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2252
2252
|
]),
|
|
2253
2253
|
_: 2
|
|
2254
2254
|
}, 1024),
|
|
2255
|
-
|
|
2256
|
-
default:
|
|
2257
|
-
|
|
2255
|
+
E(pe, { title: "取消固定" }, {
|
|
2256
|
+
default: C(() => [
|
|
2257
|
+
E(Z, {
|
|
2258
2258
|
type: "text",
|
|
2259
2259
|
size: "small",
|
|
2260
|
-
icon:
|
|
2260
|
+
icon: W(h(Et)),
|
|
2261
2261
|
style: ne({ color: h(re).colorPrimary }),
|
|
2262
|
-
onClick: (se) =>
|
|
2262
|
+
onClick: (se) => w(D, !1)
|
|
2263
2263
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2264
2264
|
]),
|
|
2265
2265
|
_: 2
|
|
@@ -2270,70 +2270,70 @@ const ao = (t) => {
|
|
|
2270
2270
|
_: 1
|
|
2271
2271
|
}, 8, ["list", "class", "disabled"])
|
|
2272
2272
|
], 2)) : R("", !0),
|
|
2273
|
-
i.value.some((D) => u(D)) ? (
|
|
2273
|
+
i.value.some((D) => u(D)) ? ($(), z("div", {
|
|
2274
2274
|
key: 1,
|
|
2275
|
-
class:
|
|
2275
|
+
class: b(_.$style.columnGroup)
|
|
2276
2276
|
}, [
|
|
2277
2277
|
H("div", {
|
|
2278
|
-
class:
|
|
2278
|
+
class: b(_.$style.groupTitle)
|
|
2279
2279
|
}, "不固定", 2),
|
|
2280
|
-
|
|
2280
|
+
E(h(Ne), {
|
|
2281
2281
|
list: i.value,
|
|
2282
2282
|
"item-key": "key",
|
|
2283
|
-
class:
|
|
2283
|
+
class: b(_.$style.columnList),
|
|
2284
2284
|
handle: ".table-column-draggable-handle",
|
|
2285
2285
|
disabled: i.value.length <= 1,
|
|
2286
2286
|
onEnd: S
|
|
2287
2287
|
}, {
|
|
2288
|
-
item:
|
|
2289
|
-
u(D) ? (
|
|
2288
|
+
item: C(({ element: D }) => [
|
|
2289
|
+
u(D) ? ($(), z("div", {
|
|
2290
2290
|
key: 0,
|
|
2291
|
-
class:
|
|
2291
|
+
class: b(_.$style.columnItem),
|
|
2292
2292
|
style: ne({ background: h(re).colorBgContainer })
|
|
2293
2293
|
}, [
|
|
2294
|
-
|
|
2294
|
+
E(Z, {
|
|
2295
2295
|
type: "text",
|
|
2296
2296
|
size: "small",
|
|
2297
|
-
icon:
|
|
2297
|
+
icon: W(h(Ae)),
|
|
2298
2298
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2299
|
-
class:
|
|
2299
|
+
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2300
2300
|
}, null, 8, ["icon", "style", "class"]),
|
|
2301
|
-
|
|
2301
|
+
E(ie, {
|
|
2302
2302
|
checked: D.visible,
|
|
2303
2303
|
"onUpdate:checked": (se) => D.visible = se,
|
|
2304
2304
|
onChange: S
|
|
2305
2305
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2306
|
-
|
|
2306
|
+
E(Se, {
|
|
2307
2307
|
ellipsis: { tooltip: D.title },
|
|
2308
2308
|
content: D.title,
|
|
2309
|
-
class:
|
|
2309
|
+
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2310
2310
|
onClick: () => {
|
|
2311
2311
|
D.visible = !D.visible, S();
|
|
2312
2312
|
}
|
|
2313
2313
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2314
2314
|
H("div", {
|
|
2315
|
-
class:
|
|
2315
|
+
class: b(_.$style.fixedActions)
|
|
2316
2316
|
}, [
|
|
2317
|
-
|
|
2318
|
-
default:
|
|
2319
|
-
|
|
2317
|
+
E(pe, { title: "固定在左侧" }, {
|
|
2318
|
+
default: C(() => [
|
|
2319
|
+
E(Z, {
|
|
2320
2320
|
type: "text",
|
|
2321
2321
|
size: "small",
|
|
2322
|
-
icon:
|
|
2322
|
+
icon: W(h(St)),
|
|
2323
2323
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2324
|
-
onClick: (se) =>
|
|
2324
|
+
onClick: (se) => w(D, "left")
|
|
2325
2325
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2326
2326
|
]),
|
|
2327
2327
|
_: 2
|
|
2328
2328
|
}, 1024),
|
|
2329
|
-
|
|
2330
|
-
default:
|
|
2331
|
-
|
|
2329
|
+
E(pe, { title: "固定在右侧" }, {
|
|
2330
|
+
default: C(() => [
|
|
2331
|
+
E(Z, {
|
|
2332
2332
|
type: "text",
|
|
2333
2333
|
size: "small",
|
|
2334
|
-
icon:
|
|
2334
|
+
icon: W(h(_t)),
|
|
2335
2335
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2336
|
-
onClick: (se) =>
|
|
2336
|
+
onClick: (se) => w(D, "right")
|
|
2337
2337
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2338
2338
|
]),
|
|
2339
2339
|
_: 2
|
|
@@ -2344,70 +2344,70 @@ const ao = (t) => {
|
|
|
2344
2344
|
_: 1
|
|
2345
2345
|
}, 8, ["list", "class", "disabled"])
|
|
2346
2346
|
], 2)) : R("", !0),
|
|
2347
|
-
p.value.some((D) => u(D)) ? (
|
|
2347
|
+
p.value.some((D) => u(D)) ? ($(), z("div", {
|
|
2348
2348
|
key: 2,
|
|
2349
|
-
class:
|
|
2349
|
+
class: b(_.$style.columnGroup)
|
|
2350
2350
|
}, [
|
|
2351
2351
|
H("div", {
|
|
2352
|
-
class:
|
|
2352
|
+
class: b(_.$style.groupTitle)
|
|
2353
2353
|
}, "固定在右侧", 2),
|
|
2354
|
-
|
|
2354
|
+
E(h(Ne), {
|
|
2355
2355
|
list: p.value,
|
|
2356
2356
|
"item-key": "key",
|
|
2357
|
-
class:
|
|
2357
|
+
class: b(_.$style.columnList),
|
|
2358
2358
|
handle: ".table-column-draggable-handle",
|
|
2359
2359
|
disabled: p.value.length <= 1,
|
|
2360
2360
|
onEnd: S
|
|
2361
2361
|
}, {
|
|
2362
|
-
item:
|
|
2363
|
-
u(D) ? (
|
|
2362
|
+
item: C(({ element: D }) => [
|
|
2363
|
+
u(D) ? ($(), z("div", {
|
|
2364
2364
|
key: 0,
|
|
2365
|
-
class:
|
|
2365
|
+
class: b(_.$style.columnItem),
|
|
2366
2366
|
style: ne({ background: h(re).colorBgContainer })
|
|
2367
2367
|
}, [
|
|
2368
|
-
|
|
2368
|
+
E(Z, {
|
|
2369
2369
|
type: "text",
|
|
2370
2370
|
size: "small",
|
|
2371
|
-
icon:
|
|
2371
|
+
icon: W(h(Ae)),
|
|
2372
2372
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2373
|
-
class:
|
|
2373
|
+
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2374
2374
|
}, null, 8, ["icon", "style", "class"]),
|
|
2375
|
-
|
|
2375
|
+
E(ie, {
|
|
2376
2376
|
checked: D.visible,
|
|
2377
2377
|
"onUpdate:checked": (se) => D.visible = se,
|
|
2378
2378
|
onChange: S
|
|
2379
2379
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2380
|
-
|
|
2380
|
+
E(Se, {
|
|
2381
2381
|
ellipsis: { tooltip: D.title },
|
|
2382
2382
|
content: D.title,
|
|
2383
|
-
class:
|
|
2383
|
+
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2384
2384
|
onClick: () => {
|
|
2385
2385
|
D.visible = !D.visible, S();
|
|
2386
2386
|
}
|
|
2387
2387
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2388
2388
|
H("div", {
|
|
2389
|
-
class:
|
|
2389
|
+
class: b(_.$style.fixedActions)
|
|
2390
2390
|
}, [
|
|
2391
|
-
|
|
2392
|
-
default:
|
|
2393
|
-
|
|
2391
|
+
E(pe, { title: "固定在左侧" }, {
|
|
2392
|
+
default: C(() => [
|
|
2393
|
+
E(Z, {
|
|
2394
2394
|
type: "text",
|
|
2395
2395
|
size: "small",
|
|
2396
|
-
icon:
|
|
2396
|
+
icon: W(h(St)),
|
|
2397
2397
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
2398
|
-
onClick: (se) =>
|
|
2398
|
+
onClick: (se) => w(D, "left")
|
|
2399
2399
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2400
2400
|
]),
|
|
2401
2401
|
_: 2
|
|
2402
2402
|
}, 1024),
|
|
2403
|
-
|
|
2404
|
-
default:
|
|
2405
|
-
|
|
2403
|
+
E(pe, { title: "取消固定" }, {
|
|
2404
|
+
default: C(() => [
|
|
2405
|
+
E(Z, {
|
|
2406
2406
|
type: "text",
|
|
2407
2407
|
size: "small",
|
|
2408
|
-
icon:
|
|
2408
|
+
icon: W(h(Et)),
|
|
2409
2409
|
style: ne({ color: h(re).colorPrimary }),
|
|
2410
|
-
onClick: (se) =>
|
|
2410
|
+
onClick: (se) => w(D, !1)
|
|
2411
2411
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2412
2412
|
]),
|
|
2413
2413
|
_: 2
|
|
@@ -2418,19 +2418,19 @@ const ao = (t) => {
|
|
|
2418
2418
|
_: 1
|
|
2419
2419
|
}, 8, ["list", "class", "disabled"])
|
|
2420
2420
|
], 2)) : R("", !0),
|
|
2421
|
-
m.value ? (
|
|
2421
|
+
m.value ? ($(), z("div", {
|
|
2422
2422
|
key: 3,
|
|
2423
|
-
class:
|
|
2423
|
+
class: b(_.$style.emptyText),
|
|
2424
2424
|
style: ne({ color: h(re).colorTextSecondary })
|
|
2425
2425
|
}, " 未找到相关查询项 ", 6)) : R("", !0)
|
|
2426
2426
|
], 2)
|
|
2427
2427
|
], 2)
|
|
2428
2428
|
]),
|
|
2429
|
-
default:
|
|
2430
|
-
|
|
2429
|
+
default: C(() => [
|
|
2430
|
+
E(Z, {
|
|
2431
2431
|
type: "text",
|
|
2432
|
-
icon:
|
|
2433
|
-
class:
|
|
2432
|
+
icon: W(h($n)),
|
|
2433
|
+
class: b(_.$style.configBtn)
|
|
2434
2434
|
}, null, 8, ["icon", "class"])
|
|
2435
2435
|
]),
|
|
2436
2436
|
_: 1
|
|
@@ -2457,7 +2457,7 @@ const ao = (t) => {
|
|
|
2457
2457
|
emptyText: Wo
|
|
2458
2458
|
}, Ko = {
|
|
2459
2459
|
$style: Go
|
|
2460
|
-
}, Qo = /* @__PURE__ */
|
|
2460
|
+
}, Qo = /* @__PURE__ */ be(Lo, [["__cssModules", Ko]]), Xo = /* @__PURE__ */ de({
|
|
2461
2461
|
__name: "DynamicList",
|
|
2462
2462
|
props: {
|
|
2463
2463
|
/**
|
|
@@ -2515,7 +2515,7 @@ const ao = (t) => {
|
|
|
2515
2515
|
deleteButtonProps: {
|
|
2516
2516
|
type: [Object, Function],
|
|
2517
2517
|
default: () => ({
|
|
2518
|
-
icon:
|
|
2518
|
+
icon: W(xt)
|
|
2519
2519
|
})
|
|
2520
2520
|
},
|
|
2521
2521
|
/**
|
|
@@ -2533,7 +2533,7 @@ const ao = (t) => {
|
|
|
2533
2533
|
sortButtonProps: {
|
|
2534
2534
|
type: [Object, Function],
|
|
2535
2535
|
default: () => ({
|
|
2536
|
-
icon:
|
|
2536
|
+
icon: W(Ae)
|
|
2537
2537
|
})
|
|
2538
2538
|
},
|
|
2539
2539
|
/**
|
|
@@ -2569,11 +2569,11 @@ const ao = (t) => {
|
|
|
2569
2569
|
const f = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2570
2570
|
return Array.from({ length: 16 }).map(() => f[Math.floor(Math.random() * f.length)]).join("");
|
|
2571
2571
|
}, i = (f) => {
|
|
2572
|
-
var
|
|
2572
|
+
var v;
|
|
2573
2573
|
if (s.value.length < o.maxLength) {
|
|
2574
2574
|
const y = {
|
|
2575
2575
|
id: l(),
|
|
2576
|
-
...((
|
|
2576
|
+
...((v = o.getNewItemData) == null ? void 0 : v.call(o)) ?? {}
|
|
2577
2577
|
};
|
|
2578
2578
|
s.value.splice(f + 1, 0, y), n("add", y, f + 1);
|
|
2579
2579
|
}
|
|
@@ -2598,22 +2598,22 @@ const ao = (t) => {
|
|
|
2598
2598
|
deep: !0,
|
|
2599
2599
|
immediate: !0
|
|
2600
2600
|
}
|
|
2601
|
-
), (f,
|
|
2602
|
-
const y =
|
|
2603
|
-
return
|
|
2604
|
-
|
|
2601
|
+
), (f, v) => {
|
|
2602
|
+
const y = L("a-button");
|
|
2603
|
+
return $(), z(Oe, null, [
|
|
2604
|
+
E(h(Ne), {
|
|
2605
2605
|
list: s.value,
|
|
2606
2606
|
"item-key": t.itemKey,
|
|
2607
2607
|
disabled: !t.sortable,
|
|
2608
2608
|
handle: ".draggable-icon",
|
|
2609
|
-
class:
|
|
2609
|
+
class: b([f.$style.dynamicList, t.className])
|
|
2610
2610
|
}, {
|
|
2611
|
-
item:
|
|
2611
|
+
item: C(({ element: u, index: m }) => [
|
|
2612
2612
|
H("div", {
|
|
2613
|
-
class:
|
|
2613
|
+
class: b([f.$style.dynamicListItem, t.itemClassName])
|
|
2614
2614
|
}, [
|
|
2615
2615
|
H("div", {
|
|
2616
|
-
class:
|
|
2616
|
+
class: b(f.$style.dynamicListItemContent)
|
|
2617
2617
|
}, [
|
|
2618
2618
|
he(f.$slots, "default", {
|
|
2619
2619
|
item: u,
|
|
@@ -2621,27 +2621,27 @@ const ao = (t) => {
|
|
|
2621
2621
|
})
|
|
2622
2622
|
], 2),
|
|
2623
2623
|
H("div", {
|
|
2624
|
-
class:
|
|
2624
|
+
class: b(f.$style.actionsIcons)
|
|
2625
2625
|
}, [
|
|
2626
|
-
|
|
2626
|
+
E(y, le({
|
|
2627
2627
|
type: "link",
|
|
2628
2628
|
danger: "",
|
|
2629
2629
|
size: "small",
|
|
2630
|
-
icon:
|
|
2630
|
+
icon: W(h(xt))
|
|
2631
2631
|
}, h($e)(t.deleteButtonProps) ? t.deleteButtonProps(u, m) : t.deleteButtonProps, {
|
|
2632
2632
|
onClick: (x) => p(m)
|
|
2633
2633
|
}), {
|
|
2634
|
-
default:
|
|
2635
|
-
|
|
2634
|
+
default: C(() => [
|
|
2635
|
+
J(ye(t.deleteButtonText), 1)
|
|
2636
2636
|
]),
|
|
2637
2637
|
_: 2
|
|
2638
2638
|
}, 1040, ["icon", "onClick"]),
|
|
2639
|
-
t.sortable ? (
|
|
2639
|
+
t.sortable ? ($(), N(y, le({
|
|
2640
2640
|
key: 0,
|
|
2641
2641
|
class: ["draggable-icon", f.$style.dragIcon],
|
|
2642
2642
|
size: "small",
|
|
2643
2643
|
type: "text",
|
|
2644
|
-
icon:
|
|
2644
|
+
icon: W(h(Ae))
|
|
2645
2645
|
}, h($e)(t.sortButtonProps) ? t.sortButtonProps(u, m) : t.sortButtonProps), null, 16, ["class", "icon"])) : R("", !0)
|
|
2646
2646
|
], 2)
|
|
2647
2647
|
], 2)
|
|
@@ -2649,15 +2649,15 @@ const ao = (t) => {
|
|
|
2649
2649
|
_: 3
|
|
2650
2650
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
2651
2651
|
H("div", null, [
|
|
2652
|
-
s.value.length < t.maxLength ? (
|
|
2652
|
+
s.value.length < t.maxLength ? ($(), N(y, le({
|
|
2653
2653
|
key: 0,
|
|
2654
2654
|
type: "link",
|
|
2655
|
-
icon:
|
|
2655
|
+
icon: W(h(Bt))
|
|
2656
2656
|
}, h($e)(t.addButtonProps) ? t.addButtonProps() : t.addButtonProps, {
|
|
2657
|
-
onClick:
|
|
2657
|
+
onClick: v[0] || (v[0] = (u) => i(s.value.length - 1))
|
|
2658
2658
|
}), {
|
|
2659
|
-
default:
|
|
2660
|
-
|
|
2659
|
+
default: C(() => [
|
|
2660
|
+
J(ye(t.addButtonText), 1)
|
|
2661
2661
|
]),
|
|
2662
2662
|
_: 1
|
|
2663
2663
|
}, 16, ["icon"])) : R("", !0)
|
|
@@ -2673,7 +2673,7 @@ const ao = (t) => {
|
|
|
2673
2673
|
dragIcon: nr
|
|
2674
2674
|
}, rr = {
|
|
2675
2675
|
$style: or
|
|
2676
|
-
}, sr = /* @__PURE__ */
|
|
2676
|
+
}, sr = /* @__PURE__ */ be(Xo, [["__cssModules", rr]]), ar = /* @__PURE__ */ de({
|
|
2677
2677
|
__name: "InputGroup",
|
|
2678
2678
|
props: {
|
|
2679
2679
|
/**
|
|
@@ -2716,13 +2716,13 @@ const ao = (t) => {
|
|
|
2716
2716
|
return ((p = (i = o.formItem.addonSelectProps) == null ? void 0 : i.style) == null ? void 0 : p.width) ?? l;
|
|
2717
2717
|
});
|
|
2718
2718
|
return (l, i) => {
|
|
2719
|
-
const p =
|
|
2720
|
-
return
|
|
2719
|
+
const p = L("a-select"), f = L("a-input"), v = L("a-input-group");
|
|
2720
|
+
return $(), N(v, {
|
|
2721
2721
|
compact: "",
|
|
2722
|
-
class:
|
|
2722
|
+
class: b(l.$style.inputGroup)
|
|
2723
2723
|
}, {
|
|
2724
|
-
default:
|
|
2725
|
-
|
|
2724
|
+
default: C(() => [
|
|
2725
|
+
E(p, le({
|
|
2726
2726
|
value: r.value.select,
|
|
2727
2727
|
"onUpdate:value": i[0] || (i[0] = (y) => r.value.select = y),
|
|
2728
2728
|
style: {
|
|
@@ -2730,7 +2730,7 @@ const ao = (t) => {
|
|
|
2730
2730
|
width: s.value
|
|
2731
2731
|
}
|
|
2732
2732
|
}, h(Rt)(t.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
2733
|
-
|
|
2733
|
+
E(f, le({
|
|
2734
2734
|
value: r.value.value,
|
|
2735
2735
|
"onUpdate:value": i[1] || (i[1] = (y) => r.value.value = y),
|
|
2736
2736
|
style: {
|
|
@@ -2747,7 +2747,7 @@ const ao = (t) => {
|
|
|
2747
2747
|
inputGroup: lr
|
|
2748
2748
|
}, cr = {
|
|
2749
2749
|
$style: ir
|
|
2750
|
-
}, ur = /* @__PURE__ */
|
|
2750
|
+
}, ur = /* @__PURE__ */ be(ar, [["__cssModules", cr]]), Ve = null, dr = /* @__PURE__ */ de({
|
|
2751
2751
|
__name: "InputNumberRange",
|
|
2752
2752
|
props: {
|
|
2753
2753
|
/**
|
|
@@ -2789,24 +2789,24 @@ const ao = (t) => {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
}), l = F(() => Rt(o.formItem.props, ["placeholder"]));
|
|
2791
2791
|
return (i, p) => {
|
|
2792
|
-
var
|
|
2793
|
-
const f =
|
|
2794
|
-
return
|
|
2795
|
-
class:
|
|
2792
|
+
var v, y, u, m;
|
|
2793
|
+
const f = L("a-input-number");
|
|
2794
|
+
return $(), z("div", {
|
|
2795
|
+
class: b([i.$style.inputNumberGroup, "input-number-group"])
|
|
2796
2796
|
}, [
|
|
2797
2797
|
H("div", {
|
|
2798
|
-
class:
|
|
2798
|
+
class: b(i.$style.inputNumberGroupContent)
|
|
2799
2799
|
}, [
|
|
2800
|
-
|
|
2800
|
+
E(f, le(l.value, {
|
|
2801
2801
|
value: r.value,
|
|
2802
2802
|
"onUpdate:value": p[0] || (p[0] = (x) => r.value = x),
|
|
2803
2803
|
class: [i.$style.inputNumber, i.$style.startInputNumber],
|
|
2804
|
-
placeholder: ((y = h(Fe)((
|
|
2804
|
+
placeholder: ((y = h(Fe)((v = o.formItem.props) == null ? void 0 : v.placeholder)) == null ? void 0 : y[0]) ?? "请输入"
|
|
2805
2805
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
2806
2806
|
H("span", {
|
|
2807
|
-
class:
|
|
2807
|
+
class: b(i.$style.divider)
|
|
2808
2808
|
}, "~", 2),
|
|
2809
|
-
|
|
2809
|
+
E(f, le(l.value, {
|
|
2810
2810
|
value: s.value,
|
|
2811
2811
|
"onUpdate:value": p[1] || (p[1] = (x) => s.value = x),
|
|
2812
2812
|
class: [i.$style.inputNumber, i.$style.endInputNumber],
|
|
@@ -2825,7 +2825,7 @@ const ao = (t) => {
|
|
|
2825
2825
|
divider: gr
|
|
2826
2826
|
}, vr = {
|
|
2827
2827
|
$style: br
|
|
2828
|
-
}, Cr = /* @__PURE__ */
|
|
2828
|
+
}, Cr = /* @__PURE__ */ be(dr, [["__cssModules", vr]]), _r = 8, Er = /* @__PURE__ */ de({
|
|
2829
2829
|
__name: "FormFieldItem",
|
|
2830
2830
|
props: {
|
|
2831
2831
|
/**
|
|
@@ -2890,7 +2890,7 @@ const ao = (t) => {
|
|
|
2890
2890
|
}), f = F(() => {
|
|
2891
2891
|
const { type: u, component: m } = n.formItem;
|
|
2892
2892
|
return u === "component" ? m : o[u];
|
|
2893
|
-
}),
|
|
2893
|
+
}), v = F(() => {
|
|
2894
2894
|
var P;
|
|
2895
2895
|
const u = n.formItem, m = {
|
|
2896
2896
|
[X.input]: {
|
|
@@ -2930,17 +2930,17 @@ const ao = (t) => {
|
|
|
2930
2930
|
return n.inModal || (i.value && Ue(x, "style.width", `calc(100% - ${p.value}px)`), u.type === X.select && Ue(x, "maxTagCount", "responsive")), x;
|
|
2931
2931
|
}), y = F(() => n.formItem.modelPropName ?? "value");
|
|
2932
2932
|
return (u, m) => {
|
|
2933
|
-
const x =
|
|
2934
|
-
return
|
|
2935
|
-
class:
|
|
2933
|
+
const x = L("a-input"), P = L("a-input-group");
|
|
2934
|
+
return $(), z("div", {
|
|
2935
|
+
class: b(u.$style.formFieldItem)
|
|
2936
2936
|
}, [
|
|
2937
|
-
i.value ? (
|
|
2937
|
+
i.value ? ($(), N(P, {
|
|
2938
2938
|
key: 0,
|
|
2939
2939
|
compact: "",
|
|
2940
|
-
class:
|
|
2940
|
+
class: b([u.$style.inputGroup, "super-table-input-group"])
|
|
2941
2941
|
}, {
|
|
2942
|
-
default:
|
|
2943
|
-
t.inModal ? R("", !0) : (
|
|
2942
|
+
default: C(() => [
|
|
2943
|
+
t.inModal ? R("", !0) : ($(), N(x, {
|
|
2944
2944
|
key: 0,
|
|
2945
2945
|
value: t.formItem.label,
|
|
2946
2946
|
disabled: "",
|
|
@@ -2948,24 +2948,24 @@ const ao = (t) => {
|
|
|
2948
2948
|
color: h(re).colorText,
|
|
2949
2949
|
width: `${p.value}px`
|
|
2950
2950
|
}),
|
|
2951
|
-
class:
|
|
2951
|
+
class: b([u.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2952
2952
|
}, null, 8, ["value", "style", "class"])),
|
|
2953
|
-
f.value ? (
|
|
2953
|
+
f.value ? ($(), N(Ke(f.value), le({
|
|
2954
2954
|
key: 1,
|
|
2955
2955
|
[y.value]: l.value,
|
|
2956
2956
|
["onUpdate:" + y.value]: m[0] || (m[0] = (S) => l.value = S)
|
|
2957
|
-
},
|
|
2957
|
+
}, v.value), null, 16)) : R("", !0)
|
|
2958
2958
|
]),
|
|
2959
2959
|
_: 1
|
|
2960
|
-
}, 8, ["class"])) : (
|
|
2961
|
-
t.formItem.type === h(X).component && t.formItem.showLabel ? (
|
|
2960
|
+
}, 8, ["class"])) : ($(), z(Oe, { key: 1 }, [
|
|
2961
|
+
t.formItem.type === h(X).component && t.formItem.showLabel ? ($(), z("span", {
|
|
2962
2962
|
key: 0,
|
|
2963
|
-
class:
|
|
2963
|
+
class: b(u.$style.customItemLabel)
|
|
2964
2964
|
}, ye(t.formItem.label), 3)) : R("", !0),
|
|
2965
|
-
(
|
|
2965
|
+
($(), N(Ke(f.value), le({
|
|
2966
2966
|
[y.value]: l.value,
|
|
2967
2967
|
["onUpdate:" + y.value]: m[1] || (m[1] = (S) => l.value = S)
|
|
2968
|
-
},
|
|
2968
|
+
}, v.value), null, 16))
|
|
2969
2969
|
], 64))
|
|
2970
2970
|
], 2);
|
|
2971
2971
|
};
|
|
@@ -2977,7 +2977,7 @@ const ao = (t) => {
|
|
|
2977
2977
|
customItemLabel: $r
|
|
2978
2978
|
}, Ir = {
|
|
2979
2979
|
$style: kr
|
|
2980
|
-
}, zt = /* @__PURE__ */
|
|
2980
|
+
}, zt = /* @__PURE__ */ be(Er, [["__cssModules", Ir]]), Or = /* @__PURE__ */ de({
|
|
2981
2981
|
__name: "SceneConfigModal",
|
|
2982
2982
|
props: {
|
|
2983
2983
|
// 当前编辑的场景
|
|
@@ -3021,27 +3021,27 @@ const ao = (t) => {
|
|
|
3021
3021
|
setup(t, { expose: e, emit: o }) {
|
|
3022
3022
|
var qe, ze;
|
|
3023
3023
|
const n = t, r = o, s = oe(lt(n.formConfigMap)), l = F(() => ut(
|
|
3024
|
-
Object.values(s.value).filter(({ visible:
|
|
3025
|
-
|
|
3026
|
-
)), i = ["name", "value", "type"], p = l.value.filter((
|
|
3024
|
+
Object.values(s.value).filter(({ visible: O }) => O !== !1),
|
|
3025
|
+
ge.order
|
|
3026
|
+
)), i = ["name", "value", "type"], p = l.value.filter((O) => O._selected).map((O) => ke(O, i)), f = oe(!0), v = oe(!1), y = oe(), u = Qe({
|
|
3027
3027
|
name: ((qe = n.currentScene) == null ? void 0 : qe.name) ?? "",
|
|
3028
3028
|
items: n.actionType === ue.search ? p : lt(((ze = n.currentScene) == null ? void 0 : ze.items) ?? [])
|
|
3029
3029
|
}), m = F({
|
|
3030
3030
|
get() {
|
|
3031
|
-
const
|
|
3032
|
-
return
|
|
3031
|
+
const O = l.value.filter((I) => !I.fixed);
|
|
3032
|
+
return O.length === 0 ? !1 : O.every((I) => u.items.some((B) => B.name === I.name));
|
|
3033
3033
|
},
|
|
3034
|
-
set(
|
|
3035
|
-
if (
|
|
3036
|
-
const
|
|
3037
|
-
u.items = $t(u.items,
|
|
3034
|
+
set(O) {
|
|
3035
|
+
if (O) {
|
|
3036
|
+
const I = l.value.map((B) => ke(B, i));
|
|
3037
|
+
u.items = $t(u.items, I, "name");
|
|
3038
3038
|
} else {
|
|
3039
|
-
const
|
|
3040
|
-
u.items = u.items.filter((B) =>
|
|
3039
|
+
const I = l.value.filter((B) => B.fixed).map((B) => B.name);
|
|
3040
|
+
u.items = u.items.filter((B) => I.includes(B.name));
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
3043
|
}), x = F(() => l.value.filter(
|
|
3044
|
-
(
|
|
3044
|
+
(O) => u.items.some((I) => I.name === O.name)
|
|
3045
3045
|
).length), P = F(() => x.value > 0 && x.value < l.value.length), S = Qe({
|
|
3046
3046
|
name: [
|
|
3047
3047
|
{
|
|
@@ -3061,86 +3061,86 @@ const ao = (t) => {
|
|
|
3061
3061
|
type: "array"
|
|
3062
3062
|
}
|
|
3063
3063
|
]
|
|
3064
|
-
}), M = F(() => u.items.map(({ name:
|
|
3065
|
-
const
|
|
3066
|
-
return
|
|
3064
|
+
}), M = F(() => u.items.map(({ name: O }) => O)), V = () => {
|
|
3065
|
+
const O = l.value.find((I) => !M.value.includes(I.name));
|
|
3066
|
+
return O ? ke(lt(O), i) : {};
|
|
3067
3067
|
}, q = F(() => ({
|
|
3068
3068
|
[ue.create]: "新建场景",
|
|
3069
3069
|
[ue.update]: "更新场景",
|
|
3070
3070
|
[ue.search]: "高级筛选"
|
|
3071
|
-
})[n.actionType]),
|
|
3072
|
-
const B = n.formConfigMap[
|
|
3073
|
-
B && (
|
|
3074
|
-
}, _ = (
|
|
3075
|
-
const
|
|
3076
|
-
return [
|
|
3077
|
-
},
|
|
3071
|
+
})[n.actionType]), w = (O, I) => {
|
|
3072
|
+
const B = n.formConfigMap[I.name];
|
|
3073
|
+
B && (I.type = B.type, I.value = B.value, I.label = B.label, T(I.name, I.value));
|
|
3074
|
+
}, _ = (O) => {
|
|
3075
|
+
const I = n.formConfigMap[O], B = u.items.map((ae) => ae.name), ee = l.value.filter((ae) => !B.includes(ae.name));
|
|
3076
|
+
return [I, ...ee];
|
|
3077
|
+
}, T = (O, I) => {
|
|
3078
3078
|
const B = u.items.reduce(
|
|
3079
|
-
(
|
|
3079
|
+
(ee, ae) => (ee[ae.name] = ae.value, ee),
|
|
3080
3080
|
{}
|
|
3081
3081
|
);
|
|
3082
|
-
r("form-item-change",
|
|
3083
|
-
},
|
|
3084
|
-
|
|
3082
|
+
r("form-item-change", O, I, B);
|
|
3083
|
+
}, Z = ({ name: O, value: I }) => {
|
|
3084
|
+
T(O, I);
|
|
3085
3085
|
}, ie = async () => {
|
|
3086
3086
|
var B;
|
|
3087
|
-
const
|
|
3088
|
-
const me = s.value[
|
|
3089
|
-
return me && (me.value =
|
|
3087
|
+
const O = u.items.map((ee, ae) => {
|
|
3088
|
+
const me = s.value[ee.name];
|
|
3089
|
+
return me && (me.value = ee.value, me[ge.orderInScene] = ae, me[ge.selected] = !0), me;
|
|
3090
3090
|
}).filter(Boolean);
|
|
3091
|
-
if (n.actionType === ue.search && !
|
|
3092
|
-
r("update-form-config",
|
|
3091
|
+
if (n.actionType === ue.search && !v.value) {
|
|
3092
|
+
r("update-form-config", O), r("search", u.items, O), r("cancel");
|
|
3093
3093
|
return;
|
|
3094
3094
|
}
|
|
3095
3095
|
await ((B = y.value) == null ? void 0 : B.validateFields());
|
|
3096
|
-
const
|
|
3096
|
+
const I = fe(u);
|
|
3097
3097
|
n.currentScene ? await n.onUpdate({
|
|
3098
3098
|
...n.currentScene,
|
|
3099
|
-
...
|
|
3100
|
-
}) : await n.onCreate(
|
|
3099
|
+
...I
|
|
3100
|
+
}) : await n.onCreate(I), r("update-form-config", O), r("cancel");
|
|
3101
3101
|
};
|
|
3102
3102
|
(() => {
|
|
3103
3103
|
if (u.items.length) return;
|
|
3104
|
-
const
|
|
3105
|
-
l.value.filter(({ fixed: B, selected:
|
|
3104
|
+
const O = $t(
|
|
3105
|
+
l.value.filter(({ fixed: B, selected: ee }) => B || ee),
|
|
3106
3106
|
"name"
|
|
3107
3107
|
);
|
|
3108
|
-
if (
|
|
3109
|
-
u.items = ut(
|
|
3108
|
+
if (O.length) {
|
|
3109
|
+
u.items = ut(O, "_order").map((B) => ke(B, i));
|
|
3110
3110
|
return;
|
|
3111
3111
|
}
|
|
3112
|
-
const
|
|
3113
|
-
|
|
3112
|
+
const I = V();
|
|
3113
|
+
I && u.items.push(I);
|
|
3114
3114
|
})();
|
|
3115
|
-
const Se = (
|
|
3116
|
-
var
|
|
3115
|
+
const Se = (O) => {
|
|
3116
|
+
var I;
|
|
3117
3117
|
return {
|
|
3118
|
-
disabled: (
|
|
3118
|
+
disabled: (I = s.value[O.name]) == null ? void 0 : I.fixed
|
|
3119
3119
|
};
|
|
3120
|
-
}, pe = (
|
|
3121
|
-
if (Ht.includes(
|
|
3122
|
-
return Ie("setFormItem error,", `form item with prop "${
|
|
3123
|
-
if (!pe(
|
|
3124
|
-
return Ie("setFormItem error,", `Cannot find form item with name "${
|
|
3125
|
-
if (
|
|
3120
|
+
}, pe = (O) => s.value[O], Me = (O, I, B) => {
|
|
3121
|
+
if (Ht.includes(I))
|
|
3122
|
+
return Ie("setFormItem error,", `form item with prop "${O}" is readonly`);
|
|
3123
|
+
if (!pe(O))
|
|
3124
|
+
return Ie("setFormItem error,", `Cannot find form item with name "${O}"`);
|
|
3125
|
+
if (I === "visible" && s.value[O].fixed)
|
|
3126
3126
|
return Ie("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3127
|
-
Ue(s.value, `${
|
|
3128
|
-
}, Te = (
|
|
3129
|
-
var
|
|
3130
|
-
return (
|
|
3131
|
-
}, D = (
|
|
3132
|
-
const B = u.items.find((
|
|
3133
|
-
B && (B.value =
|
|
3134
|
-
}, se = (
|
|
3135
|
-
Object.entries(
|
|
3136
|
-
D(
|
|
3127
|
+
Ue(s.value, `${O}.${I}`, B), s.value[O].visible || (u.items = u.items.filter((ee) => ee.name !== O));
|
|
3128
|
+
}, Te = (O) => {
|
|
3129
|
+
var I;
|
|
3130
|
+
return (I = u.items.find((B) => B.name === O)) == null ? void 0 : I.value;
|
|
3131
|
+
}, D = (O, I) => {
|
|
3132
|
+
const B = u.items.find((ee) => ee.name === O);
|
|
3133
|
+
B && (B.value = I);
|
|
3134
|
+
}, se = (O) => {
|
|
3135
|
+
Object.entries(O).forEach(([I, B]) => {
|
|
3136
|
+
D(I, B);
|
|
3137
3137
|
});
|
|
3138
3138
|
};
|
|
3139
|
-
function K(
|
|
3140
|
-
return (
|
|
3141
|
-
(B,
|
|
3142
|
-
const ae = u.items.find((me) => me.name ===
|
|
3143
|
-
return ae && (B[
|
|
3139
|
+
function K(O) {
|
|
3140
|
+
return (O ? Fe(O) : u.items.map((B) => B.name)).reduce(
|
|
3141
|
+
(B, ee) => {
|
|
3142
|
+
const ae = u.items.find((me) => me.name === ee);
|
|
3143
|
+
return ae && (B[ee] = ae.value), B;
|
|
3144
3144
|
},
|
|
3145
3145
|
{}
|
|
3146
3146
|
);
|
|
@@ -3152,11 +3152,11 @@ const ao = (t) => {
|
|
|
3152
3152
|
setFormValues: se,
|
|
3153
3153
|
getFormValue: Te,
|
|
3154
3154
|
setFormValue: D
|
|
3155
|
-
}), (
|
|
3156
|
-
const B =
|
|
3157
|
-
return
|
|
3155
|
+
}), (O, I) => {
|
|
3156
|
+
const B = L("a-input"), ee = L("a-form-item"), ae = L("a-checkbox"), me = L("a-space"), Je = L("a-select"), Le = L("a-form"), et = L("a-modal");
|
|
3157
|
+
return $(), N(et, {
|
|
3158
3158
|
open: f.value,
|
|
3159
|
-
"onUpdate:open":
|
|
3159
|
+
"onUpdate:open": I[4] || (I[4] = (Q) => f.value = Q),
|
|
3160
3160
|
title: q.value,
|
|
3161
3161
|
width: 720,
|
|
3162
3162
|
"body-style": {
|
|
@@ -3164,49 +3164,49 @@ const ao = (t) => {
|
|
|
3164
3164
|
overflow: "auto"
|
|
3165
3165
|
},
|
|
3166
3166
|
onOk: ie,
|
|
3167
|
-
onCancel:
|
|
3167
|
+
onCancel: I[5] || (I[5] = (Q) => r("cancel"))
|
|
3168
3168
|
}, {
|
|
3169
|
-
default:
|
|
3170
|
-
|
|
3169
|
+
default: C(() => [
|
|
3170
|
+
E(Le, {
|
|
3171
3171
|
ref_key: "formRef",
|
|
3172
3172
|
ref: y,
|
|
3173
3173
|
model: u,
|
|
3174
3174
|
rules: S,
|
|
3175
|
-
class:
|
|
3175
|
+
class: b(O.$style.sceneForm)
|
|
3176
3176
|
}, {
|
|
3177
|
-
default:
|
|
3178
|
-
t.actionType !== h(ue).search ||
|
|
3177
|
+
default: C(() => [
|
|
3178
|
+
t.actionType !== h(ue).search || v.value ? ($(), N(ee, {
|
|
3179
3179
|
key: 0,
|
|
3180
3180
|
label: "场景名称",
|
|
3181
3181
|
name: "name",
|
|
3182
3182
|
"label-col": { span: 24 },
|
|
3183
3183
|
"wrapper-col": { span: 12 }
|
|
3184
3184
|
}, {
|
|
3185
|
-
default:
|
|
3186
|
-
|
|
3185
|
+
default: C(() => [
|
|
3186
|
+
E(B, {
|
|
3187
3187
|
value: u.name,
|
|
3188
|
-
"onUpdate:value":
|
|
3188
|
+
"onUpdate:value": I[0] || (I[0] = (Q) => u.name = Q),
|
|
3189
3189
|
placeholder: "请输入"
|
|
3190
3190
|
}, null, 8, ["value"])
|
|
3191
3191
|
]),
|
|
3192
3192
|
_: 1
|
|
3193
3193
|
})) : R("", !0),
|
|
3194
|
-
|
|
3194
|
+
E(ee, {
|
|
3195
3195
|
name: "items",
|
|
3196
3196
|
"label-col": { span: 24 },
|
|
3197
3197
|
"wrapper-col": { span: 24 }
|
|
3198
3198
|
}, {
|
|
3199
|
-
label:
|
|
3200
|
-
|
|
3201
|
-
default:
|
|
3202
|
-
|
|
3203
|
-
|
|
3199
|
+
label: C(() => [
|
|
3200
|
+
E(me, null, {
|
|
3201
|
+
default: C(() => [
|
|
3202
|
+
I[6] || (I[6] = H("span", null, "筛选条件", -1)),
|
|
3203
|
+
E(ae, {
|
|
3204
3204
|
checked: m.value,
|
|
3205
|
-
"onUpdate:checked":
|
|
3205
|
+
"onUpdate:checked": I[1] || (I[1] = (Q) => m.value = Q),
|
|
3206
3206
|
indeterminate: P.value
|
|
3207
3207
|
}, {
|
|
3208
|
-
default:
|
|
3209
|
-
|
|
3208
|
+
default: C(() => [
|
|
3209
|
+
J(" 全选 (" + ye(x.value) + "/" + ye(l.value.length) + ") ", 1)
|
|
3210
3210
|
]),
|
|
3211
3211
|
_: 1
|
|
3212
3212
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -3214,45 +3214,45 @@ const ao = (t) => {
|
|
|
3214
3214
|
_: 1
|
|
3215
3215
|
})
|
|
3216
3216
|
]),
|
|
3217
|
-
default:
|
|
3218
|
-
|
|
3217
|
+
default: C(() => [
|
|
3218
|
+
E(sr, {
|
|
3219
3219
|
value: u.items,
|
|
3220
|
-
"onUpdate:value":
|
|
3220
|
+
"onUpdate:value": I[2] || (I[2] = (Q) => u.items = Q),
|
|
3221
3221
|
"add-button-text": "添加筛选条件",
|
|
3222
|
-
"get-new-item-data":
|
|
3222
|
+
"get-new-item-data": V,
|
|
3223
3223
|
"max-length": l.value.length,
|
|
3224
3224
|
"delete-button-props": Se,
|
|
3225
3225
|
sortButtonProps: Se,
|
|
3226
|
-
onAdd:
|
|
3226
|
+
onAdd: Z
|
|
3227
3227
|
}, {
|
|
3228
|
-
default:
|
|
3228
|
+
default: C(({ item: Q }) => {
|
|
3229
3229
|
var Be;
|
|
3230
3230
|
return [
|
|
3231
3231
|
H("div", {
|
|
3232
|
-
class:
|
|
3232
|
+
class: b(O.$style.queryFieldItem)
|
|
3233
3233
|
}, [
|
|
3234
|
-
|
|
3234
|
+
E(Je, {
|
|
3235
3235
|
value: Q.name,
|
|
3236
|
-
"onUpdate:value": (
|
|
3236
|
+
"onUpdate:value": (Ce) => Q.name = Ce,
|
|
3237
3237
|
"show-search": "",
|
|
3238
3238
|
options: _(Q.name),
|
|
3239
3239
|
"field-names": { value: "name" },
|
|
3240
3240
|
"option-filter-prop": "label",
|
|
3241
3241
|
placeholder: "请选择要筛选的字段名",
|
|
3242
3242
|
disabled: (Be = s.value[Q.name]) == null ? void 0 : Be.fixed,
|
|
3243
|
-
class:
|
|
3244
|
-
onChange: (
|
|
3243
|
+
class: b(O.$style.fieldSelect),
|
|
3244
|
+
onChange: (Ce) => w(Ce, Q)
|
|
3245
3245
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
3246
3246
|
H("div", {
|
|
3247
|
-
class:
|
|
3247
|
+
class: b(O.$style.fieldComponent)
|
|
3248
3248
|
}, [
|
|
3249
|
-
Q.name ? (
|
|
3249
|
+
Q.name ? ($(), N(zt, {
|
|
3250
3250
|
key: 0,
|
|
3251
3251
|
value: Q.value,
|
|
3252
|
-
"onUpdate:value": (
|
|
3252
|
+
"onUpdate:value": (Ce) => Q.value = Ce,
|
|
3253
3253
|
"in-modal": "",
|
|
3254
3254
|
"form-item": s.value[Q.name],
|
|
3255
|
-
onChange: (
|
|
3255
|
+
onChange: (Ce) => T(Q.name, Ce)
|
|
3256
3256
|
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : R("", !0)
|
|
3257
3257
|
], 2)
|
|
3258
3258
|
], 2)
|
|
@@ -3266,13 +3266,13 @@ const ao = (t) => {
|
|
|
3266
3266
|
]),
|
|
3267
3267
|
_: 1
|
|
3268
3268
|
}, 8, ["model", "rules", "class"]),
|
|
3269
|
-
t.actionType === h(ue).search && t.allowCreateScene ? (
|
|
3269
|
+
t.actionType === h(ue).search && t.allowCreateScene ? ($(), N(ae, {
|
|
3270
3270
|
key: 0,
|
|
3271
|
-
checked:
|
|
3272
|
-
"onUpdate:checked":
|
|
3271
|
+
checked: v.value,
|
|
3272
|
+
"onUpdate:checked": I[3] || (I[3] = (Q) => v.value = Q)
|
|
3273
3273
|
}, {
|
|
3274
|
-
default:
|
|
3275
|
-
|
|
3274
|
+
default: C(() => I[7] || (I[7] = [
|
|
3275
|
+
J(" 保存为场景 ")
|
|
3276
3276
|
])),
|
|
3277
3277
|
_: 1
|
|
3278
3278
|
}, 8, ["checked"])) : R("", !0)
|
|
@@ -3288,7 +3288,7 @@ const ao = (t) => {
|
|
|
3288
3288
|
fieldComponent: Lr
|
|
3289
3289
|
}, Fr = {
|
|
3290
3290
|
$style: Dr
|
|
3291
|
-
}, Mr = /* @__PURE__ */
|
|
3291
|
+
}, Mr = /* @__PURE__ */ be(Or, [["__cssModules", Fr]]), Br = /* @__PURE__ */ de({
|
|
3292
3292
|
__name: "SceneListModal",
|
|
3293
3293
|
props: {
|
|
3294
3294
|
/**
|
|
@@ -3335,113 +3335,113 @@ const ao = (t) => {
|
|
|
3335
3335
|
l(), n("create");
|
|
3336
3336
|
}, f = (y) => {
|
|
3337
3337
|
l(), n("update", y);
|
|
3338
|
-
},
|
|
3338
|
+
}, v = () => {
|
|
3339
3339
|
n(
|
|
3340
3340
|
"sort",
|
|
3341
3341
|
r.value.map(({ code: y }) => y)
|
|
3342
3342
|
);
|
|
3343
3343
|
};
|
|
3344
3344
|
return (y, u) => {
|
|
3345
|
-
const m =
|
|
3346
|
-
return
|
|
3345
|
+
const m = L("a-col"), x = L("a-row"), P = L("a-typography-text"), S = L("a-button"), M = L("a-popconfirm"), V = L("a-empty"), q = L("a-modal");
|
|
3346
|
+
return $(), N(q, {
|
|
3347
3347
|
open: s.value,
|
|
3348
|
-
"onUpdate:open": u[0] || (u[0] = (
|
|
3348
|
+
"onUpdate:open": u[0] || (u[0] = (w) => s.value = w),
|
|
3349
3349
|
title: "场景管理",
|
|
3350
3350
|
width: 720,
|
|
3351
3351
|
footer: null,
|
|
3352
3352
|
onCancel: l
|
|
3353
3353
|
}, {
|
|
3354
|
-
default:
|
|
3354
|
+
default: C(() => [
|
|
3355
3355
|
H("div", {
|
|
3356
|
-
class:
|
|
3356
|
+
class: b(y.$style.sceneList)
|
|
3357
3357
|
}, [
|
|
3358
|
-
|
|
3359
|
-
class:
|
|
3358
|
+
E(x, {
|
|
3359
|
+
class: b(y.$style.sceneListHead)
|
|
3360
3360
|
}, {
|
|
3361
|
-
default:
|
|
3362
|
-
|
|
3361
|
+
default: C(() => [
|
|
3362
|
+
E(m, {
|
|
3363
3363
|
span: 16,
|
|
3364
|
-
class:
|
|
3364
|
+
class: b(y.$style.col)
|
|
3365
3365
|
}, {
|
|
3366
|
-
default:
|
|
3367
|
-
|
|
3366
|
+
default: C(() => u[1] || (u[1] = [
|
|
3367
|
+
J(" 场景名称 ")
|
|
3368
3368
|
])),
|
|
3369
3369
|
_: 1
|
|
3370
3370
|
}, 8, ["class"]),
|
|
3371
|
-
|
|
3371
|
+
E(m, {
|
|
3372
3372
|
span: 8,
|
|
3373
|
-
class:
|
|
3373
|
+
class: b(y.$style.col)
|
|
3374
3374
|
}, {
|
|
3375
|
-
default:
|
|
3376
|
-
|
|
3375
|
+
default: C(() => u[2] || (u[2] = [
|
|
3376
|
+
J(" 操作 ")
|
|
3377
3377
|
])),
|
|
3378
3378
|
_: 1
|
|
3379
3379
|
}, 8, ["class"])
|
|
3380
3380
|
]),
|
|
3381
3381
|
_: 1
|
|
3382
3382
|
}, 8, ["class"]),
|
|
3383
|
-
r.value.length ? (
|
|
3383
|
+
r.value.length ? ($(), N(h(Ne), {
|
|
3384
3384
|
key: 0,
|
|
3385
3385
|
list: r.value,
|
|
3386
3386
|
"item-key": "id",
|
|
3387
3387
|
handle: ".table-column-draggable-icon",
|
|
3388
|
-
onChange:
|
|
3388
|
+
onChange: v
|
|
3389
3389
|
}, {
|
|
3390
|
-
item:
|
|
3391
|
-
|
|
3392
|
-
class:
|
|
3390
|
+
item: C(({ element: w }) => [
|
|
3391
|
+
E(x, {
|
|
3392
|
+
class: b(y.$style.sceneListItem)
|
|
3393
3393
|
}, {
|
|
3394
|
-
default:
|
|
3395
|
-
|
|
3394
|
+
default: C(() => [
|
|
3395
|
+
E(m, {
|
|
3396
3396
|
span: 16,
|
|
3397
|
-
class:
|
|
3397
|
+
class: b(y.$style.col)
|
|
3398
3398
|
}, {
|
|
3399
|
-
default:
|
|
3400
|
-
|
|
3401
|
-
ellipsis: { tooltip:
|
|
3402
|
-
content:
|
|
3399
|
+
default: C(() => [
|
|
3400
|
+
E(P, {
|
|
3401
|
+
ellipsis: { tooltip: w.name },
|
|
3402
|
+
content: w.name
|
|
3403
3403
|
}, null, 8, ["ellipsis", "content"])
|
|
3404
3404
|
]),
|
|
3405
3405
|
_: 2
|
|
3406
3406
|
}, 1032, ["class"]),
|
|
3407
|
-
|
|
3407
|
+
E(m, {
|
|
3408
3408
|
span: 8,
|
|
3409
|
-
class:
|
|
3409
|
+
class: b(y.$style.col)
|
|
3410
3410
|
}, {
|
|
3411
|
-
default:
|
|
3412
|
-
|
|
3411
|
+
default: C(() => [
|
|
3412
|
+
E(S, {
|
|
3413
3413
|
type: "link",
|
|
3414
3414
|
size: "small",
|
|
3415
|
-
onClick: (_) => f(
|
|
3415
|
+
onClick: (_) => f(w)
|
|
3416
3416
|
}, {
|
|
3417
|
-
default:
|
|
3418
|
-
|
|
3417
|
+
default: C(() => u[3] || (u[3] = [
|
|
3418
|
+
J(" 编辑 ")
|
|
3419
3419
|
])),
|
|
3420
3420
|
_: 2
|
|
3421
3421
|
}, 1032, ["onClick"]),
|
|
3422
|
-
|
|
3422
|
+
E(M, {
|
|
3423
3423
|
title: "确定删除?",
|
|
3424
|
-
onConfirm: (_) => i(
|
|
3424
|
+
onConfirm: (_) => i(w.code)
|
|
3425
3425
|
}, {
|
|
3426
|
-
default:
|
|
3427
|
-
|
|
3426
|
+
default: C(() => [
|
|
3427
|
+
E(S, {
|
|
3428
3428
|
type: "link",
|
|
3429
3429
|
size: "small",
|
|
3430
3430
|
danger: ""
|
|
3431
3431
|
}, {
|
|
3432
|
-
default:
|
|
3433
|
-
|
|
3432
|
+
default: C(() => u[4] || (u[4] = [
|
|
3433
|
+
J(" 删除 ")
|
|
3434
3434
|
])),
|
|
3435
3435
|
_: 1
|
|
3436
3436
|
})
|
|
3437
3437
|
]),
|
|
3438
3438
|
_: 2
|
|
3439
3439
|
}, 1032, ["onConfirm"]),
|
|
3440
|
-
|
|
3440
|
+
E(S, {
|
|
3441
3441
|
type: "text",
|
|
3442
3442
|
size: "small",
|
|
3443
|
-
icon:
|
|
3444
|
-
class:
|
|
3443
|
+
icon: W(h(Ae)),
|
|
3444
|
+
class: b(["table-column-draggable-icon", y.$style.dragIcon])
|
|
3445
3445
|
}, null, 8, ["icon", "class"])
|
|
3446
3446
|
]),
|
|
3447
3447
|
_: 2
|
|
@@ -3451,19 +3451,19 @@ const ao = (t) => {
|
|
|
3451
3451
|
}, 1032, ["class"])
|
|
3452
3452
|
]),
|
|
3453
3453
|
_: 1
|
|
3454
|
-
}, 8, ["list"])) : (
|
|
3454
|
+
}, 8, ["list"])) : ($(), N(V, {
|
|
3455
3455
|
key: 1,
|
|
3456
3456
|
image: h(Sn).PRESENTED_IMAGE_SIMPLE
|
|
3457
3457
|
}, null, 8, ["image"]))
|
|
3458
3458
|
], 2),
|
|
3459
|
-
t.allowCreateScene ? (
|
|
3459
|
+
t.allowCreateScene ? ($(), N(S, {
|
|
3460
3460
|
key: 0,
|
|
3461
3461
|
type: "link",
|
|
3462
|
-
icon:
|
|
3462
|
+
icon: W(h(Bt)),
|
|
3463
3463
|
onClick: p
|
|
3464
3464
|
}, {
|
|
3465
|
-
default:
|
|
3466
|
-
|
|
3465
|
+
default: C(() => u[5] || (u[5] = [
|
|
3466
|
+
J(" 新建场景 ")
|
|
3467
3467
|
])),
|
|
3468
3468
|
_: 1
|
|
3469
3469
|
}, 8, ["icon"])) : R("", !0)
|
|
@@ -3480,7 +3480,7 @@ const ao = (t) => {
|
|
|
3480
3480
|
dragIcon: Hr
|
|
3481
3481
|
}, zr = {
|
|
3482
3482
|
$style: qr
|
|
3483
|
-
}, Yr = /* @__PURE__ */
|
|
3483
|
+
}, Yr = /* @__PURE__ */ be(Br, [["__cssModules", zr]]), Vr = /* @__PURE__ */ de({
|
|
3484
3484
|
__name: "FormSearchParams",
|
|
3485
3485
|
props: {
|
|
3486
3486
|
/**
|
|
@@ -3530,31 +3530,31 @@ const ao = (t) => {
|
|
|
3530
3530
|
`superTable_formSearch_expanded_${o.superTableID}`,
|
|
3531
3531
|
!0
|
|
3532
3532
|
), s = F(() => ut(
|
|
3533
|
-
Object.values(o.formConfigMap).filter((S) => S[
|
|
3534
|
-
|
|
3533
|
+
Object.values(o.formConfigMap).filter((S) => S[ge.selected]),
|
|
3534
|
+
ge.orderInScene
|
|
3535
3535
|
)), l = F(() => {
|
|
3536
3536
|
const S = [];
|
|
3537
3537
|
let M = 0;
|
|
3538
|
-
for (const
|
|
3539
|
-
const q = (o.formConfigMap[
|
|
3538
|
+
for (const V of s.value) {
|
|
3539
|
+
const q = (o.formConfigMap[V.name].span ?? 1) * o.formItemColSpan;
|
|
3540
3540
|
if (M + q > 24)
|
|
3541
3541
|
break;
|
|
3542
|
-
S.push(
|
|
3542
|
+
S.push(V), M += q;
|
|
3543
3543
|
}
|
|
3544
3544
|
return S;
|
|
3545
3545
|
}), i = F(() => r.value ? s.value : l.value), p = F(() => o.showExpandButton && s.value.length > l.value.length), f = F(() => {
|
|
3546
3546
|
if (!(!o.enableScene || o.showResetButton || p.value)) return 0;
|
|
3547
|
-
const
|
|
3548
|
-
return
|
|
3549
|
-
}),
|
|
3547
|
+
const V = 24 - i.value.reduce((w, _) => w + (o.formConfigMap[_.name].span ?? 1) * o.formItemColSpan, 0) % 24, q = o.formItemColSpan;
|
|
3548
|
+
return V >= q ? V : 24;
|
|
3549
|
+
}), v = (S, M) => {
|
|
3550
3550
|
n("form-item-change", S, M);
|
|
3551
|
-
}, y = ft(
|
|
3551
|
+
}, y = ft(v, 500), u = (S, M) => {
|
|
3552
3552
|
[
|
|
3553
3553
|
X.input,
|
|
3554
3554
|
X.inputNumber,
|
|
3555
3555
|
X.inputGroup,
|
|
3556
3556
|
X.inputNumberRange
|
|
3557
|
-
].includes(o.formConfigMap[S].type) ? y(S, M) :
|
|
3557
|
+
].includes(o.formConfigMap[S].type) ? y(S, M) : v(S, M);
|
|
3558
3558
|
}, m = () => {
|
|
3559
3559
|
n("search");
|
|
3560
3560
|
}, x = () => {
|
|
@@ -3563,71 +3563,71 @@ const ao = (t) => {
|
|
|
3563
3563
|
r.value = !r.value;
|
|
3564
3564
|
};
|
|
3565
3565
|
return (S, M) => {
|
|
3566
|
-
const
|
|
3567
|
-
return i.value.length ? (
|
|
3566
|
+
const V = L("a-col"), q = L("a-button"), w = L("a-row");
|
|
3567
|
+
return i.value.length ? ($(), z("div", {
|
|
3568
3568
|
key: 0,
|
|
3569
|
-
class:
|
|
3569
|
+
class: b([
|
|
3570
3570
|
S.$style.searchParamsWrapper,
|
|
3571
3571
|
{
|
|
3572
3572
|
[S.$style.hasActions]: !t.enableScene || t.showResetButton || p.value
|
|
3573
3573
|
}
|
|
3574
3574
|
])
|
|
3575
3575
|
}, [
|
|
3576
|
-
|
|
3576
|
+
E(w, {
|
|
3577
3577
|
gutter: [8, 8],
|
|
3578
|
-
class:
|
|
3578
|
+
class: b(S.$style.searchParams)
|
|
3579
3579
|
}, {
|
|
3580
|
-
default:
|
|
3581
|
-
(
|
|
3580
|
+
default: C(() => [
|
|
3581
|
+
($(!0), z(Oe, null, ct(i.value, (_) => ($(), N(V, {
|
|
3582
3582
|
key: _.name,
|
|
3583
3583
|
span: (t.formConfigMap[_.name].span ?? 1) * t.formItemColSpan
|
|
3584
3584
|
}, {
|
|
3585
|
-
default:
|
|
3586
|
-
|
|
3585
|
+
default: C(() => [
|
|
3586
|
+
E(zt, {
|
|
3587
3587
|
value: t.formConfigMap[_.name].value,
|
|
3588
3588
|
"form-item": t.formConfigMap[_.name],
|
|
3589
|
-
onChange: (
|
|
3589
|
+
onChange: (T) => u(_.name, T)
|
|
3590
3590
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
3591
3591
|
]),
|
|
3592
3592
|
_: 2
|
|
3593
3593
|
}, 1032, ["span"]))), 128)),
|
|
3594
|
-
!t.enableScene || t.showResetButton || p.value ? (
|
|
3594
|
+
!t.enableScene || t.showResetButton || p.value ? ($(), N(V, {
|
|
3595
3595
|
key: 0,
|
|
3596
3596
|
span: f.value,
|
|
3597
|
-
class:
|
|
3597
|
+
class: b(S.$style.searchActions)
|
|
3598
3598
|
}, {
|
|
3599
|
-
default:
|
|
3599
|
+
default: C(() => [
|
|
3600
3600
|
H("div", {
|
|
3601
|
-
class:
|
|
3601
|
+
class: b(S.$style.searchActionsWrapper)
|
|
3602
3602
|
}, [
|
|
3603
|
-
!t.enableScene && t.showResetButton ? (
|
|
3603
|
+
!t.enableScene && t.showResetButton ? ($(), N(q, {
|
|
3604
3604
|
key: 0,
|
|
3605
3605
|
onClick: x
|
|
3606
3606
|
}, {
|
|
3607
|
-
default:
|
|
3608
|
-
|
|
3607
|
+
default: C(() => M[0] || (M[0] = [
|
|
3608
|
+
J(" 重置 ")
|
|
3609
3609
|
])),
|
|
3610
3610
|
_: 1
|
|
3611
3611
|
})) : R("", !0),
|
|
3612
|
-
t.enableScene ? R("", !0) : (
|
|
3612
|
+
t.enableScene ? R("", !0) : ($(), N(q, {
|
|
3613
3613
|
key: 1,
|
|
3614
3614
|
type: "primary",
|
|
3615
3615
|
loading: t.loading,
|
|
3616
3616
|
onClick: m
|
|
3617
3617
|
}, {
|
|
3618
|
-
default:
|
|
3619
|
-
|
|
3618
|
+
default: C(() => M[1] || (M[1] = [
|
|
3619
|
+
J(" 查询 ")
|
|
3620
3620
|
])),
|
|
3621
3621
|
_: 1
|
|
3622
3622
|
}, 8, ["loading"])),
|
|
3623
|
-
p.value ? (
|
|
3623
|
+
p.value ? ($(), N(q, {
|
|
3624
3624
|
key: 2,
|
|
3625
3625
|
type: "link",
|
|
3626
|
-
icon: h(r) ?
|
|
3626
|
+
icon: h(r) ? W(h(kn)) : W(h(Mt)),
|
|
3627
3627
|
onClick: P
|
|
3628
3628
|
}, {
|
|
3629
|
-
default:
|
|
3630
|
-
|
|
3629
|
+
default: C(() => [
|
|
3630
|
+
J(ye(h(r) ? "收起" : "展开"), 1)
|
|
3631
3631
|
]),
|
|
3632
3632
|
_: 1
|
|
3633
3633
|
}, 8, ["icon"])) : R("", !0)
|
|
@@ -3648,7 +3648,7 @@ const ao = (t) => {
|
|
|
3648
3648
|
searchActionsWrapper: Qr
|
|
3649
3649
|
}, Zr = {
|
|
3650
3650
|
$style: Xr
|
|
3651
|
-
}, Jr = /* @__PURE__ */
|
|
3651
|
+
}, Jr = /* @__PURE__ */ be(Vr, [["__cssModules", Zr]]);
|
|
3652
3652
|
He.locale("zh-cn");
|
|
3653
3653
|
function Pt(t) {
|
|
3654
3654
|
return Array.from(document.body.children).includes(t);
|
|
@@ -3689,14 +3689,14 @@ class es {
|
|
|
3689
3689
|
};
|
|
3690
3690
|
},
|
|
3691
3691
|
render() {
|
|
3692
|
-
return
|
|
3692
|
+
return W(
|
|
3693
3693
|
xn,
|
|
3694
3694
|
{
|
|
3695
3695
|
key: p,
|
|
3696
3696
|
locale: Ut
|
|
3697
3697
|
},
|
|
3698
3698
|
() => [
|
|
3699
|
-
|
|
3699
|
+
W(l, {
|
|
3700
3700
|
key: p,
|
|
3701
3701
|
destroyOnClose: !0,
|
|
3702
3702
|
...n,
|
|
@@ -3711,8 +3711,8 @@ class es {
|
|
|
3711
3711
|
}
|
|
3712
3712
|
}).use(mn);
|
|
3713
3713
|
r == null || r(f);
|
|
3714
|
-
const
|
|
3715
|
-
return s == null || s(
|
|
3714
|
+
const v = f.mount(`#${p}`);
|
|
3715
|
+
return s == null || s(v), v.$watch("open", (y) => {
|
|
3716
3716
|
y || this.destroy();
|
|
3717
3717
|
}), this.currents.push(f), f;
|
|
3718
3718
|
}
|
|
@@ -3940,10 +3940,10 @@ const We = 2e3, ts = (t) => {
|
|
|
3940
3940
|
var gt, bt;
|
|
3941
3941
|
He.locale("zh-cn");
|
|
3942
3942
|
const n = t, r = o, s = oe(!1), l = F(() => {
|
|
3943
|
-
var d,
|
|
3943
|
+
var d, g, k;
|
|
3944
3944
|
const a = (d = an()) == null ? void 0 : d.appContext.app;
|
|
3945
|
-
return !!((
|
|
3946
|
-
}), i = oe(), { openByConfig: p } = Tt(Mr), { openByConfig: f } = Tt(Yr),
|
|
3945
|
+
return !!((k = (g = a == null ? void 0 : a.config) == null ? void 0 : g.globalProperties) != null && k.$router);
|
|
3946
|
+
}), i = oe(), { openByConfig: p } = Tt(Mr), { openByConfig: f } = Tt(Yr), v = At(n.columns).reduce(
|
|
3947
3947
|
(a, d) => (a[d.key] = ke(d, pt), a),
|
|
3948
3948
|
{}
|
|
3949
3949
|
), y = qt([location.hostname, location.pathname, n.sceneType].join("")), u = Mn(`superTable_${y}`, {
|
|
@@ -3951,7 +3951,7 @@ const We = 2e3, ts = (t) => {
|
|
|
3951
3951
|
sceneCode: null,
|
|
3952
3952
|
sceneSort: [],
|
|
3953
3953
|
sceneList: [],
|
|
3954
|
-
columnConfig:
|
|
3954
|
+
columnConfig: v
|
|
3955
3955
|
}), m = F(() => n.enableScene ? n.sceneStorageType === "api" ? n.sceneRequest ? n.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), Lt()) : ts({
|
|
3956
3956
|
getScenes: () => u.value.sceneList,
|
|
3957
3957
|
setScenes: (a) => {
|
|
@@ -3960,7 +3960,7 @@ const We = 2e3, ts = (t) => {
|
|
|
3960
3960
|
}) : Lt()), x = oe(!1), P = F(() => Object.keys(n.customQueryParams).length > 0), S = oe(!1), M = F(() => {
|
|
3961
3961
|
var a;
|
|
3962
3962
|
return ((a = n.tableProps) == null ? void 0 : a.pagination) === !1;
|
|
3963
|
-
}),
|
|
3963
|
+
}), V = ft(async () => {
|
|
3964
3964
|
try {
|
|
3965
3965
|
K.loading = !0;
|
|
3966
3966
|
const { total: a, data: d } = await n.request({
|
|
@@ -3977,37 +3977,43 @@ const We = 2e3, ts = (t) => {
|
|
|
3977
3977
|
K.loading = !1;
|
|
3978
3978
|
}
|
|
3979
3979
|
}, n.debounceWait), q = () => {
|
|
3980
|
-
n.enableScene && !
|
|
3981
|
-
},
|
|
3982
|
-
for (const d in
|
|
3983
|
-
const
|
|
3984
|
-
|
|
3980
|
+
n.enableScene && !T.loaded || (M.value || (K.pagination.current = 1), V());
|
|
3981
|
+
}, w = oe({}), _ = (a = []) => {
|
|
3982
|
+
for (const d in w.value) {
|
|
3983
|
+
const g = w.value[d], k = a.find((A) => A.name === d);
|
|
3984
|
+
g.value = k ? k.value : g._defaultValue, g[ge.selected] = !!k, g[ge.orderInScene] = k ? a.findIndex((A) => A.name === (k == null ? void 0 : k.name)) : void 0;
|
|
3985
3985
|
}
|
|
3986
3986
|
q();
|
|
3987
|
-
},
|
|
3987
|
+
}, T = Qe({
|
|
3988
3988
|
list: [],
|
|
3989
3989
|
loading: !1,
|
|
3990
3990
|
submiting: !1,
|
|
3991
3991
|
loaded: !1
|
|
3992
|
-
}),
|
|
3992
|
+
}), Z = F(() => Fe(fe(n.defaultScene)).filter(Boolean).map(({ name: d = "默认场景", code: g = "default_scene", items: k }) => ({
|
|
3993
3993
|
name: d,
|
|
3994
|
-
code:
|
|
3994
|
+
code: g,
|
|
3995
3995
|
isCustom: !0,
|
|
3996
|
-
items:
|
|
3997
|
-
var
|
|
3996
|
+
items: k.filter((A) => !!w.value[A.name]).map((A) => {
|
|
3997
|
+
var j;
|
|
3998
3998
|
return {
|
|
3999
3999
|
name: A.name,
|
|
4000
|
-
value: A.value ??
|
|
4001
|
-
type: (
|
|
4000
|
+
value: A.value ?? w.value[A.name]._defaultValue,
|
|
4001
|
+
type: (j = w.value[A.name]) == null ? void 0 : j.type
|
|
4002
4002
|
};
|
|
4003
4003
|
})
|
|
4004
4004
|
})));
|
|
4005
4005
|
we(
|
|
4006
4006
|
() => n.formItems,
|
|
4007
4007
|
() => {
|
|
4008
|
-
Ot(fe(n.formItems)).
|
|
4009
|
-
|
|
4010
|
-
d.
|
|
4008
|
+
const a = Ot(fe(n.formItems)), d = new Set(a.map((g) => g.name));
|
|
4009
|
+
Object.keys(w.value).forEach((g) => {
|
|
4010
|
+
d.has(g) || (w.value[g][ge.selected] = !1);
|
|
4011
|
+
}), a.forEach((g) => {
|
|
4012
|
+
const k = { ...g };
|
|
4013
|
+
k.component && (k.component = ln(k.component)), w.value[g.name] ? w.value[g.name] = Dn(fe(w.value[g.name]), k) : w.value[g.name] = {
|
|
4014
|
+
...k,
|
|
4015
|
+
[ge.selected]: !n.enableScene && k.visible !== !1
|
|
4016
|
+
};
|
|
4011
4017
|
});
|
|
4012
4018
|
},
|
|
4013
4019
|
{
|
|
@@ -4017,42 +4023,46 @@ const We = 2e3, ts = (t) => {
|
|
|
4017
4023
|
);
|
|
4018
4024
|
const ie = async () => {
|
|
4019
4025
|
try {
|
|
4020
|
-
|
|
4021
|
-
const { code: a, data: d = [], msg:
|
|
4026
|
+
T.loading = !0;
|
|
4027
|
+
const { code: a, data: d = [], msg: g } = await m.value.querySceneList({ type: y });
|
|
4022
4028
|
if (a === 2e3) {
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
+
const k = T.list.find((j) => j.code === u.value.sceneCode);
|
|
4030
|
+
if (T.list = so(d, w.value, u.value.sceneSort), !T.loaded && !u.value.sceneCode && Z.value.length > 0) {
|
|
4031
|
+
const j = Z.value[0];
|
|
4032
|
+
u.value.sceneCode = j.code, _(j.items), T.loaded = !0, V();
|
|
4033
|
+
return;
|
|
4034
|
+
}
|
|
4035
|
+
const A = T.list.find((j) => j.code === u.value.sceneCode);
|
|
4036
|
+
if (!T.loaded && P.value) {
|
|
4037
|
+
u.value.sceneCode = null, T.loaded = !0;
|
|
4038
|
+
const j = Object.entries(n.customQueryParams).map(([ve, ot]) => {
|
|
4029
4039
|
var Ye;
|
|
4030
4040
|
return {
|
|
4031
|
-
name:
|
|
4041
|
+
name: ve,
|
|
4032
4042
|
value: ot,
|
|
4033
|
-
type: (Ye =
|
|
4043
|
+
type: (Ye = w.value[ve]) == null ? void 0 : Ye.type
|
|
4034
4044
|
};
|
|
4035
4045
|
});
|
|
4036
|
-
_(
|
|
4046
|
+
_(j);
|
|
4037
4047
|
return;
|
|
4038
4048
|
}
|
|
4039
|
-
(!
|
|
4049
|
+
(!T.loaded || k && k.value !== (A == null ? void 0 : A.value)) && _(A == null ? void 0 : A.items), T.loaded = !0;
|
|
4040
4050
|
} else
|
|
4041
|
-
at.error(
|
|
4051
|
+
at.error(g);
|
|
4042
4052
|
} finally {
|
|
4043
|
-
|
|
4053
|
+
T.loading = !1;
|
|
4044
4054
|
}
|
|
4045
4055
|
}, Pe = ({ code: a, msg: d }) => a === 2e3 ? (at.success("操作成功"), ie(), Promise.resolve(d)) : (at.error(d), Promise.reject(d)), Se = async ({ name: a, items: d }) => {
|
|
4046
4056
|
try {
|
|
4047
|
-
const
|
|
4057
|
+
const g = await m.value.createScene({
|
|
4048
4058
|
type: y,
|
|
4049
4059
|
name: a,
|
|
4050
4060
|
value: JSON.stringify(d),
|
|
4051
4061
|
asPrivate: !0
|
|
4052
4062
|
});
|
|
4053
|
-
u.value.sceneCode =
|
|
4054
|
-
} catch (
|
|
4055
|
-
return Promise.reject(
|
|
4063
|
+
u.value.sceneCode = g == null ? void 0 : g.data, Pe(g);
|
|
4064
|
+
} catch (g) {
|
|
4065
|
+
return Promise.reject(g);
|
|
4056
4066
|
}
|
|
4057
4067
|
}, pe = async (a) => {
|
|
4058
4068
|
try {
|
|
@@ -4072,15 +4082,15 @@ const We = 2e3, ts = (t) => {
|
|
|
4072
4082
|
} catch (d) {
|
|
4073
4083
|
return Promise.reject(d);
|
|
4074
4084
|
}
|
|
4075
|
-
}, Te = F(() =>
|
|
4085
|
+
}, Te = F(() => T.list.length < n.maxSceneCount);
|
|
4076
4086
|
we(
|
|
4077
|
-
() => [u.value.sceneCode,
|
|
4087
|
+
() => [u.value.sceneCode, T.list],
|
|
4078
4088
|
() => {
|
|
4079
4089
|
if (P.value && !S.value) {
|
|
4080
4090
|
S.value = !0;
|
|
4081
4091
|
return;
|
|
4082
4092
|
}
|
|
4083
|
-
const a = [...
|
|
4093
|
+
const a = [...Z.value, ...T.list].find(
|
|
4084
4094
|
(d) => d.code === u.value.sceneCode
|
|
4085
4095
|
);
|
|
4086
4096
|
_((a == null ? void 0 : a.items) ?? []);
|
|
@@ -4101,12 +4111,12 @@ const We = 2e3, ts = (t) => {
|
|
|
4101
4111
|
showTotal: (a) => `共${a}条数据`,
|
|
4102
4112
|
...Xe(n.tableProps, "pagination", {}),
|
|
4103
4113
|
onShowSizeChange: (a, d) => {
|
|
4104
|
-
var
|
|
4105
|
-
((
|
|
4114
|
+
var g, k, A, j;
|
|
4115
|
+
((g = n.tableProps) == null ? void 0 : g.pagination) !== !1 && ((j = (A = (k = n.tableProps) == null ? void 0 : k.pagination) == null ? void 0 : A.onShowSizeChange) == null || j.call(A, 1, d));
|
|
4106
4116
|
},
|
|
4107
4117
|
onChange: (a, d) => {
|
|
4108
|
-
var
|
|
4109
|
-
K.pagination.current = d !== K.pagination.pageSize ? 1 : a, K.pagination.pageSize = d, ((
|
|
4118
|
+
var g, k, A, j;
|
|
4119
|
+
K.pagination.current = d !== K.pagination.pageSize ? 1 : a, K.pagination.pageSize = d, ((g = n.tableProps) == null ? void 0 : g.pagination) !== !1 && ((j = (A = (k = n.tableProps) == null ? void 0 : k.pagination) == null ? void 0 : A.onChange) == null || j.call(A, a, d)), V();
|
|
4110
4120
|
}
|
|
4111
4121
|
},
|
|
4112
4122
|
tableLayout: "fixed",
|
|
@@ -4116,11 +4126,11 @@ const We = 2e3, ts = (t) => {
|
|
|
4116
4126
|
scrollToFirstRowOnChange: !0,
|
|
4117
4127
|
...((bt = n.tableProps) == null ? void 0 : bt.scroll) ?? {}
|
|
4118
4128
|
},
|
|
4119
|
-
rowClassName: (a, d,
|
|
4120
|
-
var
|
|
4121
|
-
let
|
|
4122
|
-
const A = (
|
|
4123
|
-
return $e(A) ?
|
|
4129
|
+
rowClassName: (a, d, g) => {
|
|
4130
|
+
var j;
|
|
4131
|
+
let k = "";
|
|
4132
|
+
const A = (j = n.tableProps) == null ? void 0 : j.rowClassName;
|
|
4133
|
+
return $e(A) ? k = A(a, d, g) : typeof A == "string" && (k = A), [k, D.value].join(" ");
|
|
4124
4134
|
}
|
|
4125
4135
|
}), qe = F(() => {
|
|
4126
4136
|
try {
|
|
@@ -4134,27 +4144,27 @@ const We = 2e3, ts = (t) => {
|
|
|
4134
4144
|
return a == null ? void 0 : a[d];
|
|
4135
4145
|
if (typeof d == "function")
|
|
4136
4146
|
return d(a);
|
|
4137
|
-
},
|
|
4138
|
-
const d = u.value.columnConfig[a.key],
|
|
4139
|
-
return pt.forEach((
|
|
4140
|
-
|
|
4141
|
-
}),
|
|
4142
|
-
})),
|
|
4147
|
+
}, O = F(() => At(n.columns).map((a) => {
|
|
4148
|
+
const d = u.value.columnConfig[a.key], g = { ...a };
|
|
4149
|
+
return pt.forEach((k) => {
|
|
4150
|
+
k !== "key" && (d == null ? void 0 : d[k]) !== void 0 && (g[k] = d[k]);
|
|
4151
|
+
}), g;
|
|
4152
|
+
})), I = (a, d) => {
|
|
4143
4153
|
u.value.columnConfig[d.key] = {
|
|
4144
4154
|
...u.value.columnConfig[d.key] ?? {},
|
|
4145
4155
|
width: a
|
|
4146
4156
|
};
|
|
4147
4157
|
}, B = (a) => {
|
|
4148
4158
|
a.length === 0 ? u.value.columnConfig = {} : u.value.columnConfig = a.reduce(
|
|
4149
|
-
(d,
|
|
4150
|
-
...
|
|
4151
|
-
index:
|
|
4159
|
+
(d, g, k) => (d[g.key] = {
|
|
4160
|
+
...g,
|
|
4161
|
+
index: k
|
|
4152
4162
|
}, d),
|
|
4153
4163
|
{}
|
|
4154
4164
|
);
|
|
4155
4165
|
};
|
|
4156
4166
|
we(
|
|
4157
|
-
() => [
|
|
4167
|
+
() => [O.value, n.sortable],
|
|
4158
4168
|
() => {
|
|
4159
4169
|
const a = {
|
|
4160
4170
|
key: G.sort,
|
|
@@ -4162,11 +4172,11 @@ const We = 2e3, ts = (t) => {
|
|
|
4162
4172
|
title: "",
|
|
4163
4173
|
fixed: "left",
|
|
4164
4174
|
width: 60
|
|
4165
|
-
}, d =
|
|
4175
|
+
}, d = O.value.filter(({ visible: j }) => j), g = d.filter((j) => j.fixed === "left").sort((j, ve) => j.index - ve.index), k = d.filter((j) => !j.fixed).sort((j, ve) => j.index - ve.index), A = d.filter((j) => j.fixed === "right").sort((j, ve) => j.index - ve.index);
|
|
4166
4176
|
K.columns = [
|
|
4167
4177
|
...n.sortable ? [a] : [],
|
|
4168
|
-
...
|
|
4169
|
-
...
|
|
4178
|
+
...g,
|
|
4179
|
+
...k,
|
|
4170
4180
|
...A
|
|
4171
4181
|
];
|
|
4172
4182
|
},
|
|
@@ -4175,60 +4185,60 @@ const We = 2e3, ts = (t) => {
|
|
|
4175
4185
|
immediate: !0
|
|
4176
4186
|
}
|
|
4177
4187
|
);
|
|
4178
|
-
const
|
|
4188
|
+
const ee = () => new Promise((a) => {
|
|
4179
4189
|
const d = () => {
|
|
4180
|
-
var
|
|
4181
|
-
const
|
|
4182
|
-
if (
|
|
4183
|
-
a(
|
|
4190
|
+
var k, A;
|
|
4191
|
+
const g = (A = (k = se.value) == null ? void 0 : k.$el) == null ? void 0 : A.querySelector(".ant-table-tbody");
|
|
4192
|
+
if (g) {
|
|
4193
|
+
a(g);
|
|
4184
4194
|
return;
|
|
4185
4195
|
}
|
|
4186
4196
|
requestAnimationFrame(d);
|
|
4187
4197
|
};
|
|
4188
4198
|
d();
|
|
4189
4199
|
}), ae = async () => {
|
|
4190
|
-
const a = await
|
|
4200
|
+
const a = await ee();
|
|
4191
4201
|
a && new Bn(a, {
|
|
4192
4202
|
animation: 150,
|
|
4193
4203
|
handle: ".super-table-column-draggable-handle",
|
|
4194
4204
|
setData: (d) => {
|
|
4195
|
-
const
|
|
4196
|
-
|
|
4205
|
+
const g = new Image();
|
|
4206
|
+
g.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", d.setDragImage(g, 0, 0);
|
|
4197
4207
|
},
|
|
4198
4208
|
onEnd: (d) => {
|
|
4199
|
-
const { oldIndex:
|
|
4200
|
-
if (
|
|
4201
|
-
const A = fe(K.dataSource), [
|
|
4202
|
-
A.splice(
|
|
4209
|
+
const { oldIndex: g, newIndex: k } = d;
|
|
4210
|
+
if (g === void 0 || k === void 0) return;
|
|
4211
|
+
const A = fe(K.dataSource), [j] = A.splice(g, 1);
|
|
4212
|
+
A.splice(k, 0, j), r("row-sort-end", A);
|
|
4203
4213
|
}
|
|
4204
4214
|
});
|
|
4205
4215
|
}, me = (a, d) => {
|
|
4206
|
-
|
|
4216
|
+
w.value[a].value = d, r("form-item-change", a, d, fe(w.value[a]), tt, nt), w.value[a].quiet !== !0 && n.enableScene && q();
|
|
4207
4217
|
}, Je = () => {
|
|
4208
|
-
for (const a in
|
|
4209
|
-
|
|
4218
|
+
for (const a in w.value)
|
|
4219
|
+
w.value[a].value = w.value[a]._defaultValue;
|
|
4210
4220
|
q();
|
|
4211
4221
|
}, Le = (a, d) => {
|
|
4212
4222
|
x.value = !1;
|
|
4213
|
-
let
|
|
4214
|
-
a === ue.create && (
|
|
4223
|
+
let g = fe(w.value);
|
|
4224
|
+
a === ue.create && (g = Ot(n.formItems).reduce((k, A) => (k[A.name] = A, k), {})), p({
|
|
4215
4225
|
props: {
|
|
4216
4226
|
ref: i,
|
|
4217
4227
|
currentScene: d,
|
|
4218
4228
|
actionType: a,
|
|
4219
|
-
formConfigMap:
|
|
4229
|
+
formConfigMap: g,
|
|
4220
4230
|
onCreate: Se,
|
|
4221
4231
|
onUpdate: pe,
|
|
4222
|
-
onUpdateFormConfig: (
|
|
4223
|
-
|
|
4224
|
-
Ue(
|
|
4232
|
+
onUpdateFormConfig: (k) => {
|
|
4233
|
+
k.forEach((A) => {
|
|
4234
|
+
Ue(w.value, A.name, A);
|
|
4225
4235
|
});
|
|
4226
4236
|
},
|
|
4227
|
-
onSearch: (
|
|
4228
|
-
_(
|
|
4237
|
+
onSearch: (k) => {
|
|
4238
|
+
_(k);
|
|
4229
4239
|
},
|
|
4230
|
-
onFormItemChange(
|
|
4231
|
-
r("form-item-change",
|
|
4240
|
+
onFormItemChange(k, A) {
|
|
4241
|
+
r("form-item-change", k, A, fe(w.value[k]), tt, nt);
|
|
4232
4242
|
},
|
|
4233
4243
|
onCancel() {
|
|
4234
4244
|
i.value = void 0;
|
|
@@ -4238,44 +4248,44 @@ const We = 2e3, ts = (t) => {
|
|
|
4238
4248
|
}, et = () => {
|
|
4239
4249
|
x.value = !1, f({
|
|
4240
4250
|
props: {
|
|
4241
|
-
list:
|
|
4251
|
+
list: T.list,
|
|
4242
4252
|
allowCreateScene: h(Te),
|
|
4243
4253
|
onCreate: () => Le(ue.create),
|
|
4244
4254
|
onUpdate: (a) => Le(ue.update, a),
|
|
4245
4255
|
onDelete: (a) => Me(a),
|
|
4246
4256
|
onSort: (a) => {
|
|
4247
|
-
u.value.sceneSort = a,
|
|
4257
|
+
u.value.sceneSort = a, T.list = T.list.sort((d, g) => a.indexOf(d.code) - a.indexOf(g.code));
|
|
4248
4258
|
}
|
|
4249
4259
|
}
|
|
4250
4260
|
});
|
|
4251
4261
|
}, Q = async (a) => {
|
|
4252
4262
|
await pn();
|
|
4253
|
-
const d =
|
|
4263
|
+
const d = T.list.find((g) => g.code === a);
|
|
4254
4264
|
r("scene-change", d);
|
|
4255
|
-
}, Be = (a) =>
|
|
4265
|
+
}, Be = (a) => w.value[a], Ce = (a, d, g) => {
|
|
4256
4266
|
if (Ht.includes(d))
|
|
4257
4267
|
return Ie("setFormItem error,", `form item with prop "${a}" is readonly`);
|
|
4258
4268
|
if (!Be(a))
|
|
4259
4269
|
return Ie("setFormItem error,", `Cannot find form item with name "${a}"`);
|
|
4260
|
-
if (d === "visible" &&
|
|
4270
|
+
if (d === "visible" && w.value[a].fixed)
|
|
4261
4271
|
return Ie("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
4262
|
-
Ue(
|
|
4272
|
+
Ue(w.value, `${a}.${d}`, g);
|
|
4263
4273
|
}, ht = (a, d) => {
|
|
4264
|
-
if (
|
|
4274
|
+
if (!w.value[a])
|
|
4265
4275
|
return Ie("setFormValue error,", `Cannot find form item with name "${a}"`);
|
|
4266
|
-
|
|
4276
|
+
w.value[a].value = d;
|
|
4267
4277
|
}, Yt = (a) => {
|
|
4268
|
-
Object.entries(a).forEach(([d,
|
|
4269
|
-
ht(d,
|
|
4278
|
+
Object.entries(a).forEach(([d, g]) => {
|
|
4279
|
+
ht(d, g);
|
|
4270
4280
|
});
|
|
4271
4281
|
}, Vt = (a) => {
|
|
4272
4282
|
var d;
|
|
4273
|
-
return (d =
|
|
4283
|
+
return (d = w.value[a]) == null ? void 0 : d.value;
|
|
4274
4284
|
}, yt = (a) => {
|
|
4275
|
-
const d = {},
|
|
4276
|
-
for (const
|
|
4277
|
-
const A =
|
|
4278
|
-
A._selected && (d[
|
|
4285
|
+
const d = {}, g = a ? ke(w.value, Fe(a)) : w.value;
|
|
4286
|
+
for (const k in g) {
|
|
4287
|
+
const A = g[k];
|
|
4288
|
+
A._selected && (d[k] = fe(A.value));
|
|
4279
4289
|
}
|
|
4280
4290
|
return d;
|
|
4281
4291
|
}, Wt = () => K.dataSource, Gt = (a) => {
|
|
@@ -4286,8 +4296,8 @@ const We = 2e3, ts = (t) => {
|
|
|
4286
4296
|
getFormItem(a) {
|
|
4287
4297
|
return i.value ? i.value.getFormItem(a) : Be(a);
|
|
4288
4298
|
},
|
|
4289
|
-
setFormItem(a, d,
|
|
4290
|
-
i.value ? i.value.setFormItem(a, d,
|
|
4299
|
+
setFormItem(a, d, g) {
|
|
4300
|
+
i.value ? i.value.setFormItem(a, d, g) : Ce(a, d, g);
|
|
4291
4301
|
},
|
|
4292
4302
|
getFormValues(a) {
|
|
4293
4303
|
return i.value ? i.value.getFormValues(a) : yt(a);
|
|
@@ -4321,10 +4331,10 @@ const We = 2e3, ts = (t) => {
|
|
|
4321
4331
|
if (a)
|
|
4322
4332
|
ie();
|
|
4323
4333
|
else {
|
|
4324
|
-
const d = Object.values(
|
|
4325
|
-
name:
|
|
4326
|
-
value:
|
|
4327
|
-
type:
|
|
4334
|
+
const d = Object.values(w.value).filter((g) => g.visible !== !1).map((g) => ({
|
|
4335
|
+
name: g.name,
|
|
4336
|
+
value: g.value ?? g._defaultValue,
|
|
4337
|
+
type: g.type
|
|
4328
4338
|
}));
|
|
4329
4339
|
_(d);
|
|
4330
4340
|
}
|
|
@@ -4341,7 +4351,7 @@ const We = 2e3, ts = (t) => {
|
|
|
4341
4351
|
immediate: !0
|
|
4342
4352
|
}
|
|
4343
4353
|
), un(async () => {
|
|
4344
|
-
n.enableScene ? await ie() :
|
|
4354
|
+
n.enableScene ? await ie() : V(), s.value = !0;
|
|
4345
4355
|
});
|
|
4346
4356
|
const Xt = {
|
|
4347
4357
|
token: {
|
|
@@ -4349,81 +4359,81 @@ const We = 2e3, ts = (t) => {
|
|
|
4349
4359
|
}
|
|
4350
4360
|
};
|
|
4351
4361
|
return (a, d) => {
|
|
4352
|
-
const
|
|
4353
|
-
return
|
|
4362
|
+
const g = L("a-form-item"), k = L("a-button"), A = L("a-select"), j = L("a-divider"), ve = L("a-space"), ot = L("a-form"), Ye = L("a-typography-text"), Zt = L("a-tooltip"), Jt = L("a-table"), en = L("a-config-provider");
|
|
4363
|
+
return $(), N(en, {
|
|
4354
4364
|
locale: h(Ut),
|
|
4355
4365
|
theme: Xt
|
|
4356
4366
|
}, {
|
|
4357
|
-
default:
|
|
4367
|
+
default: C(() => [
|
|
4358
4368
|
H("div", {
|
|
4359
|
-
class:
|
|
4369
|
+
class: b([a.$style.superTable, "antd-super-table"]),
|
|
4360
4370
|
style: ne(t.wrapperStyle)
|
|
4361
4371
|
}, [
|
|
4362
4372
|
H("div", {
|
|
4363
|
-
class:
|
|
4373
|
+
class: b(a.$style.querySection)
|
|
4364
4374
|
}, [
|
|
4365
|
-
t.enableScene ? (
|
|
4375
|
+
t.enableScene ? ($(), z("div", {
|
|
4366
4376
|
key: 0,
|
|
4367
|
-
class:
|
|
4377
|
+
class: b(a.$style.sceneHeader)
|
|
4368
4378
|
}, [
|
|
4369
4379
|
H("div", {
|
|
4370
|
-
class:
|
|
4380
|
+
class: b(a.$style.sceneFormWrapper)
|
|
4371
4381
|
}, [
|
|
4372
|
-
|
|
4382
|
+
E(ot, {
|
|
4373
4383
|
layout: "inline",
|
|
4374
|
-
class:
|
|
4384
|
+
class: b(a.$style.sceneForm)
|
|
4375
4385
|
}, {
|
|
4376
|
-
default:
|
|
4377
|
-
a.$slots.sceneAddonBefore ? (
|
|
4378
|
-
default:
|
|
4386
|
+
default: C(() => [
|
|
4387
|
+
a.$slots.sceneAddonBefore ? ($(), N(g, { key: 0 }, {
|
|
4388
|
+
default: C(() => [
|
|
4379
4389
|
he(a.$slots, "sceneAddonBefore")
|
|
4380
4390
|
]),
|
|
4381
4391
|
_: 3
|
|
4382
4392
|
})) : R("", !0),
|
|
4383
|
-
|
|
4384
|
-
default:
|
|
4385
|
-
|
|
4393
|
+
E(g, { label: "场景选择" }, {
|
|
4394
|
+
default: C(() => [
|
|
4395
|
+
E(A, {
|
|
4386
4396
|
value: h(u).sceneCode,
|
|
4387
4397
|
"onUpdate:value": d[1] || (d[1] = (te) => h(u).sceneCode = te),
|
|
4388
|
-
class:
|
|
4398
|
+
class: b(a.$style.sceneSelect),
|
|
4389
4399
|
placeholder: "请选择",
|
|
4390
4400
|
"allow-clear": "",
|
|
4391
4401
|
"show-search": "",
|
|
4392
4402
|
"option-filter-prop": "name",
|
|
4393
|
-
options: [...
|
|
4403
|
+
options: [...Z.value, ...T.list],
|
|
4394
4404
|
"field-names": { value: "code", label: "name" },
|
|
4395
4405
|
open: x.value,
|
|
4396
|
-
loading:
|
|
4406
|
+
loading: T.loading,
|
|
4397
4407
|
onChange: Q,
|
|
4398
4408
|
onDropdownVisibleChange: d[2] || (d[2] = (te) => x.value = te)
|
|
4399
4409
|
}, {
|
|
4400
|
-
dropdownRender:
|
|
4401
|
-
|
|
4410
|
+
dropdownRender: C(({ menuNode: te }) => [
|
|
4411
|
+
E(h(To), { vnodes: te }, null, 8, ["vnodes"]),
|
|
4402
4412
|
H("div", {
|
|
4403
|
-
class:
|
|
4413
|
+
class: b(a.$style.sceneOpBtnWrapper)
|
|
4404
4414
|
}, [
|
|
4405
|
-
|
|
4415
|
+
E(k, {
|
|
4406
4416
|
type: "link",
|
|
4407
4417
|
block: "",
|
|
4408
|
-
icon:
|
|
4409
|
-
class:
|
|
4418
|
+
icon: W(h(In)),
|
|
4419
|
+
class: b(a.$style.sceneOpBtn),
|
|
4410
4420
|
disabled: !Te.value,
|
|
4411
4421
|
onClick: d[0] || (d[0] = (rt) => Le(h(ue).create))
|
|
4412
4422
|
}, {
|
|
4413
|
-
default:
|
|
4414
|
-
|
|
4423
|
+
default: C(() => d[5] || (d[5] = [
|
|
4424
|
+
J(" 新建场景 ")
|
|
4415
4425
|
])),
|
|
4416
4426
|
_: 1
|
|
4417
4427
|
}, 8, ["icon", "class", "disabled"]),
|
|
4418
|
-
|
|
4428
|
+
E(k, {
|
|
4419
4429
|
type: "link",
|
|
4420
4430
|
block: "",
|
|
4421
|
-
icon:
|
|
4422
|
-
class:
|
|
4431
|
+
icon: W(h(On)),
|
|
4432
|
+
class: b(a.$style.sceneOpBtn),
|
|
4423
4433
|
onClick: et
|
|
4424
4434
|
}, {
|
|
4425
|
-
default:
|
|
4426
|
-
|
|
4435
|
+
default: C(() => d[6] || (d[6] = [
|
|
4436
|
+
J(" 场景管理 ")
|
|
4427
4437
|
])),
|
|
4428
4438
|
_: 1
|
|
4429
4439
|
}, 8, ["icon", "class"])
|
|
@@ -4434,33 +4444,33 @@ const We = 2e3, ts = (t) => {
|
|
|
4434
4444
|
]),
|
|
4435
4445
|
_: 1
|
|
4436
4446
|
}),
|
|
4437
|
-
|
|
4438
|
-
default:
|
|
4439
|
-
|
|
4440
|
-
split:
|
|
4441
|
-
|
|
4447
|
+
E(g, null, {
|
|
4448
|
+
default: C(() => [
|
|
4449
|
+
E(ve, null, {
|
|
4450
|
+
split: C(() => [
|
|
4451
|
+
E(j, { type: "vertical" })
|
|
4442
4452
|
]),
|
|
4443
|
-
default:
|
|
4444
|
-
|
|
4453
|
+
default: C(() => [
|
|
4454
|
+
E(k, {
|
|
4445
4455
|
type: "primary",
|
|
4446
|
-
icon:
|
|
4456
|
+
icon: W(h(An)),
|
|
4447
4457
|
onClick: d[3] || (d[3] = (te) => Le(h(ue).search))
|
|
4448
4458
|
}, {
|
|
4449
|
-
default:
|
|
4450
|
-
|
|
4459
|
+
default: C(() => d[7] || (d[7] = [
|
|
4460
|
+
J(" 高级筛选 ")
|
|
4451
4461
|
])),
|
|
4452
4462
|
_: 1
|
|
4453
4463
|
}, 8, ["icon"]),
|
|
4454
|
-
t.showRefreshButton ? (
|
|
4464
|
+
t.showRefreshButton ? ($(), N(k, {
|
|
4455
4465
|
key: 0,
|
|
4456
4466
|
type: "primary",
|
|
4457
4467
|
ghost: "",
|
|
4458
|
-
icon:
|
|
4468
|
+
icon: W(h(Pn)),
|
|
4459
4469
|
loading: K.loading,
|
|
4460
4470
|
onClick: q
|
|
4461
4471
|
}, {
|
|
4462
|
-
default:
|
|
4463
|
-
|
|
4472
|
+
default: C(() => d[8] || (d[8] = [
|
|
4473
|
+
J(" 刷新 ")
|
|
4464
4474
|
])),
|
|
4465
4475
|
_: 1
|
|
4466
4476
|
}, 8, ["icon", "loading"])) : R("", !0)
|
|
@@ -4470,8 +4480,8 @@ const We = 2e3, ts = (t) => {
|
|
|
4470
4480
|
]),
|
|
4471
4481
|
_: 1
|
|
4472
4482
|
}),
|
|
4473
|
-
a.$slots.sceneAddonAfter ? (
|
|
4474
|
-
default:
|
|
4483
|
+
a.$slots.sceneAddonAfter ? ($(), N(g, { key: 1 }, {
|
|
4484
|
+
default: C(() => [
|
|
4475
4485
|
he(a.$slots, "sceneAddonAfter")
|
|
4476
4486
|
]),
|
|
4477
4487
|
_: 3
|
|
@@ -4480,15 +4490,15 @@ const We = 2e3, ts = (t) => {
|
|
|
4480
4490
|
_: 3
|
|
4481
4491
|
}, 8, ["class"])
|
|
4482
4492
|
], 2),
|
|
4483
|
-
a.$slots.extra ? (
|
|
4493
|
+
a.$slots.extra ? ($(), z("div", {
|
|
4484
4494
|
key: 0,
|
|
4485
|
-
class:
|
|
4495
|
+
class: b(a.$style.sceneExtra)
|
|
4486
4496
|
}, [
|
|
4487
4497
|
he(a.$slots, "extra")
|
|
4488
4498
|
], 2)) : R("", !0)
|
|
4489
4499
|
], 2)) : R("", !0),
|
|
4490
|
-
|
|
4491
|
-
"form-config-map":
|
|
4500
|
+
E(Jr, {
|
|
4501
|
+
"form-config-map": w.value,
|
|
4492
4502
|
"form-item-col-span": t.formItemColSpan,
|
|
4493
4503
|
"enable-scene": t.enableScene,
|
|
4494
4504
|
"show-reset-button": t.showResetButton && !t.enableScene,
|
|
@@ -4501,91 +4511,91 @@ const We = 2e3, ts = (t) => {
|
|
|
4501
4511
|
}, null, 8, ["form-config-map", "form-item-col-span", "enable-scene", "show-reset-button", "show-expand-button", "loading", "super-table-i-d"])
|
|
4502
4512
|
], 2),
|
|
4503
4513
|
H("div", {
|
|
4504
|
-
class:
|
|
4514
|
+
class: b(a.$style.tableWrapper),
|
|
4505
4515
|
style: ne(t.tableWrapperStyle)
|
|
4506
4516
|
}, [
|
|
4507
|
-
a.$slots.tableHead || a.$slots.toolBarExtra ? (
|
|
4517
|
+
a.$slots.tableHead || a.$slots.toolBarExtra ? ($(), z("div", {
|
|
4508
4518
|
key: 0,
|
|
4509
|
-
class:
|
|
4519
|
+
class: b(a.$style.toolbar)
|
|
4510
4520
|
}, [
|
|
4511
4521
|
H("div", {
|
|
4512
|
-
class:
|
|
4522
|
+
class: b(a.$style.tableHeadWrapper)
|
|
4513
4523
|
}, [
|
|
4514
4524
|
he(a.$slots, "tableHead")
|
|
4515
4525
|
], 2),
|
|
4516
|
-
a.$slots.toolBarExtra ? (
|
|
4526
|
+
a.$slots.toolBarExtra ? ($(), z("div", {
|
|
4517
4527
|
key: 0,
|
|
4518
|
-
class:
|
|
4528
|
+
class: b(a.$style.actionBtns)
|
|
4519
4529
|
}, [
|
|
4520
4530
|
he(a.$slots, "toolBarExtra")
|
|
4521
4531
|
], 2)) : R("", !0)
|
|
4522
4532
|
], 2)) : R("", !0),
|
|
4523
4533
|
H("div", {
|
|
4524
|
-
class:
|
|
4534
|
+
class: b(a.$style.tableContent)
|
|
4525
4535
|
}, [
|
|
4526
|
-
t.enableTableConfig ? (
|
|
4536
|
+
t.enableTableConfig ? ($(), N(Qo, {
|
|
4527
4537
|
key: 0,
|
|
4528
|
-
columns:
|
|
4538
|
+
columns: O.value,
|
|
4529
4539
|
onChange: B
|
|
4530
4540
|
}, null, 8, ["columns"])) : R("", !0),
|
|
4531
|
-
|
|
4541
|
+
E(Jt, le({
|
|
4532
4542
|
ref_key: "tableRef",
|
|
4533
4543
|
ref: se
|
|
4534
4544
|
}, {
|
|
4535
4545
|
...K,
|
|
4536
4546
|
dataSource: qe.value
|
|
4537
|
-
}, { onResizeColumn:
|
|
4538
|
-
headerCell:
|
|
4539
|
-
te.class !== "ant-table-row-expand-icon-cell" ? (
|
|
4547
|
+
}, { onResizeColumn: I }), dn({
|
|
4548
|
+
headerCell: C(({ column: te }) => [
|
|
4549
|
+
te.class !== "ant-table-row-expand-icon-cell" ? ($(), z("div", {
|
|
4540
4550
|
key: 0,
|
|
4541
|
-
class:
|
|
4551
|
+
class: b(a.$style.headerCell)
|
|
4542
4552
|
}, [
|
|
4543
|
-
|
|
4553
|
+
E(Ye, {
|
|
4544
4554
|
ellipsis: { tooltip: te.title },
|
|
4545
4555
|
content: te.title,
|
|
4546
|
-
class:
|
|
4556
|
+
class: b(a.$style.headerCellText)
|
|
4547
4557
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
4548
|
-
te.titleTooltip ? (
|
|
4549
|
-
title:
|
|
4558
|
+
te.titleTooltip ? ($(), N(Zt, { key: 0 }, {
|
|
4559
|
+
title: C(() => [
|
|
4550
4560
|
H("span", {
|
|
4551
4561
|
innerHTML: te.titleTooltip
|
|
4552
4562
|
}, null, 8, ns)
|
|
4553
4563
|
]),
|
|
4554
|
-
default:
|
|
4555
|
-
|
|
4564
|
+
default: C(() => [
|
|
4565
|
+
E(h(Tn), {
|
|
4556
4566
|
style: ne({ color: h(re).colorTextQuaternary }),
|
|
4557
|
-
class:
|
|
4567
|
+
class: b(a.$style.headerCellTooltipIcon)
|
|
4558
4568
|
}, null, 8, ["style", "class"])
|
|
4559
4569
|
]),
|
|
4560
4570
|
_: 2
|
|
4561
4571
|
}, 1024)) : R("", !0)
|
|
4562
4572
|
], 2)) : R("", !0)
|
|
4563
4573
|
]),
|
|
4564
|
-
bodyCell:
|
|
4565
|
-
Ft([ze(rt), te == null ? void 0 : te.key, vt], () =>
|
|
4574
|
+
bodyCell: C(({ column: te, record: rt, index: vt }) => [
|
|
4575
|
+
Ft([ze(rt), te == null ? void 0 : te.key, vt], () => E(Po, {
|
|
4566
4576
|
column: te,
|
|
4567
4577
|
record: rt,
|
|
4568
4578
|
index: vt,
|
|
4569
4579
|
hasRouter: l.value
|
|
4570
4580
|
}, null, 8, ["column", "record", "index", "hasRouter"]), d, 4)
|
|
4571
4581
|
]),
|
|
4572
|
-
default:
|
|
4582
|
+
default: C(() => [
|
|
4573
4583
|
a.$slots.expandColumnTitle ? he(a.$slots, "expandColumnTitle", { key: 0 }) : R("", !0)
|
|
4574
4584
|
]),
|
|
4575
4585
|
_: 2
|
|
4576
4586
|
}, [
|
|
4577
4587
|
a.$slots.expandedRowRender ? {
|
|
4578
4588
|
name: "expandedRowRender",
|
|
4579
|
-
fn:
|
|
4589
|
+
fn: C(({ record: te }) => [
|
|
4580
4590
|
he(a.$slots, "expandedRowRender", { record: te })
|
|
4581
4591
|
]),
|
|
4582
4592
|
key: "0"
|
|
4583
4593
|
} : void 0
|
|
4584
4594
|
]), 1040)
|
|
4585
4595
|
], 2),
|
|
4586
|
-
a.$slots.tableFoot ? (
|
|
4596
|
+
a.$slots.tableFoot ? ($(), z("div", {
|
|
4587
4597
|
key: 1,
|
|
4588
|
-
class:
|
|
4598
|
+
class: b(a.$style.tableFootWrapper)
|
|
4589
4599
|
}, [
|
|
4590
4600
|
he(a.$slots, "tableFoot")
|
|
4591
4601
|
], 2)) : R("", !0)
|
|
@@ -4616,7 +4626,7 @@ const We = 2e3, ts = (t) => {
|
|
|
4616
4626
|
sceneOpBtn: Cs
|
|
4617
4627
|
}, Es = {
|
|
4618
4628
|
$style: _s
|
|
4619
|
-
}, Dt = /* @__PURE__ */
|
|
4629
|
+
}, Dt = /* @__PURE__ */ be(os, [["__cssModules", Es]]);
|
|
4620
4630
|
Dt.install = (t) => {
|
|
4621
4631
|
t.component("SuperTable", Dt);
|
|
4622
4632
|
};
|