@gopowerteam/table-render 0.0.143 → 0.0.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/table-render/index.d.ts +11 -0
- package/dist/es/index.mjs +85 -75
- package/dist/es/table-render/index.d.ts +11 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/es/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var ve = Object.defineProperty;
|
|
2
2
|
var xe = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var S = (e, t, r) => (xe(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { ref as h, getCurrentInstance as A, onMounted as
|
|
5
|
-
import { Button as M, Tag as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import
|
|
4
|
+
import { ref as h, getCurrentInstance as A, onMounted as E, onUpdated as Se, reactive as ke, createVNode as s, Fragment as B, createTextVNode as $, h as Ce, render as Te, defineComponent as q, isVNode as Me, mergeProps as ne, nextTick as X, getCurrentScope as Oe, onScopeDispose as _e, unref as Re, computed as O, watchEffect as $e, withDirectives as Ye, resolveDirective as Ee, readonly as qe } from "vue";
|
|
5
|
+
import { Button as M, Tag as ze, Dropdown as Z, Descriptions as je, DescriptionsItem as Le, Divider as Pe, Space as p, Pagination as De, Transfer as Ae, Table as Be } from "@arco-design/web-vue";
|
|
6
|
+
import { useModal as z, onSubmit as Ie, ModalProvider as Ke } from "@gopowerteam/modal-render";
|
|
7
|
+
import * as We from "exceljs";
|
|
8
8
|
import j from "dayjs";
|
|
9
9
|
import { FormRender as ae } from "@gopowerteam/form-render";
|
|
10
|
-
import { TableRenderResolver as
|
|
11
|
-
function
|
|
10
|
+
import { TableRenderResolver as cr } from "./resolver.mjs";
|
|
11
|
+
function Fe(e, t, r) {
|
|
12
12
|
const [u, ...n] = t.index ? t.index.split(".").reverse() : [t.key], a = n.reverse().reduce((l, d) => l == null ? void 0 : l[d], e);
|
|
13
13
|
a[u] = r;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Ve(e) {
|
|
16
16
|
const t = h([]), r = (n) => {
|
|
17
17
|
const a = e.filter((l) => l.formatter);
|
|
18
18
|
return a.length > 0 ? n.map((l) => (a.forEach((d) => {
|
|
19
|
-
d.formatter &&
|
|
19
|
+
d.formatter && Fe(l, d, d.formatter(l));
|
|
20
20
|
}), l)) : n;
|
|
21
21
|
};
|
|
22
22
|
return [t, (n) => {
|
|
@@ -30,14 +30,14 @@ function Ne(e) {
|
|
|
30
30
|
...typeof t.form == "boolean" ? {} : t.form
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function rr(e) {
|
|
34
34
|
const t = A(), r = h();
|
|
35
35
|
function u() {
|
|
36
36
|
var a, l;
|
|
37
37
|
const n = (l = (a = t == null ? void 0 : t.proxy) == null ? void 0 : a.$refs) == null ? void 0 : l[e];
|
|
38
38
|
n && (r.value = n);
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return E(u), Se(u), r;
|
|
41
41
|
}
|
|
42
42
|
function Ue(e) {
|
|
43
43
|
return (t, r) => e[t](r);
|
|
@@ -114,7 +114,7 @@ function Y(e) {
|
|
|
114
114
|
}
|
|
115
115
|
function He(e) {
|
|
116
116
|
return g("button", (r, u, n) => {
|
|
117
|
-
const a =
|
|
117
|
+
const a = z(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], d = (i, f) => typeof i == "function" ? i(r) : i === void 0 ? f : i;
|
|
118
118
|
async function m(i) {
|
|
119
119
|
if (await (i.confirm === !0 ? new Promise((o) => {
|
|
120
120
|
a.confirm({
|
|
@@ -130,7 +130,7 @@ function He(e) {
|
|
|
130
130
|
}), !Y(o) && i.autoReload === !0 && n != null && n.emits && (n == null || n.emits("reload"));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
return s(
|
|
133
|
+
return s(B, null, [l.filter((i) => d(i.visiable, !0)).map((i) => s(M, {
|
|
134
134
|
onClick: () => m(i),
|
|
135
135
|
type: i.type || "text",
|
|
136
136
|
shape: i.shape,
|
|
@@ -144,7 +144,7 @@ function He(e) {
|
|
|
144
144
|
disableViewMode: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const Je = {
|
|
148
148
|
thousands: !0,
|
|
149
149
|
inputUnit: "元",
|
|
150
150
|
outputUnit: "元"
|
|
@@ -153,9 +153,9 @@ const Qe = {
|
|
|
153
153
|
元: 10 ** 2,
|
|
154
154
|
万: 10 ** 6
|
|
155
155
|
};
|
|
156
|
-
function
|
|
156
|
+
function Qe(e) {
|
|
157
157
|
e = {
|
|
158
|
-
...
|
|
158
|
+
...Je,
|
|
159
159
|
...e || {}
|
|
160
160
|
};
|
|
161
161
|
const t = (a) => {
|
|
@@ -271,7 +271,7 @@ function at(e) {
|
|
|
271
271
|
const t = rt(e), r = nt(e);
|
|
272
272
|
return g("dict", (n, a) => {
|
|
273
273
|
const l = v(n, a);
|
|
274
|
-
return r ? s(
|
|
274
|
+
return r ? s(ze, {
|
|
275
275
|
color: r === !0 ? void 0 : r
|
|
276
276
|
}, {
|
|
277
277
|
default: () => [t.get(l) || l]
|
|
@@ -279,7 +279,7 @@ function at(e) {
|
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
281
|
function lt(e) {
|
|
282
|
-
const t =
|
|
282
|
+
const t = z();
|
|
283
283
|
async function r(n, a) {
|
|
284
284
|
n.confirm && !await new Promise((d, m) => {
|
|
285
285
|
t.open("confirm", {
|
|
@@ -360,7 +360,7 @@ function dt(e) {
|
|
|
360
360
|
alt: "image",
|
|
361
361
|
style: i,
|
|
362
362
|
src: o
|
|
363
|
-
}, null)]) : s(
|
|
363
|
+
}, null)]) : s(B, null, null);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}
|
|
@@ -452,12 +452,12 @@ function vt() {
|
|
|
452
452
|
render: ot,
|
|
453
453
|
phone: st,
|
|
454
454
|
image: dt,
|
|
455
|
-
currency:
|
|
455
|
+
currency: Qe,
|
|
456
456
|
date: et,
|
|
457
457
|
button: He
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function I(e, t) {
|
|
461
461
|
if (!(e != null && e.render))
|
|
462
462
|
return;
|
|
463
463
|
const r = e.render({
|
|
@@ -518,7 +518,7 @@ function kt(e, t, r, u) {
|
|
|
518
518
|
const {
|
|
519
519
|
render: n,
|
|
520
520
|
disableColumnMode: a
|
|
521
|
-
} =
|
|
521
|
+
} = I(e, {
|
|
522
522
|
previewing: !1,
|
|
523
523
|
emits: u
|
|
524
524
|
}) || {};
|
|
@@ -542,7 +542,7 @@ function kt(e, t, r, u) {
|
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
544
|
function Ct() {
|
|
545
|
-
return new We();
|
|
545
|
+
return new We.Workbook();
|
|
546
546
|
}
|
|
547
547
|
function Tt(e, t = "Sheet1") {
|
|
548
548
|
return e.addWorksheet(t, {
|
|
@@ -578,7 +578,7 @@ function $t(e, t) {
|
|
|
578
578
|
const r = {};
|
|
579
579
|
return e.filter((n) => n.exportable !== !1).map((n) => ({
|
|
580
580
|
options: n,
|
|
581
|
-
render:
|
|
581
|
+
render: I(n),
|
|
582
582
|
content: typeof n.exportable == "object" ? n.exportable.content : void 0
|
|
583
583
|
})).forEach((n) => {
|
|
584
584
|
var d;
|
|
@@ -610,7 +610,7 @@ function Yt(e) {
|
|
|
610
610
|
return 30;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Et(e, t, r) {
|
|
614
614
|
const u = e.filter((a) => a.exportable !== !1).map((a) => {
|
|
615
615
|
var l, d;
|
|
616
616
|
return {
|
|
@@ -625,9 +625,9 @@ function zt(e, t, r) {
|
|
|
625
625
|
filename: r
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function qt() {
|
|
629
629
|
return {
|
|
630
|
-
exportExcel:
|
|
630
|
+
exportExcel: Et
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
633
|
class K {
|
|
@@ -673,7 +673,7 @@ class K {
|
|
|
673
673
|
return typeof t != "object" ? [] : (t instanceof K && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
const
|
|
676
|
+
const zt = 300;
|
|
677
677
|
function jt(e) {
|
|
678
678
|
const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
|
|
679
679
|
if (!r)
|
|
@@ -682,7 +682,7 @@ function jt(e) {
|
|
|
682
682
|
r.addEventListener("mousedown", () => {
|
|
683
683
|
console.log("mousedown"), u = setTimeout(() => {
|
|
684
684
|
u && (r.style.cursor = "grab", r.style.userSelect = "none", n = !0);
|
|
685
|
-
},
|
|
685
|
+
}, zt);
|
|
686
686
|
}), r.addEventListener("mouseup", () => {
|
|
687
687
|
clearTimeout(u), u && (u = void 0, n = !1, r.style.cursor = "", r.style.userSelect = "", a = void 0);
|
|
688
688
|
}), r.addEventListener("mousemove", (l) => {
|
|
@@ -698,7 +698,7 @@ function jt(e) {
|
|
|
698
698
|
function Lt(e) {
|
|
699
699
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Me(e);
|
|
700
700
|
}
|
|
701
|
-
const Pt = /* @__PURE__ */
|
|
701
|
+
const Pt = /* @__PURE__ */ q({
|
|
702
702
|
props: {
|
|
703
703
|
record: {
|
|
704
704
|
type: Object,
|
|
@@ -734,7 +734,7 @@ const Pt = /* @__PURE__ */ E({
|
|
|
734
734
|
setup(e) {
|
|
735
735
|
const t = A(), r = h(0), u = e.columns.filter((a) => typeof a.visiable == "boolean" ? a.visiable : typeof a.visiable == "function" ? a.visiable() : !0).map((a) => ({
|
|
736
736
|
options: a,
|
|
737
|
-
renderer:
|
|
737
|
+
renderer: I(a, {
|
|
738
738
|
previewing: !0
|
|
739
739
|
})
|
|
740
740
|
})).filter(({
|
|
@@ -752,7 +752,7 @@ const Pt = /* @__PURE__ */ E({
|
|
|
752
752
|
r.value = Math.floor(l.offsetWidth / e.minWidth);
|
|
753
753
|
}
|
|
754
754
|
}
|
|
755
|
-
return
|
|
755
|
+
return E(() => {
|
|
756
756
|
n();
|
|
757
757
|
}), () => {
|
|
758
758
|
let a;
|
|
@@ -783,7 +783,7 @@ function Dt(e, t, {
|
|
|
783
783
|
tableEvents: u
|
|
784
784
|
}) {
|
|
785
785
|
const n = e.refreshable || e.exportable || t.slots.actions, a = !!(r != null && r.length) && n;
|
|
786
|
-
return n || a ? () => s(
|
|
786
|
+
return n || a ? () => s(B, null, [a && s(Pe, {
|
|
787
787
|
margin: 0
|
|
788
788
|
}, null), n && s("div", {
|
|
789
789
|
class: "table-actions",
|
|
@@ -837,7 +837,7 @@ function At(e, t, {
|
|
|
837
837
|
}, e.formOptions), null)]) : () => {
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function Bt(e, t, {
|
|
841
841
|
tableSource: r
|
|
842
842
|
}) {
|
|
843
843
|
const u = h([]);
|
|
@@ -901,7 +901,7 @@ function It(e, t, {
|
|
|
901
901
|
reloadSelection: a
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function It(e) {
|
|
905
905
|
return Oe() ? (_e(e), !0) : !1;
|
|
906
906
|
}
|
|
907
907
|
function D(e) {
|
|
@@ -917,18 +917,18 @@ function Wt(e, t) {
|
|
|
917
917
|
return Number.isNaN(a) ? e : a + n;
|
|
918
918
|
}
|
|
919
919
|
const le = Kt ? window : void 0;
|
|
920
|
-
function
|
|
920
|
+
function Ft() {
|
|
921
921
|
const e = h(!1), t = A();
|
|
922
|
-
return t &&
|
|
922
|
+
return t && E(() => {
|
|
923
923
|
e.value = !0;
|
|
924
924
|
}, t), e;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
const t =
|
|
926
|
+
function Vt(e) {
|
|
927
|
+
const t = Ft();
|
|
928
928
|
return O(() => (t.value, !!e()));
|
|
929
929
|
}
|
|
930
930
|
function T(e, t = {}) {
|
|
931
|
-
const { window: r = le } = t, u =
|
|
931
|
+
const { window: r = le } = t, u = Vt(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
932
932
|
let n;
|
|
933
933
|
const a = h(!1), l = (i) => {
|
|
934
934
|
a.value = i.matches;
|
|
@@ -937,7 +937,7 @@ function T(e, t = {}) {
|
|
|
937
937
|
}, m = $e(() => {
|
|
938
938
|
u.value && (d(), n = r.matchMedia(D(e)), "addEventListener" in n ? n.addEventListener("change", l) : n.addListener(l), a.value = n.matches);
|
|
939
939
|
});
|
|
940
|
-
return
|
|
940
|
+
return It(() => {
|
|
941
941
|
m(), d(), n = void 0;
|
|
942
942
|
}), a;
|
|
943
943
|
}
|
|
@@ -1032,7 +1032,7 @@ function Ut(e, t, {
|
|
|
1032
1032
|
}, null)]) : () => {
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
|
-
const Gt = /* @__PURE__ */
|
|
1035
|
+
const Gt = /* @__PURE__ */ q({
|
|
1036
1036
|
props: {
|
|
1037
1037
|
collapsedColumns: {
|
|
1038
1038
|
type: Array,
|
|
@@ -1040,12 +1040,12 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1040
1040
|
}
|
|
1041
1041
|
},
|
|
1042
1042
|
setup(e) {
|
|
1043
|
-
const t =
|
|
1043
|
+
const t = z(), r = h(e.collapsedColumns.map((n) => ({
|
|
1044
1044
|
label: n.title,
|
|
1045
1045
|
value: n.key,
|
|
1046
1046
|
disabled: !1
|
|
1047
1047
|
}))), u = h(e.collapsedColumns.filter((n) => n.collapsed).map((n) => n.key));
|
|
1048
|
-
return
|
|
1048
|
+
return Ie(() => {
|
|
1049
1049
|
const n = e.collapsedColumns.map((a) => ({
|
|
1050
1050
|
key: a.key,
|
|
1051
1051
|
title: a.title,
|
|
@@ -1063,10 +1063,10 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1063
1063
|
justifyContent: "center"
|
|
1064
1064
|
}
|
|
1065
1065
|
}, {
|
|
1066
|
-
default: () => [Ye(s("template", null, null), [[
|
|
1066
|
+
default: () => [Ye(s("template", null, null), [[Ee("slot"), "source"]])]
|
|
1067
1067
|
})]);
|
|
1068
1068
|
}
|
|
1069
|
-
}), Ht = /* @__PURE__ */
|
|
1069
|
+
}), Ht = /* @__PURE__ */ q({
|
|
1070
1070
|
props: {
|
|
1071
1071
|
value: {
|
|
1072
1072
|
type: Object,
|
|
@@ -1082,7 +1082,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1082
1082
|
}
|
|
1083
1083
|
},
|
|
1084
1084
|
setup(e) {
|
|
1085
|
-
const t =
|
|
1085
|
+
const t = z();
|
|
1086
1086
|
function r(u) {
|
|
1087
1087
|
e.onSubmit && e.onSubmit(u), t.close(u);
|
|
1088
1088
|
}
|
|
@@ -1095,7 +1095,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1095
1095
|
onSubmit: r
|
|
1096
1096
|
}, null)]);
|
|
1097
1097
|
}
|
|
1098
|
-
}),
|
|
1098
|
+
}), Jt = /* @__PURE__ */ q({
|
|
1099
1099
|
props: {
|
|
1100
1100
|
// 数据主键
|
|
1101
1101
|
rowKey: {
|
|
@@ -1220,11 +1220,16 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1220
1220
|
type: Boolean,
|
|
1221
1221
|
default: !0,
|
|
1222
1222
|
required: !1
|
|
1223
|
+
},
|
|
1224
|
+
autoFill: {
|
|
1225
|
+
type: Boolean,
|
|
1226
|
+
default: !1,
|
|
1227
|
+
required: !1
|
|
1223
1228
|
}
|
|
1224
1229
|
},
|
|
1225
1230
|
expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
|
|
1226
1231
|
setup(e, t) {
|
|
1227
|
-
const r = Math.random().toString(32).slice(2).toUpperCase(), u = h(), n = h(), a = h(), l = h(), [d, m] =
|
|
1232
|
+
const r = Math.random().toString(32).slice(2).toUpperCase(), u = h(), n = h(), a = h(), l = h(), [d, m] = Ve(e.columns), i = h(!1), f = e.form ?? Ne(e.columns), o = _(), y = ue(), w = h(e.columns.map((c) => ({
|
|
1228
1233
|
key: c.key,
|
|
1229
1234
|
title: c.title,
|
|
1230
1235
|
collapsed: !!c.collapsed
|
|
@@ -1264,10 +1269,10 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1264
1269
|
function W(c) {
|
|
1265
1270
|
const {
|
|
1266
1271
|
exportExcel: b
|
|
1267
|
-
} =
|
|
1272
|
+
} = qt();
|
|
1268
1273
|
b((c == null ? void 0 : c.columns) || e.columns, (c == null ? void 0 : c.source) || d.value, (c == null ? void 0 : c.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
|
|
1269
1274
|
}
|
|
1270
|
-
function
|
|
1275
|
+
function F(c) {
|
|
1271
1276
|
let b;
|
|
1272
1277
|
switch (!0) {
|
|
1273
1278
|
case !!(c != null && c.key):
|
|
@@ -1287,7 +1292,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1287
1292
|
mode: (c == null ? void 0 : c.mode) || "dialog"
|
|
1288
1293
|
});
|
|
1289
1294
|
}
|
|
1290
|
-
function
|
|
1295
|
+
function V(c) {
|
|
1291
1296
|
let b;
|
|
1292
1297
|
switch (!0) {
|
|
1293
1298
|
case !!(c != null && c.key):
|
|
@@ -1311,15 +1316,15 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1311
1316
|
});
|
|
1312
1317
|
}
|
|
1313
1318
|
function L(c) {
|
|
1314
|
-
var H,
|
|
1319
|
+
var H, J;
|
|
1315
1320
|
if (!e.dataLoad)
|
|
1316
1321
|
return;
|
|
1317
1322
|
c != null && c.reset && (o && o.reset(), y && y.reset(), (H = u.value) == null || H.resetSorters());
|
|
1318
1323
|
const b = {
|
|
1319
|
-
...((
|
|
1324
|
+
...((J = n.value) == null ? void 0 : J.formSource) || {}
|
|
1320
1325
|
};
|
|
1321
|
-
Object.keys(b).forEach((
|
|
1322
|
-
[null, void 0, ""].includes(b[
|
|
1326
|
+
Object.keys(b).forEach((Q) => {
|
|
1327
|
+
[null, void 0, ""].includes(b[Q]) && delete b[Q];
|
|
1323
1328
|
});
|
|
1324
1329
|
const k = e.dataLoad({
|
|
1325
1330
|
form: b,
|
|
@@ -1353,9 +1358,9 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1353
1358
|
}
|
|
1354
1359
|
}, C = Ue({
|
|
1355
1360
|
reload: L,
|
|
1356
|
-
preview:
|
|
1361
|
+
preview: F,
|
|
1357
1362
|
export: W,
|
|
1358
|
-
edit:
|
|
1363
|
+
edit: V,
|
|
1359
1364
|
collapse: de
|
|
1360
1365
|
});
|
|
1361
1366
|
function ie(c, b) {
|
|
@@ -1382,7 +1387,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1382
1387
|
onSelectAll: be,
|
|
1383
1388
|
reloadSelection: ye,
|
|
1384
1389
|
resetSelection: he
|
|
1385
|
-
} =
|
|
1390
|
+
} = Bt(e, t, R), ge = O(() => ({
|
|
1386
1391
|
rowKey: e.rowKey,
|
|
1387
1392
|
size: e.size,
|
|
1388
1393
|
bordered: e.bordered,
|
|
@@ -1411,7 +1416,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1411
1416
|
events: C
|
|
1412
1417
|
});
|
|
1413
1418
|
}
|
|
1414
|
-
return
|
|
1419
|
+
return E(() => {
|
|
1415
1420
|
l.value && (l.value.id = `table-${r}`), e.autoLoad && L(), e.grabbable && l.value && jt(l.value);
|
|
1416
1421
|
}), {
|
|
1417
1422
|
tableId: r,
|
|
@@ -1424,14 +1429,14 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1424
1429
|
tableLoading: i,
|
|
1425
1430
|
modalInstance: a,
|
|
1426
1431
|
tableRenderElement: l,
|
|
1427
|
-
formSource:
|
|
1432
|
+
formSource: qe(O(() => {
|
|
1428
1433
|
var c;
|
|
1429
1434
|
return (c = n == null ? void 0 : n.value) == null ? void 0 : c.formSource;
|
|
1430
1435
|
})),
|
|
1431
1436
|
formInstance: n,
|
|
1432
1437
|
reload: L,
|
|
1433
|
-
preview:
|
|
1434
|
-
edit:
|
|
1438
|
+
preview: F,
|
|
1439
|
+
edit: V,
|
|
1435
1440
|
export: W,
|
|
1436
1441
|
onSorterChange: ie,
|
|
1437
1442
|
onTableChange: ce,
|
|
@@ -1455,7 +1460,9 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1455
1460
|
this.reloadColumns();
|
|
1456
1461
|
const e = () => s("div", {
|
|
1457
1462
|
class: "table-body"
|
|
1458
|
-
}, [s(
|
|
1463
|
+
}, [s("div", {
|
|
1464
|
+
class: "table-body-wrapper"
|
|
1465
|
+
}, [s(Be, ne({
|
|
1459
1466
|
loading: this.tableLoading,
|
|
1460
1467
|
data: this.tableSource,
|
|
1461
1468
|
columns: this.tableColumns,
|
|
@@ -1467,9 +1474,12 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1467
1474
|
onSorterChange: this.onSorterChange,
|
|
1468
1475
|
selectedKeys: this.tableSelection.selectedRowKeys.value,
|
|
1469
1476
|
"onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
|
|
1470
|
-
}, this.tableOptions), null)]);
|
|
1477
|
+
}, this.tableOptions), null)])]);
|
|
1471
1478
|
return s("div", {
|
|
1472
|
-
class:
|
|
1479
|
+
class: {
|
|
1480
|
+
"table-render": !0,
|
|
1481
|
+
"auto-fill": this.autoFill
|
|
1482
|
+
},
|
|
1473
1483
|
ref: (t) => this.tableRenderElement = t
|
|
1474
1484
|
}, [s(Ke, {
|
|
1475
1485
|
ref: (t) => this.modalInstance = t
|
|
@@ -1480,23 +1490,23 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1480
1490
|
})]);
|
|
1481
1491
|
}
|
|
1482
1492
|
});
|
|
1483
|
-
function
|
|
1493
|
+
function nr(e) {
|
|
1484
1494
|
return e;
|
|
1485
1495
|
}
|
|
1486
|
-
function
|
|
1496
|
+
function ar(e) {
|
|
1487
1497
|
return e;
|
|
1488
1498
|
}
|
|
1489
|
-
const
|
|
1499
|
+
const lr = {
|
|
1490
1500
|
install(e, t) {
|
|
1491
|
-
e.component("TableRender",
|
|
1501
|
+
e.component("TableRender", Jt);
|
|
1492
1502
|
}
|
|
1493
1503
|
};
|
|
1494
1504
|
export {
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1505
|
+
Jt as TableRender,
|
|
1506
|
+
cr as TableRenderResolver,
|
|
1507
|
+
lr as default,
|
|
1508
|
+
nr as defineColumns,
|
|
1509
|
+
ar as defineTableLoad,
|
|
1500
1510
|
Ue as useEvents,
|
|
1501
|
-
|
|
1511
|
+
rr as useTable
|
|
1502
1512
|
};
|
|
@@ -141,6 +141,11 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
141
141
|
default: boolean;
|
|
142
142
|
required: false;
|
|
143
143
|
};
|
|
144
|
+
autoFill: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
required: false;
|
|
148
|
+
};
|
|
144
149
|
}, {
|
|
145
150
|
tableId: string;
|
|
146
151
|
tableInstance: Ref<import('vue').CreateComponentPublicInstance<Readonly<{
|
|
@@ -1689,6 +1694,11 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
1689
1694
|
default: boolean;
|
|
1690
1695
|
required: false;
|
|
1691
1696
|
};
|
|
1697
|
+
autoFill: {
|
|
1698
|
+
type: BooleanConstructor;
|
|
1699
|
+
default: boolean;
|
|
1700
|
+
required: false;
|
|
1701
|
+
};
|
|
1692
1702
|
}>>, {
|
|
1693
1703
|
autoLoad: boolean;
|
|
1694
1704
|
size: "mini" | "small" | "medium" | "large";
|
|
@@ -1708,6 +1718,7 @@ export declare const TableRender: import('vue').DefineComponent<{
|
|
|
1708
1718
|
stripe: boolean;
|
|
1709
1719
|
columnsGroups: ColumnsGroup[];
|
|
1710
1720
|
grabbable: boolean;
|
|
1721
|
+
autoFill: boolean;
|
|
1711
1722
|
}, {}>;
|
|
1712
1723
|
export type TableRenderInstance = InstanceType<typeof TableRender>;
|
|
1713
1724
|
export type TableRenderProps = TableRenderInstance['$props'];
|