@gopowerteam/table-render 0.0.149 → 0.0.151
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/config/provide.config.d.ts +1 -1
- package/dist/cjs/hooks/use-events.d.ts +1 -1
- package/dist/cjs/hooks/use-table.d.ts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/interfaces/table-column-options.d.ts +3 -3
- package/dist/cjs/interfaces/table-column-render.d.ts +2 -2
- package/dist/cjs/interfaces/table-load-params.d.ts +2 -2
- package/dist/cjs/table-columns/currency/index.d.ts +1 -1
- package/dist/cjs/table-columns/date/index.d.ts +1 -1
- package/dist/cjs/table-columns/dict/index.d.ts +1 -1
- package/dist/cjs/table-columns/dropdown/index.d.ts +2 -2
- package/dist/cjs/table-columns/index.d.ts +3 -3
- package/dist/cjs/table-columns/phone/index.d.ts +2 -1
- package/dist/cjs/table-columns/render/index.d.ts +1 -1
- package/dist/cjs/table-columns/tag/index.d.ts +1 -1
- package/dist/cjs/table-columns/text/index.d.ts +1 -1
- package/dist/cjs/table-render/index.d.ts +53 -1155
- package/dist/cjs/table-render/table-column-render.d.ts +4 -4
- package/dist/cjs/table-render/table-edit-render.d.ts +1 -1
- package/dist/cjs/table-render/table-selection-render.d.ts +2 -2
- package/dist/cjs/table-render/table-view-render.d.ts +5 -5
- package/dist/cjs/utils/create-table-form.d.ts +1 -1
- package/dist/cjs/utils/create-table-source.d.ts +1 -1
- package/dist/cjs/utils/page.service.d.ts +1 -1
- package/dist/cjs/utils/sort.service.d.ts +1 -1
- package/dist/es/config/provide.config.d.ts +1 -1
- package/dist/es/hooks/use-events.d.ts +1 -1
- package/dist/es/hooks/use-table.d.ts +1 -1
- package/dist/es/index.mjs +749 -601
- package/dist/es/interfaces/table-column-options.d.ts +3 -3
- package/dist/es/interfaces/table-column-render.d.ts +2 -2
- package/dist/es/interfaces/table-load-params.d.ts +2 -2
- package/dist/es/table-columns/currency/index.d.ts +1 -1
- package/dist/es/table-columns/date/index.d.ts +1 -1
- package/dist/es/table-columns/dict/index.d.ts +1 -1
- package/dist/es/table-columns/dropdown/index.d.ts +2 -2
- package/dist/es/table-columns/index.d.ts +3 -3
- package/dist/es/table-columns/phone/index.d.ts +2 -1
- package/dist/es/table-columns/render/index.d.ts +1 -1
- package/dist/es/table-columns/tag/index.d.ts +1 -1
- package/dist/es/table-columns/text/index.d.ts +1 -1
- package/dist/es/table-render/index.d.ts +53 -1155
- package/dist/es/table-render/table-column-render.d.ts +4 -4
- package/dist/es/table-render/table-edit-render.d.ts +1 -1
- package/dist/es/table-render/table-selection-render.d.ts +2 -2
- package/dist/es/table-render/table-view-render.d.ts +5 -5
- package/dist/es/utils/create-table-form.d.ts +1 -1
- package/dist/es/utils/create-table-source.d.ts +1 -1
- package/dist/es/utils/page.service.d.ts +1 -1
- package/dist/es/utils/sort.service.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/es/index.mjs
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as h, getCurrentInstance as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { useModal as
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import { FormRender as
|
|
10
|
-
import { TableRenderResolver as
|
|
11
|
-
function
|
|
12
|
-
const [u, ...
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
function
|
|
16
|
-
const t = h([]), r = (
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
}), l)) :
|
|
1
|
+
var Oe = Object.defineProperty;
|
|
2
|
+
var Re = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var M = (e, t, r) => (Re(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { ref as h, getCurrentInstance as K, onMounted as L, onUpdated as Ee, reactive as $e, createVNode as o, Fragment as V, createTextVNode as z, getCurrentScope as qe, onScopeDispose as je, unref as Ye, readonly as fe, computed as R, watchEffect as ze, watch as Pe, h as Le, render as Ae, defineComponent as A, isVNode as De, mergeProps as se, nextTick as re, withDirectives as Be, resolveDirective as Ie } from "vue";
|
|
5
|
+
import { Button as j, Tag as We, Dropdown as ne, Message as Ke, Descriptions as Ve, DescriptionsItem as Fe, Divider as Ne, Space as ae, Pagination as Ue, Transfer as He, Table as Ge } from "@arco-design/web-vue";
|
|
6
|
+
import { useModal as D, onSubmit as Je, ModalProvider as Qe } from "@gopowerteam/modal-render";
|
|
7
|
+
import * as Xe from "exceljs";
|
|
8
|
+
import B from "dayjs";
|
|
9
|
+
import { FormRender as oe } from "@gopowerteam/form-render";
|
|
10
|
+
import { TableRenderResolver as xr } from "./resolver.mjs";
|
|
11
|
+
function Ze(e, t, r) {
|
|
12
|
+
const [u, ...a] = t.index ? t.index.split(".").reverse() : [t.key], n = a.reverse().reduce((l, c) => l == null ? void 0 : l[c], e);
|
|
13
|
+
n[u] = r;
|
|
14
|
+
}
|
|
15
|
+
function pe(e) {
|
|
16
|
+
const t = h([]), r = (a) => {
|
|
17
|
+
const n = e.filter((l) => l.formatter);
|
|
18
|
+
return n.length > 0 ? a.map((l) => (n.forEach((c) => {
|
|
19
|
+
c.formatter && Ze(l, c, c.formatter(l));
|
|
20
|
+
}), l)) : a;
|
|
21
21
|
};
|
|
22
|
-
return [t, (
|
|
23
|
-
t.value = r(
|
|
22
|
+
return [t, (a) => {
|
|
23
|
+
t.value = r(a);
|
|
24
24
|
}];
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function et(e) {
|
|
27
27
|
return e.filter((t) => t.form).map((t) => ({
|
|
28
28
|
key: t.key,
|
|
29
29
|
title: t.title,
|
|
30
30
|
...typeof t.form == "boolean" ? {} : t.form
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const t =
|
|
33
|
+
function yr(e) {
|
|
34
|
+
const t = K(), r = h();
|
|
35
35
|
function u() {
|
|
36
|
-
var
|
|
37
|
-
const
|
|
38
|
-
|
|
36
|
+
var n, l;
|
|
37
|
+
const a = (l = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : l[e];
|
|
38
|
+
a && (r.value = a);
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return L(u), Ee(u), r;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function tt(e) {
|
|
43
43
|
return (t, r) => e[t](r);
|
|
44
44
|
}
|
|
45
|
-
class
|
|
45
|
+
class W {
|
|
46
46
|
/**
|
|
47
47
|
* 构造函数
|
|
48
48
|
* @param index
|
|
49
49
|
* @param size
|
|
50
50
|
*/
|
|
51
51
|
constructor(t = 1, r = 10) {
|
|
52
|
-
|
|
52
|
+
M(this, "data", $e({
|
|
53
53
|
index: 1,
|
|
54
54
|
size: 10,
|
|
55
55
|
total: 0
|
|
56
56
|
}));
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
M(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
|
|
58
|
+
M(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
|
|
59
59
|
this.pageIndex = t, this.pageSize = r;
|
|
60
60
|
}
|
|
61
61
|
get pageIndex() {
|
|
@@ -102,108 +102,108 @@ class P {
|
|
|
102
102
|
this.total = (r = t.data) == null ? void 0 : r.totalElements;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
105
|
+
const rt = Symbol.for("RenderColumnType");
|
|
106
|
+
function x(e, t, r) {
|
|
107
107
|
return t.$type = e, t.$disableColumnMode = r == null ? void 0 : r.disableColumnMode, t.$disableViewMode = r == null ? void 0 : r.disableViewMode, t;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function C(e, t) {
|
|
110
110
|
return t.index ? t.index.split(".").reduce((r, u) => r == null ? void 0 : r[u], e) : [t.key].reduce((r, u) => r == null ? void 0 : r[u], e);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function P(e) {
|
|
113
113
|
return !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
return
|
|
117
|
-
const
|
|
118
|
-
async function m(
|
|
119
|
-
if (await (
|
|
120
|
-
|
|
115
|
+
function nt(e) {
|
|
116
|
+
return x("button", (r, u, a) => {
|
|
117
|
+
const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (f, i) => typeof f == "function" ? f(r) : f === void 0 ? i : f;
|
|
118
|
+
async function m(f) {
|
|
119
|
+
if (await (f.confirm === !0 ? new Promise((s) => {
|
|
120
|
+
n.confirm({
|
|
121
121
|
title: "提示信息",
|
|
122
|
-
content:
|
|
123
|
-
onOk: () =>
|
|
124
|
-
onCancel: () =>
|
|
122
|
+
content: f.confirmText ?? "您确定要执行该操作?",
|
|
123
|
+
onOk: () => s(!0),
|
|
124
|
+
onCancel: () => s(!1)
|
|
125
125
|
});
|
|
126
|
-
}) : Promise.resolve(!0)) && (
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}), !
|
|
126
|
+
}) : Promise.resolve(!0)) && (f != null && f.onClick)) {
|
|
127
|
+
const s = f.onClick(r);
|
|
128
|
+
P(s) && f.autoReload !== !1 && s.then(() => {
|
|
129
|
+
a != null && a.emits && (a == null || a.emits("reload"));
|
|
130
|
+
}), !P(s) && f.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
return
|
|
134
|
-
onClick: () => m(
|
|
135
|
-
type:
|
|
136
|
-
shape:
|
|
133
|
+
return o(V, null, [l.filter((f) => c(f.visiable, !0)).map((f) => o(j, {
|
|
134
|
+
onClick: () => m(f),
|
|
135
|
+
type: f.type || "text",
|
|
136
|
+
shape: f.shape,
|
|
137
137
|
size: "mini",
|
|
138
|
-
disabled:
|
|
138
|
+
disabled: c(f.disabled, !1)
|
|
139
139
|
}, {
|
|
140
|
-
icon:
|
|
141
|
-
default: () => (typeof
|
|
140
|
+
icon: f.icon,
|
|
141
|
+
default: () => (typeof f.content == "function" ? f.content(r) : f.content) || ""
|
|
142
142
|
}))]);
|
|
143
143
|
}, {
|
|
144
144
|
disableViewMode: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const at = {
|
|
148
148
|
thousands: !0,
|
|
149
149
|
inputUnit: "元",
|
|
150
150
|
outputUnit: "元"
|
|
151
|
-
},
|
|
151
|
+
}, le = {
|
|
152
152
|
分: 10 ** 0,
|
|
153
153
|
元: 10 ** 2,
|
|
154
154
|
万: 10 ** 6
|
|
155
155
|
};
|
|
156
|
-
function
|
|
156
|
+
function lt(e) {
|
|
157
157
|
e = {
|
|
158
|
-
...
|
|
158
|
+
...at,
|
|
159
159
|
...e || {}
|
|
160
160
|
};
|
|
161
|
-
const t = (
|
|
162
|
-
if (
|
|
161
|
+
const t = (n) => {
|
|
162
|
+
if (n == null)
|
|
163
163
|
return;
|
|
164
164
|
if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
|
|
165
|
-
return
|
|
166
|
-
const l =
|
|
167
|
-
return (e == null ? void 0 : e.precision) === void 0 ?
|
|
168
|
-
}, r = (
|
|
169
|
-
if (
|
|
165
|
+
return n;
|
|
166
|
+
const l = le[e.inputUnit] / le[e.outputUnit], c = parseFloat((n * l).toFixed(10));
|
|
167
|
+
return (e == null ? void 0 : e.precision) === void 0 ? c : c.toFixed(e == null ? void 0 : e.precision);
|
|
168
|
+
}, r = (n) => {
|
|
169
|
+
if (n == null)
|
|
170
170
|
return;
|
|
171
|
-
const l =
|
|
171
|
+
const l = n.toString().split(".");
|
|
172
172
|
return l[0] = l[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), l.join(".");
|
|
173
|
-
}, u = (
|
|
174
|
-
if ((e == null ? void 0 : e.zeroString) !== void 0 && Number(
|
|
173
|
+
}, u = (n) => {
|
|
174
|
+
if ((e == null ? void 0 : e.zeroString) !== void 0 && Number(n) === 0)
|
|
175
175
|
return e == null ? void 0 : e.zeroString;
|
|
176
|
-
if ((e == null ? void 0 : e.nullString) !== void 0 && isNaN(Number(
|
|
176
|
+
if ((e == null ? void 0 : e.nullString) !== void 0 && isNaN(Number(n)))
|
|
177
177
|
return e == null ? void 0 : e.nullString;
|
|
178
|
-
const l = t(Number(
|
|
178
|
+
const l = t(Number(n));
|
|
179
179
|
return e != null && e.thousands ? r(l) : l;
|
|
180
180
|
};
|
|
181
|
-
return
|
|
182
|
-
const
|
|
183
|
-
return
|
|
181
|
+
return x("dict", (n, l) => {
|
|
182
|
+
const c = C(n, l);
|
|
183
|
+
return o("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? o("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? o("span", null, [e.prefix()]) : void 0, o("span", {
|
|
184
184
|
class: "currency_value"
|
|
185
|
-
}, [u(
|
|
185
|
+
}, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ? o("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? o("span", null, [e.suffix()]) : void 0]);
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
|
|
189
189
|
(function(e, t) {
|
|
190
190
|
(function(r, u) {
|
|
191
|
-
e.exports = u(
|
|
192
|
-
})(
|
|
191
|
+
e.exports = u(B);
|
|
192
|
+
})(ut, function(r) {
|
|
193
193
|
function u(l) {
|
|
194
194
|
return l && typeof l == "object" && "default" in l ? l : {
|
|
195
195
|
default: l
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
var
|
|
198
|
+
var a = u(r), n = {
|
|
199
199
|
name: "zh-cn",
|
|
200
200
|
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
|
|
201
201
|
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
|
|
202
202
|
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
|
|
203
203
|
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
|
|
204
204
|
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
|
|
205
|
-
ordinal: function(l,
|
|
206
|
-
return
|
|
205
|
+
ordinal: function(l, c) {
|
|
206
|
+
return c === "W" ? l + "周" : l + "日";
|
|
207
207
|
},
|
|
208
208
|
weekStart: 1,
|
|
209
209
|
yearStart: 4,
|
|
@@ -234,121 +234,121 @@ var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
234
234
|
y: "1 年",
|
|
235
235
|
yy: "%d 年"
|
|
236
236
|
},
|
|
237
|
-
meridiem: function(l,
|
|
238
|
-
var m = 100 * l +
|
|
237
|
+
meridiem: function(l, c) {
|
|
238
|
+
var m = 100 * l + c;
|
|
239
239
|
return m < 600 ? "凌晨" : m < 900 ? "早上" : m < 1100 ? "上午" : m < 1300 ? "中午" : m < 1800 ? "下午" : "晚上";
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
|
-
return
|
|
242
|
+
return a.default.locale(n, null, !0), n;
|
|
243
243
|
});
|
|
244
|
-
})(
|
|
245
|
-
|
|
246
|
-
const
|
|
244
|
+
})(ct);
|
|
245
|
+
B.locale("zh-cn");
|
|
246
|
+
const dt = {
|
|
247
247
|
date: "YYYY-MM-DD",
|
|
248
248
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
249
249
|
time: "HH:mm:ss",
|
|
250
250
|
week: "ddd"
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
return
|
|
254
|
-
const
|
|
255
|
-
return
|
|
252
|
+
function it(e) {
|
|
253
|
+
return x("date", (r, u) => {
|
|
254
|
+
const a = C(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : dt[(e == null ? void 0 : e.format) || "datetime"], l = B(a);
|
|
255
|
+
return o("span", null, [l.isValid() && l.format(n)]);
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
|
-
const
|
|
258
|
+
const ft = {
|
|
259
259
|
success: "arcoblue",
|
|
260
260
|
warning: "orange",
|
|
261
261
|
error: "red"
|
|
262
262
|
};
|
|
263
|
-
function
|
|
263
|
+
function st(e) {
|
|
264
264
|
return e instanceof Map ? e : e.dict;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function ot(e) {
|
|
267
267
|
const t = e instanceof Map ? !1 : e.tag;
|
|
268
|
-
return typeof t == "string" ?
|
|
268
|
+
return typeof t == "string" ? ft[t] : t;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
const t =
|
|
272
|
-
return
|
|
273
|
-
const l =
|
|
274
|
-
return r ?
|
|
270
|
+
function mt(e) {
|
|
271
|
+
const t = st(e), r = ot(e);
|
|
272
|
+
return x("dict", (a, n) => {
|
|
273
|
+
const l = C(a, n);
|
|
274
|
+
return r ? o(We, {
|
|
275
275
|
color: r === !0 ? void 0 : r
|
|
276
276
|
}, {
|
|
277
277
|
default: () => [t.get(l) || l]
|
|
278
|
-
}) :
|
|
278
|
+
}) : o("span", null, [t.get(l) || l]);
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
const t =
|
|
283
|
-
async function r(
|
|
284
|
-
|
|
281
|
+
function yt(e) {
|
|
282
|
+
const t = D();
|
|
283
|
+
async function r(a, n) {
|
|
284
|
+
a.confirm && !await new Promise((c, m) => {
|
|
285
285
|
t.open("confirm", {
|
|
286
286
|
title: "确认",
|
|
287
|
-
content:
|
|
288
|
-
onOk: () =>
|
|
289
|
-
onCancel: () =>
|
|
287
|
+
content: a.confirmText || "是否确认执行该操作?",
|
|
288
|
+
onOk: () => c(!0),
|
|
289
|
+
onCancel: () => c(!1)
|
|
290
290
|
});
|
|
291
|
-
}) ||
|
|
291
|
+
}) || a.onClick(n);
|
|
292
292
|
}
|
|
293
|
-
return
|
|
294
|
-
const l = e.options.filter((
|
|
295
|
-
return
|
|
293
|
+
return x("dropdown", (a, n) => {
|
|
294
|
+
const l = e.options.filter((c) => typeof c.visiable == "function" ? c.visiable(a) : c.visiable !== !1);
|
|
295
|
+
return o(ne, {
|
|
296
296
|
trigger: (e == null ? void 0 : e.trigger) || "click"
|
|
297
297
|
}, {
|
|
298
|
-
default: () =>
|
|
298
|
+
default: () => o(j, {
|
|
299
299
|
disabled: l.length === 0,
|
|
300
300
|
type: "text"
|
|
301
301
|
}, {
|
|
302
302
|
default: () => [(e == null ? void 0 : e.content) || "操作"]
|
|
303
303
|
}),
|
|
304
|
-
content: () => l.map((
|
|
305
|
-
onClick: () => r(
|
|
304
|
+
content: () => l.map((c) => o(ne.Option, {
|
|
305
|
+
onClick: () => r(c, a)
|
|
306
306
|
}, {
|
|
307
|
-
default: () => [typeof
|
|
307
|
+
default: () => [typeof c.content == "function" ? c.content(a) : c.content]
|
|
308
308
|
}))
|
|
309
309
|
});
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const bt = {
|
|
313
313
|
size: 30
|
|
314
314
|
};
|
|
315
|
-
function
|
|
315
|
+
function ht(e) {
|
|
316
316
|
e = {
|
|
317
|
-
...
|
|
317
|
+
...bt,
|
|
318
318
|
...e || {}
|
|
319
319
|
};
|
|
320
|
-
function t(
|
|
321
|
-
var
|
|
322
|
-
const l = (
|
|
320
|
+
function t(a, n) {
|
|
321
|
+
var c;
|
|
322
|
+
const l = (c = document.getElementById(a)) == null ? void 0 : c.getBoundingClientRect();
|
|
323
323
|
if (l) {
|
|
324
324
|
const m = new Image(100, 100);
|
|
325
|
-
m.id = `IMAGE_${
|
|
325
|
+
m.id = `IMAGE_${a}_PREVIEW`, m.src = n, m.setAttribute("style", ["position:fixed;", `top:${l.top}px;`, `left:${l.left + l.width}px;`, "min-width:400px;", "height:auto;", "z-index:100;"].join("")), document.body.appendChild(m);
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function r(
|
|
329
|
-
const
|
|
330
|
-
|
|
328
|
+
function r(a) {
|
|
329
|
+
const n = document.getElementById(`IMAGE_${a}_PREVIEW`);
|
|
330
|
+
n == null || n.remove();
|
|
331
331
|
}
|
|
332
|
-
return
|
|
333
|
-
const
|
|
332
|
+
return x("image", (a, n, l) => {
|
|
333
|
+
const c = C(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), f = {
|
|
334
334
|
maxWidth: "100%",
|
|
335
335
|
maxHeight: "100%",
|
|
336
336
|
borderRadius: e == null ? void 0 : e.radius,
|
|
337
337
|
objectFit: "contain",
|
|
338
338
|
transform: `rotate(${(e == null ? void 0 : e.rotate) || 0}deg)`,
|
|
339
339
|
cursor: e != null && e.preview ? "pointer" : "unset"
|
|
340
|
-
},
|
|
340
|
+
}, i = `${n.index || n.key}_parsed`;
|
|
341
341
|
if (e != null && e.parse) {
|
|
342
|
-
const
|
|
343
|
-
|
|
342
|
+
const s = e == null ? void 0 : e.parse(c, a);
|
|
343
|
+
P(s) ? s.then((y) => a[i] = y ?? "") : a[i] = s ?? "";
|
|
344
344
|
}
|
|
345
|
-
if (e != null && e.parse && !
|
|
346
|
-
return
|
|
345
|
+
if (e != null && e.parse && !a[i] === void 0)
|
|
346
|
+
return o("div", null, [z("Loading...")]);
|
|
347
347
|
{
|
|
348
|
-
const
|
|
349
|
-
return
|
|
348
|
+
const s = a[i] || c;
|
|
349
|
+
return s ? o("div", {
|
|
350
350
|
id: m,
|
|
351
|
-
onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m,
|
|
351
|
+
onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, s),
|
|
352
352
|
onMouseleave: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && r(m),
|
|
353
353
|
style: {
|
|
354
354
|
display: "flex",
|
|
@@ -356,46 +356,286 @@ function dt(e) {
|
|
|
356
356
|
alignItems: "center",
|
|
357
357
|
height: `${e == null ? void 0 : e.size}px`
|
|
358
358
|
}
|
|
359
|
-
}, [
|
|
359
|
+
}, [o("img", {
|
|
360
360
|
alt: "image",
|
|
361
|
-
style:
|
|
362
|
-
src:
|
|
363
|
-
}, null)]) :
|
|
361
|
+
style: f,
|
|
362
|
+
src: s
|
|
363
|
+
}, null)]) : o(V, null, null);
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
function F(e) {
|
|
368
|
+
return qe() ? (je(e), !0) : !1;
|
|
369
|
+
}
|
|
370
|
+
function _(e) {
|
|
371
|
+
return typeof e == "function" ? e() : Ye(e);
|
|
372
|
+
}
|
|
373
|
+
const N = typeof window < "u" && typeof document < "u";
|
|
374
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
375
|
+
const gt = Object.prototype.toString, wt = (e) => gt.call(e) === "[object Object]", vt = () => {
|
|
376
|
+
};
|
|
377
|
+
function xt(e) {
|
|
378
|
+
let t;
|
|
379
|
+
function r() {
|
|
380
|
+
return t || (t = e()), t;
|
|
381
|
+
}
|
|
382
|
+
return r.reset = async () => {
|
|
383
|
+
const u = t;
|
|
384
|
+
t = void 0, u && await u;
|
|
385
|
+
}, r;
|
|
386
|
+
}
|
|
387
|
+
function St(e, t) {
|
|
388
|
+
var r;
|
|
389
|
+
if (typeof e == "number")
|
|
390
|
+
return e + t;
|
|
391
|
+
const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
|
|
392
|
+
return Number.isNaN(n) ? e : n + a;
|
|
393
|
+
}
|
|
394
|
+
function Ct(e, t, r = {}) {
|
|
395
|
+
const {
|
|
396
|
+
immediate: u = !0
|
|
397
|
+
} = r, a = h(!1);
|
|
398
|
+
let n = null;
|
|
399
|
+
function l() {
|
|
400
|
+
n && (clearTimeout(n), n = null);
|
|
401
|
+
}
|
|
402
|
+
function c() {
|
|
403
|
+
a.value = !1, l();
|
|
404
|
+
}
|
|
405
|
+
function m(...f) {
|
|
406
|
+
l(), a.value = !0, n = setTimeout(() => {
|
|
407
|
+
a.value = !1, n = null, e(...f);
|
|
408
|
+
}, _(t));
|
|
409
|
+
}
|
|
410
|
+
return u && (a.value = !0, N && m()), F(c), {
|
|
411
|
+
isPending: fe(a),
|
|
412
|
+
start: m,
|
|
413
|
+
stop: c
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function kt(e) {
|
|
417
|
+
var t;
|
|
418
|
+
const r = _(e);
|
|
419
|
+
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
420
|
+
}
|
|
421
|
+
const U = N ? window : void 0, me = N ? window.navigator : void 0;
|
|
422
|
+
function ye(...e) {
|
|
423
|
+
let t, r, u, a;
|
|
424
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = U) : [t, r, u, a] = e, !t)
|
|
425
|
+
return vt;
|
|
426
|
+
Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
|
|
427
|
+
const n = [], l = () => {
|
|
428
|
+
n.forEach((i) => i()), n.length = 0;
|
|
429
|
+
}, c = (i, s, y, w) => (i.addEventListener(s, y, w), () => i.removeEventListener(s, y, w)), m = Pe(
|
|
430
|
+
() => [kt(t), _(a)],
|
|
431
|
+
([i, s]) => {
|
|
432
|
+
if (l(), !i)
|
|
433
|
+
return;
|
|
434
|
+
const y = wt(s) ? { ...s } : s;
|
|
435
|
+
n.push(
|
|
436
|
+
...r.flatMap((w) => u.map((k) => c(i, w, k, y)))
|
|
437
|
+
);
|
|
438
|
+
},
|
|
439
|
+
{ immediate: !0, flush: "post" }
|
|
440
|
+
), f = () => {
|
|
441
|
+
m(), l();
|
|
442
|
+
};
|
|
443
|
+
return F(f), f;
|
|
444
|
+
}
|
|
445
|
+
function Tt() {
|
|
446
|
+
const e = h(!1), t = K();
|
|
447
|
+
return t && L(() => {
|
|
448
|
+
e.value = !0;
|
|
449
|
+
}, t), e;
|
|
450
|
+
}
|
|
451
|
+
function H(e) {
|
|
452
|
+
const t = Tt();
|
|
453
|
+
return R(() => (t.value, !!e()));
|
|
454
|
+
}
|
|
455
|
+
function q(e, t = {}) {
|
|
456
|
+
const { window: r = U } = t, u = H(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
457
|
+
let a;
|
|
458
|
+
const n = h(!1), l = (f) => {
|
|
459
|
+
n.value = f.matches;
|
|
460
|
+
}, c = () => {
|
|
461
|
+
a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
|
|
462
|
+
}, m = ze(() => {
|
|
463
|
+
u.value && (c(), a = r.matchMedia(_(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
|
|
464
|
+
});
|
|
465
|
+
return F(() => {
|
|
466
|
+
m(), c(), a = void 0;
|
|
467
|
+
}), n;
|
|
468
|
+
}
|
|
469
|
+
function Mt(e, t = {}) {
|
|
470
|
+
function r(i, s) {
|
|
471
|
+
let y = _(e[_(i)]);
|
|
472
|
+
return s != null && (y = St(y, s)), typeof y == "number" && (y = `${y}px`), y;
|
|
473
|
+
}
|
|
474
|
+
const { window: u = U, strategy: a = "min-width" } = t;
|
|
475
|
+
function n(i) {
|
|
476
|
+
return u ? u.matchMedia(i).matches : !1;
|
|
477
|
+
}
|
|
478
|
+
const l = (i) => q(() => `(min-width: ${r(i)})`, t), c = (i) => q(() => `(max-width: ${r(i)})`, t), m = Object.keys(e).reduce((i, s) => (Object.defineProperty(i, s, {
|
|
479
|
+
get: () => a === "min-width" ? l(s) : c(s),
|
|
480
|
+
enumerable: !0,
|
|
481
|
+
configurable: !0
|
|
482
|
+
}), i), {});
|
|
483
|
+
function f() {
|
|
484
|
+
const i = Object.keys(e).map((s) => [s, l(s)]);
|
|
485
|
+
return R(() => i.filter(([, s]) => s.value).map(([s]) => s));
|
|
486
|
+
}
|
|
487
|
+
return Object.assign(m, {
|
|
488
|
+
greaterOrEqual: l,
|
|
489
|
+
smallerOrEqual: c,
|
|
490
|
+
greater(i) {
|
|
491
|
+
return q(() => `(min-width: ${r(i, 0.1)})`, t);
|
|
492
|
+
},
|
|
493
|
+
smaller(i) {
|
|
494
|
+
return q(() => `(max-width: ${r(i, -0.1)})`, t);
|
|
495
|
+
},
|
|
496
|
+
between(i, s) {
|
|
497
|
+
return q(() => `(min-width: ${r(i)}) and (max-width: ${r(s, -0.1)})`, t);
|
|
498
|
+
},
|
|
499
|
+
isGreater(i) {
|
|
500
|
+
return n(`(min-width: ${r(i, 0.1)})`);
|
|
501
|
+
},
|
|
502
|
+
isGreaterOrEqual(i) {
|
|
503
|
+
return n(`(min-width: ${r(i)})`);
|
|
504
|
+
},
|
|
505
|
+
isSmaller(i) {
|
|
506
|
+
return n(`(max-width: ${r(i, -0.1)})`);
|
|
507
|
+
},
|
|
508
|
+
isSmallerOrEqual(i) {
|
|
509
|
+
return n(`(max-width: ${r(i)})`);
|
|
510
|
+
},
|
|
511
|
+
isInBetween(i, s) {
|
|
512
|
+
return n(`(min-width: ${r(i)}) and (max-width: ${r(s, -0.1)})`);
|
|
513
|
+
},
|
|
514
|
+
current: f,
|
|
515
|
+
active() {
|
|
516
|
+
const i = f();
|
|
517
|
+
return R(() => i.value.length === 0 ? "" : i.value.at(-1));
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
function ue(e, t = {}) {
|
|
522
|
+
const {
|
|
523
|
+
controls: r = !1,
|
|
524
|
+
navigator: u = me
|
|
525
|
+
} = t, a = H(() => u && "permissions" in u);
|
|
526
|
+
let n;
|
|
527
|
+
const l = typeof e == "string" ? { name: e } : e, c = h(), m = () => {
|
|
528
|
+
n && (c.value = n.state);
|
|
529
|
+
}, f = xt(async () => {
|
|
530
|
+
if (a.value) {
|
|
531
|
+
if (!n)
|
|
532
|
+
try {
|
|
533
|
+
n = await u.permissions.query(l), ye(n, "change", m), m();
|
|
534
|
+
} catch {
|
|
535
|
+
c.value = "prompt";
|
|
536
|
+
}
|
|
537
|
+
return n;
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
return f(), r ? {
|
|
541
|
+
state: c,
|
|
542
|
+
isSupported: a,
|
|
543
|
+
query: f
|
|
544
|
+
} : c;
|
|
545
|
+
}
|
|
546
|
+
function _t(e = {}) {
|
|
547
|
+
const {
|
|
548
|
+
navigator: t = me,
|
|
549
|
+
read: r = !1,
|
|
550
|
+
source: u,
|
|
551
|
+
copiedDuring: a = 1500,
|
|
552
|
+
legacy: n = !1
|
|
553
|
+
} = e, l = H(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), f = R(() => l.value || n), i = h(""), s = h(!1), y = Ct(() => s.value = !1, a);
|
|
554
|
+
function w() {
|
|
555
|
+
l.value && E(c.value) ? t.clipboard.readText().then((g) => {
|
|
556
|
+
i.value = g;
|
|
557
|
+
}) : i.value = I();
|
|
558
|
+
}
|
|
559
|
+
f.value && r && ye(["copy", "cut"], w);
|
|
560
|
+
async function k(g = _(u)) {
|
|
561
|
+
f.value && g != null && (l.value && E(m.value) ? await t.clipboard.writeText(g) : S(g), i.value = g, s.value = !0, y.start());
|
|
562
|
+
}
|
|
563
|
+
function S(g) {
|
|
564
|
+
const v = document.createElement("textarea");
|
|
565
|
+
v.value = g ?? "", v.style.position = "absolute", v.style.opacity = "0", document.body.appendChild(v), v.select(), document.execCommand("copy"), v.remove();
|
|
566
|
+
}
|
|
567
|
+
function I() {
|
|
568
|
+
var g, v, O;
|
|
569
|
+
return (O = (v = (g = document == null ? void 0 : document.getSelection) == null ? void 0 : g.call(document)) == null ? void 0 : v.toString()) != null ? O : "";
|
|
570
|
+
}
|
|
571
|
+
function E(g) {
|
|
572
|
+
return g === "granted" || g === "prompt";
|
|
573
|
+
}
|
|
574
|
+
return {
|
|
575
|
+
isSupported: f,
|
|
576
|
+
text: i,
|
|
577
|
+
copied: s,
|
|
578
|
+
copy: k
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
const Ot = " ";
|
|
582
|
+
function Rt(e) {
|
|
369
583
|
return e == null ? void 0 : e.replace(/(\d{3})\d*(\d{4})/g, "$1****$2");
|
|
370
584
|
}
|
|
371
|
-
function
|
|
372
|
-
return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ??
|
|
585
|
+
function ce(e, t) {
|
|
586
|
+
return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? Ot).replace(/M/g, "*");
|
|
373
587
|
}
|
|
374
|
-
function
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
588
|
+
function Et(e) {
|
|
589
|
+
const t = _t();
|
|
590
|
+
return x("phone", (u, a) => {
|
|
591
|
+
const n = C(u, a), l = ce(Rt(n), e == null ? void 0 : e.separator), c = ce(n, e == null ? void 0 : e.separator);
|
|
592
|
+
function m(s) {
|
|
593
|
+
if (e != null && e.safe && e.noSafeWhenHover) {
|
|
594
|
+
const y = s.target;
|
|
595
|
+
y.innerText = c;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
function f(s) {
|
|
599
|
+
if (e != null && e.safe && e.noSafeWhenHover) {
|
|
600
|
+
const y = s.target;
|
|
601
|
+
y.innerText = l;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function i() {
|
|
605
|
+
t.copy(n).then(() => {
|
|
606
|
+
Ke.success({
|
|
607
|
+
content: "复制成功",
|
|
608
|
+
duration: 1e3
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
return e != null && e.callable ? o("a", {
|
|
613
|
+
style: "text-decoration:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;",
|
|
379
614
|
href: `tel:${n}`
|
|
380
|
-
}, [
|
|
615
|
+
}, [e != null && e.safe ? l : c]) : o("a", {
|
|
616
|
+
onClick: i,
|
|
617
|
+
style: "text-decoration:none;use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;",
|
|
618
|
+
onMouseenter: m,
|
|
619
|
+
onMouseleave: f
|
|
620
|
+
}, [e != null && e.safe ? l : c]);
|
|
381
621
|
});
|
|
382
622
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
623
|
+
function $t(e) {
|
|
624
|
+
return x("render", (r) => e(r));
|
|
385
625
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
388
|
-
const
|
|
389
|
-
return
|
|
626
|
+
function qt(e) {
|
|
627
|
+
return x("tag", (r, u) => {
|
|
628
|
+
const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : C(r, u), l = (e == null ? void 0 : e.textColors) || ["#F87335"], c = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], m = n.length > a, f = e == null ? void 0 : e.minWidth;
|
|
629
|
+
return o("div", {
|
|
390
630
|
style: {
|
|
391
631
|
display: "flex",
|
|
392
632
|
flexWrap: "wrap"
|
|
393
633
|
}
|
|
394
|
-
}, [
|
|
395
|
-
const y = typeof l == "function" ? l(
|
|
396
|
-
return
|
|
634
|
+
}, [n.slice(0, a).map((i, s) => {
|
|
635
|
+
const y = typeof l == "function" ? l(i, s) : l[s % l.length], w = typeof c == "function" ? c(i, s) : c[s % c.length];
|
|
636
|
+
return o("span", {
|
|
397
637
|
style: {
|
|
398
|
-
minWidth:
|
|
638
|
+
minWidth: f ? `${f}px` : "unset",
|
|
399
639
|
textAlign: "center",
|
|
400
640
|
margin: "2px",
|
|
401
641
|
padding: "2px 5px",
|
|
@@ -404,21 +644,21 @@ function mt(e) {
|
|
|
404
644
|
color: y,
|
|
405
645
|
backgroundColor: w
|
|
406
646
|
}
|
|
407
|
-
}, [
|
|
647
|
+
}, [i]);
|
|
408
648
|
}), m && "..."]);
|
|
409
649
|
});
|
|
410
650
|
}
|
|
411
|
-
function
|
|
651
|
+
function de(e) {
|
|
412
652
|
if (typeof e == "string")
|
|
413
653
|
return e;
|
|
414
654
|
if (typeof e == "number")
|
|
415
655
|
return `${e}px`;
|
|
416
656
|
}
|
|
417
|
-
function
|
|
418
|
-
var u,
|
|
419
|
-
return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (
|
|
657
|
+
function jt(e, t, r) {
|
|
658
|
+
var u, a;
|
|
659
|
+
return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (a = e == null ? void 0 : e.content(r)) == null ? void 0 : a.toString() : typeof (e == null ? void 0 : e.content) == "string" ? e == null ? void 0 : e.content : C(r, t);
|
|
420
660
|
}
|
|
421
|
-
function
|
|
661
|
+
function Yt(e, t) {
|
|
422
662
|
if (typeof e != "function") {
|
|
423
663
|
if (typeof (e == null ? void 0 : e.color) == "function")
|
|
424
664
|
return e == null ? void 0 : e.color(t);
|
|
@@ -426,103 +666,103 @@ function yt(e, t) {
|
|
|
426
666
|
return e == null ? void 0 : e.color;
|
|
427
667
|
}
|
|
428
668
|
}
|
|
429
|
-
function
|
|
669
|
+
function zt(e, t) {
|
|
430
670
|
if (typeof e != "function")
|
|
431
|
-
return typeof (e == null ? void 0 : e.size) == "function" ?
|
|
671
|
+
return typeof (e == null ? void 0 : e.size) == "function" ? de(e == null ? void 0 : e.size(t)) : de(e == null ? void 0 : e.size);
|
|
432
672
|
}
|
|
433
|
-
function
|
|
673
|
+
function Pt(e, t) {
|
|
434
674
|
let r = "";
|
|
435
|
-
const u =
|
|
436
|
-
return u && (r += `color:${u};`),
|
|
437
|
-
}
|
|
438
|
-
function
|
|
439
|
-
return
|
|
440
|
-
const
|
|
441
|
-
return
|
|
442
|
-
style:
|
|
443
|
-
}, [
|
|
675
|
+
const u = Yt(e, t), a = zt(e, t);
|
|
676
|
+
return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
|
|
677
|
+
}
|
|
678
|
+
function Lt(e) {
|
|
679
|
+
return x("text", (r, u) => {
|
|
680
|
+
const a = jt(e || {}, u, r), n = Pt(e || {}, r);
|
|
681
|
+
return o("span", {
|
|
682
|
+
style: n
|
|
683
|
+
}, [a]);
|
|
444
684
|
});
|
|
445
685
|
}
|
|
446
|
-
function
|
|
686
|
+
function At() {
|
|
447
687
|
return {
|
|
448
|
-
dropdown:
|
|
449
|
-
text:
|
|
450
|
-
dict:
|
|
451
|
-
tag:
|
|
452
|
-
render:
|
|
453
|
-
phone:
|
|
454
|
-
image:
|
|
455
|
-
currency:
|
|
456
|
-
date:
|
|
457
|
-
button:
|
|
688
|
+
dropdown: yt,
|
|
689
|
+
text: Lt,
|
|
690
|
+
dict: mt,
|
|
691
|
+
tag: qt,
|
|
692
|
+
render: $t,
|
|
693
|
+
phone: Et,
|
|
694
|
+
image: ht,
|
|
695
|
+
currency: lt,
|
|
696
|
+
date: it,
|
|
697
|
+
button: nt
|
|
458
698
|
};
|
|
459
699
|
}
|
|
460
|
-
function
|
|
700
|
+
function G(e, t) {
|
|
461
701
|
if (!(e != null && e.render))
|
|
462
702
|
return;
|
|
463
703
|
const r = e.render({
|
|
464
|
-
...
|
|
704
|
+
...At()
|
|
465
705
|
// ...(Table?.$override?.table || {}),
|
|
466
706
|
});
|
|
467
707
|
return {
|
|
468
708
|
render: ({
|
|
469
709
|
record: u
|
|
470
710
|
}) => r(u, e, t),
|
|
471
|
-
[
|
|
711
|
+
[rt]: r.$type,
|
|
472
712
|
disableColumnMode: r.$disableColumnMode,
|
|
473
713
|
disableViewMode: r.$disableViewMode,
|
|
474
714
|
isRender: r.$type === "render",
|
|
475
715
|
type: r.$type
|
|
476
716
|
};
|
|
477
717
|
}
|
|
478
|
-
function
|
|
718
|
+
function ie({
|
|
479
719
|
columns: e,
|
|
480
720
|
columnsOptions: t,
|
|
481
721
|
columnsGroups: r,
|
|
482
722
|
pageMode: u,
|
|
483
|
-
collapsedColumns:
|
|
484
|
-
events:
|
|
723
|
+
collapsedColumns: a,
|
|
724
|
+
events: n
|
|
485
725
|
}) {
|
|
486
|
-
const l = e.map((
|
|
726
|
+
const l = e.map((c) => ({
|
|
487
727
|
...t || {},
|
|
488
|
-
...
|
|
489
|
-
})).map((
|
|
490
|
-
return
|
|
491
|
-
}
|
|
492
|
-
function
|
|
493
|
-
const r = [], u = (
|
|
494
|
-
if ("children" in
|
|
495
|
-
const l = t.find((
|
|
728
|
+
...c
|
|
729
|
+
})).map((c) => It(c, u, a, n)).filter(Boolean);
|
|
730
|
+
return Bt(l, r);
|
|
731
|
+
}
|
|
732
|
+
function Dt(e, t) {
|
|
733
|
+
const r = [], u = (n) => {
|
|
734
|
+
if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
|
|
735
|
+
const l = t.find((c) => {
|
|
496
736
|
var m;
|
|
497
|
-
return ((m = Object.getOwnPropertyDescriptor(
|
|
737
|
+
return ((m = Object.getOwnPropertyDescriptor(c, "key")) == null ? void 0 : m.value) === n.key;
|
|
498
738
|
});
|
|
499
739
|
if (l)
|
|
500
740
|
return r.push(l), l;
|
|
501
741
|
}
|
|
502
|
-
return
|
|
503
|
-
},
|
|
504
|
-
if (r != null && r.length &&
|
|
505
|
-
const
|
|
742
|
+
return n;
|
|
743
|
+
}, a = u(e);
|
|
744
|
+
if (r != null && r.length && a) {
|
|
745
|
+
const n = Math.min(...r.map((l) => t.indexOf(l)));
|
|
506
746
|
r.forEach((l) => {
|
|
507
|
-
const
|
|
508
|
-
t.splice(
|
|
509
|
-
}), t.splice(
|
|
747
|
+
const c = t.indexOf(l);
|
|
748
|
+
t.splice(c, 1);
|
|
749
|
+
}), t.splice(n, 0, a);
|
|
510
750
|
}
|
|
511
751
|
}
|
|
512
|
-
function
|
|
752
|
+
function Bt(e, t = []) {
|
|
513
753
|
return t.forEach((r) => {
|
|
514
|
-
|
|
754
|
+
Dt(r, e);
|
|
515
755
|
}), e;
|
|
516
756
|
}
|
|
517
|
-
function
|
|
757
|
+
function It(e, t, r, u) {
|
|
518
758
|
const {
|
|
519
|
-
render:
|
|
520
|
-
disableColumnMode:
|
|
521
|
-
} =
|
|
759
|
+
render: a,
|
|
760
|
+
disableColumnMode: n
|
|
761
|
+
} = G(e, {
|
|
522
762
|
previewing: !1,
|
|
523
763
|
emits: u
|
|
524
764
|
}) || {};
|
|
525
|
-
if (!(
|
|
765
|
+
if (!(n || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !r.value.find((l) => l.key === e.key && l.collapsed === !0))
|
|
526
766
|
return {
|
|
527
767
|
dataIndex: e.index || e.key,
|
|
528
768
|
title: e.title,
|
|
@@ -538,13 +778,13 @@ function kt(e, t, r, u) {
|
|
|
538
778
|
tooltip: !0,
|
|
539
779
|
...e.extraProps,
|
|
540
780
|
key: e.key,
|
|
541
|
-
render:
|
|
781
|
+
render: a
|
|
542
782
|
};
|
|
543
783
|
}
|
|
544
|
-
function
|
|
545
|
-
return new
|
|
784
|
+
function Wt() {
|
|
785
|
+
return new Xe.Workbook();
|
|
546
786
|
}
|
|
547
|
-
function
|
|
787
|
+
function Kt(e, t = "Sheet1") {
|
|
548
788
|
return e.addWorksheet(t, {
|
|
549
789
|
headerFooter: {
|
|
550
790
|
firstHeader: "",
|
|
@@ -552,55 +792,55 @@ function Tt(e, t = "Sheet1") {
|
|
|
552
792
|
}
|
|
553
793
|
});
|
|
554
794
|
}
|
|
555
|
-
function
|
|
795
|
+
function Vt(e, t) {
|
|
556
796
|
e.columns = t;
|
|
557
797
|
}
|
|
558
|
-
function
|
|
798
|
+
function Ft(e, t) {
|
|
559
799
|
e.addRows(t);
|
|
560
800
|
}
|
|
561
|
-
async function
|
|
801
|
+
async function Nt({
|
|
562
802
|
columns: e,
|
|
563
803
|
rows: t,
|
|
564
804
|
filename: r
|
|
565
805
|
}) {
|
|
566
|
-
const u =
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
806
|
+
const u = Wt(), a = Kt(u);
|
|
807
|
+
Vt(a, e), Ft(a, t);
|
|
808
|
+
const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
|
|
809
|
+
Ut(l, r || `${B().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
|
|
570
810
|
}
|
|
571
|
-
function
|
|
811
|
+
function Ut(e, t) {
|
|
572
812
|
const r = document.createElement("a");
|
|
573
813
|
r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
|
|
574
814
|
URL.revokeObjectURL(r.href);
|
|
575
815
|
}, 1e3);
|
|
576
816
|
}
|
|
577
|
-
function
|
|
817
|
+
function Ht(e, t) {
|
|
578
818
|
const r = {};
|
|
579
|
-
return e.filter((
|
|
580
|
-
options:
|
|
581
|
-
render:
|
|
582
|
-
content: typeof
|
|
583
|
-
})).forEach((
|
|
584
|
-
var
|
|
585
|
-
const
|
|
819
|
+
return e.filter((a) => a.exportable !== !1).map((a) => ({
|
|
820
|
+
options: a,
|
|
821
|
+
render: G(a),
|
|
822
|
+
content: typeof a.exportable == "object" ? a.exportable.content : void 0
|
|
823
|
+
})).forEach((a) => {
|
|
824
|
+
var c;
|
|
825
|
+
const n = (c = a.render) == null ? void 0 : c.render, l = () => {
|
|
586
826
|
var m;
|
|
587
827
|
switch (!0) {
|
|
588
|
-
case !!
|
|
589
|
-
return
|
|
590
|
-
case !!
|
|
591
|
-
const
|
|
828
|
+
case !!a.content:
|
|
829
|
+
return a.content && a.content(t);
|
|
830
|
+
case !!n: {
|
|
831
|
+
const f = document.createElement("div"), i = Le(() => n && n({
|
|
592
832
|
record: t
|
|
593
833
|
}));
|
|
594
|
-
return
|
|
834
|
+
return Ae(i, f), (m = i.el) == null ? void 0 : m.innerText;
|
|
595
835
|
}
|
|
596
836
|
default:
|
|
597
|
-
return
|
|
837
|
+
return C(t, a.options);
|
|
598
838
|
}
|
|
599
839
|
};
|
|
600
|
-
r[
|
|
840
|
+
r[a.options.key] = l();
|
|
601
841
|
}), r;
|
|
602
842
|
}
|
|
603
|
-
function
|
|
843
|
+
function Gt(e) {
|
|
604
844
|
switch (!0) {
|
|
605
845
|
case typeof e == "number":
|
|
606
846
|
return e / 6;
|
|
@@ -610,31 +850,31 @@ function Yt(e) {
|
|
|
610
850
|
return 30;
|
|
611
851
|
}
|
|
612
852
|
}
|
|
613
|
-
function
|
|
614
|
-
const u = e.filter((
|
|
615
|
-
var l,
|
|
853
|
+
function Jt(e, t, r) {
|
|
854
|
+
const u = e.filter((n) => n.exportable !== !1).map((n) => {
|
|
855
|
+
var l, c;
|
|
616
856
|
return {
|
|
617
|
-
key:
|
|
618
|
-
header: ((l =
|
|
619
|
-
width: ((
|
|
857
|
+
key: n.key,
|
|
858
|
+
header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
|
|
859
|
+
width: ((c = n.exportable) == null ? void 0 : c.width) || Gt(n.width)
|
|
620
860
|
};
|
|
621
|
-
}),
|
|
622
|
-
|
|
861
|
+
}), a = t.map((n) => Ht(e, n));
|
|
862
|
+
Nt({
|
|
623
863
|
columns: u,
|
|
624
|
-
rows:
|
|
864
|
+
rows: a,
|
|
625
865
|
filename: r
|
|
626
866
|
});
|
|
627
867
|
}
|
|
628
|
-
function
|
|
868
|
+
function Qt() {
|
|
629
869
|
return {
|
|
630
|
-
exportExcel:
|
|
870
|
+
exportExcel: Jt
|
|
631
871
|
};
|
|
632
872
|
}
|
|
633
|
-
class
|
|
873
|
+
class J {
|
|
634
874
|
constructor(t) {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
875
|
+
M(this, "sort", {});
|
|
876
|
+
M(this, "defaultSort", {});
|
|
877
|
+
M(this, "before", (t) => {
|
|
638
878
|
t.paramsQuery = {
|
|
639
879
|
...t.paramsQuery || {},
|
|
640
880
|
sort: this.stringify(this.sort)
|
|
@@ -656,8 +896,8 @@ class K {
|
|
|
656
896
|
*/
|
|
657
897
|
remove(t) {
|
|
658
898
|
const r = Object.entries(this.sort).filter(([u]) => u !== t);
|
|
659
|
-
this.sort = {}, r && r.forEach(([u,
|
|
660
|
-
this.sort[u] =
|
|
899
|
+
this.sort = {}, r && r.forEach(([u, a]) => {
|
|
900
|
+
this.sort[u] = a;
|
|
661
901
|
});
|
|
662
902
|
}
|
|
663
903
|
/**
|
|
@@ -670,35 +910,35 @@ class K {
|
|
|
670
910
|
* 转换排序对象为字符串
|
|
671
911
|
*/
|
|
672
912
|
stringify(t) {
|
|
673
|
-
return typeof t != "object" ? [] : (t instanceof
|
|
913
|
+
return typeof t != "object" ? [] : (t instanceof J && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
|
|
674
914
|
}
|
|
675
915
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
916
|
+
const Xt = 300;
|
|
917
|
+
function Zt(e) {
|
|
678
918
|
const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
|
|
679
919
|
if (!r)
|
|
680
920
|
return;
|
|
681
|
-
let u,
|
|
921
|
+
let u, a = !1, n;
|
|
682
922
|
r.addEventListener("mousedown", () => {
|
|
683
923
|
console.log("mousedown"), u = setTimeout(() => {
|
|
684
|
-
u && (r.style.cursor = "grab", r.style.userSelect = "none",
|
|
685
|
-
},
|
|
924
|
+
u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
|
|
925
|
+
}, Xt);
|
|
686
926
|
}), r.addEventListener("mouseup", () => {
|
|
687
|
-
clearTimeout(u), u && (u = void 0,
|
|
927
|
+
clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
|
|
688
928
|
}), r.addEventListener("mousemove", (l) => {
|
|
689
|
-
if (
|
|
690
|
-
if (
|
|
691
|
-
|
|
929
|
+
if (a)
|
|
930
|
+
if (n === void 0)
|
|
931
|
+
n = l.clientX;
|
|
692
932
|
else {
|
|
693
|
-
const
|
|
694
|
-
|
|
933
|
+
const c = n - l.clientX;
|
|
934
|
+
n = l.clientX, r.scrollLeft += c;
|
|
695
935
|
}
|
|
696
936
|
});
|
|
697
937
|
}
|
|
698
|
-
function
|
|
699
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
938
|
+
function pt(e) {
|
|
939
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !De(e);
|
|
700
940
|
}
|
|
701
|
-
const
|
|
941
|
+
const er = /* @__PURE__ */ A({
|
|
702
942
|
props: {
|
|
703
943
|
record: {
|
|
704
944
|
type: Object,
|
|
@@ -732,60 +972,60 @@ const Pt = /* @__PURE__ */ E({
|
|
|
732
972
|
}
|
|
733
973
|
},
|
|
734
974
|
setup(e) {
|
|
735
|
-
const t =
|
|
736
|
-
options:
|
|
737
|
-
renderer:
|
|
975
|
+
const t = K(), r = h(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
|
|
976
|
+
options: n,
|
|
977
|
+
renderer: G(n, {
|
|
738
978
|
previewing: !0
|
|
739
979
|
})
|
|
740
980
|
})).filter(({
|
|
741
|
-
options:
|
|
981
|
+
options: n
|
|
742
982
|
}) => {
|
|
743
983
|
var l;
|
|
744
|
-
return !((l = e.exclude) != null && l.includes(
|
|
984
|
+
return !((l = e.exclude) != null && l.includes(n.key));
|
|
745
985
|
}).filter(({
|
|
746
|
-
renderer:
|
|
747
|
-
}) => !(
|
|
748
|
-
function
|
|
749
|
-
var
|
|
986
|
+
renderer: n
|
|
987
|
+
}) => !(n != null && n.disableViewMode));
|
|
988
|
+
function a() {
|
|
989
|
+
var n;
|
|
750
990
|
if (t) {
|
|
751
|
-
const l = (
|
|
991
|
+
const l = (n = t.proxy) == null ? void 0 : n.$el;
|
|
752
992
|
r.value = Math.floor(l.offsetWidth / e.minWidth);
|
|
753
993
|
}
|
|
754
994
|
}
|
|
755
|
-
return
|
|
756
|
-
|
|
995
|
+
return L(() => {
|
|
996
|
+
a();
|
|
757
997
|
}), () => {
|
|
758
|
-
let
|
|
759
|
-
return
|
|
998
|
+
let n;
|
|
999
|
+
return o("div", {
|
|
760
1000
|
class: "preview-container"
|
|
761
|
-
}, [
|
|
1001
|
+
}, [o(Ve, {
|
|
762
1002
|
column: r.value,
|
|
763
1003
|
bordered: !0,
|
|
764
1004
|
align: "left",
|
|
765
1005
|
layout: e.layout
|
|
766
|
-
},
|
|
1006
|
+
}, pt(n = u.map((l) => o(Fe, {
|
|
767
1007
|
label: l.options.title
|
|
768
1008
|
}, {
|
|
769
1009
|
default: () => {
|
|
770
|
-
var
|
|
771
|
-
return [(
|
|
1010
|
+
var c, m;
|
|
1011
|
+
return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
|
|
772
1012
|
record: e.record
|
|
773
|
-
}) :
|
|
1013
|
+
}) : C(e.record, l.options)];
|
|
774
1014
|
}
|
|
775
|
-
}))) ?
|
|
776
|
-
default: () => [
|
|
1015
|
+
}))) ? n : {
|
|
1016
|
+
default: () => [n]
|
|
777
1017
|
})]);
|
|
778
1018
|
};
|
|
779
1019
|
}
|
|
780
1020
|
});
|
|
781
|
-
function
|
|
1021
|
+
function tr(e, t, {
|
|
782
1022
|
tableForm: r,
|
|
783
1023
|
tableEvents: u
|
|
784
1024
|
}) {
|
|
785
|
-
const
|
|
786
|
-
return
|
|
1025
|
+
const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
|
|
1026
|
+
return a || n ? () => o(V, null, [n && o(Ne, {
|
|
787
1027
|
margin: 0
|
|
788
|
-
}, null),
|
|
1028
|
+
}, null), a && o("div", {
|
|
789
1029
|
class: "table-actions",
|
|
790
1030
|
style: {
|
|
791
1031
|
display: "flex",
|
|
@@ -794,42 +1034,42 @@ function Dt(e, t, {
|
|
|
794
1034
|
flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
|
|
795
1035
|
alignItems: "center"
|
|
796
1036
|
}
|
|
797
|
-
}, [
|
|
1037
|
+
}, [o("div", {
|
|
798
1038
|
class: "built-in"
|
|
799
|
-
}, [
|
|
800
|
-
default: () => [e.refreshable &&
|
|
1039
|
+
}, [o(ae, null, {
|
|
1040
|
+
default: () => [e.refreshable && o(j, {
|
|
801
1041
|
type: "primary",
|
|
802
1042
|
onClick: () => u("reload")
|
|
803
1043
|
}, {
|
|
804
|
-
default: () => [
|
|
805
|
-
}), e.exportable &&
|
|
1044
|
+
default: () => [z("刷新")]
|
|
1045
|
+
}), e.exportable && o(j, {
|
|
806
1046
|
type: "primary",
|
|
807
1047
|
onClick: () => u("export")
|
|
808
1048
|
}, {
|
|
809
|
-
default: () => [
|
|
810
|
-
}), e.collapsable &&
|
|
1049
|
+
default: () => [z("导出")]
|
|
1050
|
+
}), e.collapsable && o(j, {
|
|
811
1051
|
type: "primary",
|
|
812
1052
|
onClick: () => u("collapse")
|
|
813
1053
|
}, {
|
|
814
|
-
default: () => [
|
|
1054
|
+
default: () => [z("显示")]
|
|
815
1055
|
})]
|
|
816
|
-
})]),
|
|
1056
|
+
})]), o("div", {
|
|
817
1057
|
class: "customs"
|
|
818
|
-
}, [
|
|
1058
|
+
}, [o(ae, null, {
|
|
819
1059
|
default: () => [t.slots.actions && t.slots.actions()]
|
|
820
1060
|
})])])]) : () => {
|
|
821
1061
|
};
|
|
822
1062
|
}
|
|
823
|
-
function
|
|
1063
|
+
function rr(e, t, {
|
|
824
1064
|
tableForm: r,
|
|
825
1065
|
tableEvents: u,
|
|
826
|
-
formInstance:
|
|
1066
|
+
formInstance: a
|
|
827
1067
|
}) {
|
|
828
|
-
return r != null && r.length ? () =>
|
|
1068
|
+
return r != null && r.length ? () => o("div", {
|
|
829
1069
|
class: "table-form"
|
|
830
|
-
}, [
|
|
1070
|
+
}, [o(oe, se({
|
|
831
1071
|
form: r,
|
|
832
|
-
ref: (
|
|
1072
|
+
ref: (n) => a && (a.value = n),
|
|
833
1073
|
searchable: !0,
|
|
834
1074
|
onSubmit: () => u("reload", {
|
|
835
1075
|
reset: !0
|
|
@@ -837,202 +1077,110 @@ function At(e, t, {
|
|
|
837
1077
|
}, e.formOptions), null)]) : () => {
|
|
838
1078
|
};
|
|
839
1079
|
}
|
|
840
|
-
function
|
|
1080
|
+
function nr(e, t, {
|
|
841
1081
|
tableSource: r
|
|
842
1082
|
}) {
|
|
843
1083
|
const u = h([]);
|
|
844
|
-
function
|
|
1084
|
+
function a() {
|
|
845
1085
|
u.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
|
|
846
1086
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
849
|
-
e.checkboxRows !== void 0 && (u.value = [...e.checkboxRows.map((
|
|
1087
|
+
function n() {
|
|
1088
|
+
re(() => {
|
|
1089
|
+
e.checkboxRows !== void 0 && (u.value = [...e.checkboxRows.map((f) => f[e.rowKey])]), e.checkboxKeys !== void 0 && (u.value = [...e.checkboxKeys]), e.radioKey && (u.value = [e.radioKey]), e.radioRow && (u.value = [e.radioRow[e.rowKey]]);
|
|
850
1090
|
});
|
|
851
1091
|
}
|
|
852
1092
|
function l() {
|
|
853
|
-
const
|
|
1093
|
+
const f = typeof e.selection == "string" ? {
|
|
854
1094
|
type: e.selection
|
|
855
1095
|
} : e.selection;
|
|
856
|
-
switch (
|
|
1096
|
+
switch (f == null ? void 0 : f.type) {
|
|
857
1097
|
case "radio":
|
|
858
1098
|
return {
|
|
859
1099
|
title: "选择",
|
|
860
|
-
...
|
|
1100
|
+
...f,
|
|
861
1101
|
selectedRowKeys: u.value
|
|
862
1102
|
};
|
|
863
1103
|
case "checkbox":
|
|
864
1104
|
return {
|
|
865
1105
|
showCheckedAll: !0,
|
|
866
1106
|
selectedRowKeys: u.value,
|
|
867
|
-
...
|
|
1107
|
+
...f
|
|
868
1108
|
};
|
|
869
1109
|
}
|
|
870
1110
|
}
|
|
871
|
-
function
|
|
1111
|
+
function c(f, i, s) {
|
|
872
1112
|
const {
|
|
873
1113
|
type: y
|
|
874
1114
|
} = l() || {};
|
|
875
1115
|
switch (y) {
|
|
876
1116
|
case "radio":
|
|
877
|
-
t.emit("update:radio-key",
|
|
1117
|
+
t.emit("update:radio-key", i), t.emit("update:radio-row", s);
|
|
878
1118
|
break;
|
|
879
1119
|
case "checkbox":
|
|
880
|
-
t.emit("update:checkbox-keys",
|
|
881
|
-
var
|
|
882
|
-
return r.value.find((
|
|
1120
|
+
t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((w) => {
|
|
1121
|
+
var k;
|
|
1122
|
+
return r.value.find((S) => S[e.rowKey] === w) || ((k = e.checkboxRows) == null ? void 0 : k.find((S) => S[e.rowKey] === w));
|
|
883
1123
|
}));
|
|
884
1124
|
break;
|
|
885
1125
|
}
|
|
886
1126
|
}
|
|
887
1127
|
function m() {
|
|
888
|
-
|
|
889
|
-
t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((
|
|
890
|
-
var
|
|
891
|
-
return r.value.find((
|
|
1128
|
+
re(() => {
|
|
1129
|
+
t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((f) => {
|
|
1130
|
+
var i;
|
|
1131
|
+
return r.value.find((s) => s[e.rowKey] === f) || ((i = e.checkboxRows) == null ? void 0 : i.find((s) => s[e.rowKey] === f));
|
|
892
1132
|
}));
|
|
893
1133
|
});
|
|
894
1134
|
}
|
|
895
|
-
return
|
|
1135
|
+
return n(), {
|
|
896
1136
|
selectedRowKeys: u,
|
|
897
1137
|
rowSelection: l(),
|
|
898
|
-
onSelect:
|
|
1138
|
+
onSelect: c,
|
|
899
1139
|
onSelectAll: m,
|
|
900
|
-
resetSelection:
|
|
901
|
-
reloadSelection:
|
|
1140
|
+
resetSelection: a,
|
|
1141
|
+
reloadSelection: n
|
|
902
1142
|
};
|
|
903
1143
|
}
|
|
904
|
-
function
|
|
905
|
-
return Oe() ? (_e(e), !0) : !1;
|
|
906
|
-
}
|
|
907
|
-
function D(e) {
|
|
908
|
-
return typeof e == "function" ? e() : Re(e);
|
|
909
|
-
}
|
|
910
|
-
const Kt = typeof window < "u" && typeof document < "u";
|
|
911
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
912
|
-
function Wt(e, t) {
|
|
913
|
-
var r;
|
|
914
|
-
if (typeof e == "number")
|
|
915
|
-
return e + t;
|
|
916
|
-
const u = ((r = e.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : r[0]) || "", n = e.slice(u.length), a = Number.parseFloat(u) + t;
|
|
917
|
-
return Number.isNaN(a) ? e : a + n;
|
|
918
|
-
}
|
|
919
|
-
const le = Kt ? window : void 0;
|
|
920
|
-
function Ft() {
|
|
921
|
-
const e = h(!1), t = A();
|
|
922
|
-
return t && q(() => {
|
|
923
|
-
e.value = !0;
|
|
924
|
-
}, t), e;
|
|
925
|
-
}
|
|
926
|
-
function Vt(e) {
|
|
927
|
-
const t = Ft();
|
|
928
|
-
return O(() => (t.value, !!e()));
|
|
929
|
-
}
|
|
930
|
-
function T(e, t = {}) {
|
|
931
|
-
const { window: r = le } = t, u = Vt(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
932
|
-
let n;
|
|
933
|
-
const a = h(!1), l = (i) => {
|
|
934
|
-
a.value = i.matches;
|
|
935
|
-
}, d = () => {
|
|
936
|
-
n && ("removeEventListener" in n ? n.removeEventListener("change", l) : n.removeListener(l));
|
|
937
|
-
}, m = $e(() => {
|
|
938
|
-
u.value && (d(), n = r.matchMedia(D(e)), "addEventListener" in n ? n.addEventListener("change", l) : n.addListener(l), a.value = n.matches);
|
|
939
|
-
});
|
|
940
|
-
return It(() => {
|
|
941
|
-
m(), d(), n = void 0;
|
|
942
|
-
}), a;
|
|
943
|
-
}
|
|
944
|
-
function Nt(e, t = {}) {
|
|
945
|
-
function r(f, o) {
|
|
946
|
-
let y = D(e[D(f)]);
|
|
947
|
-
return o != null && (y = Wt(y, o)), typeof y == "number" && (y = `${y}px`), y;
|
|
948
|
-
}
|
|
949
|
-
const { window: u = le, strategy: n = "min-width" } = t;
|
|
950
|
-
function a(f) {
|
|
951
|
-
return u ? u.matchMedia(f).matches : !1;
|
|
952
|
-
}
|
|
953
|
-
const l = (f) => T(() => `(min-width: ${r(f)})`, t), d = (f) => T(() => `(max-width: ${r(f)})`, t), m = Object.keys(e).reduce((f, o) => (Object.defineProperty(f, o, {
|
|
954
|
-
get: () => n === "min-width" ? l(o) : d(o),
|
|
955
|
-
enumerable: !0,
|
|
956
|
-
configurable: !0
|
|
957
|
-
}), f), {});
|
|
958
|
-
function i() {
|
|
959
|
-
const f = Object.keys(e).map((o) => [o, l(o)]);
|
|
960
|
-
return O(() => f.filter(([, o]) => o.value).map(([o]) => o));
|
|
961
|
-
}
|
|
962
|
-
return Object.assign(m, {
|
|
963
|
-
greaterOrEqual: l,
|
|
964
|
-
smallerOrEqual: d,
|
|
965
|
-
greater(f) {
|
|
966
|
-
return T(() => `(min-width: ${r(f, 0.1)})`, t);
|
|
967
|
-
},
|
|
968
|
-
smaller(f) {
|
|
969
|
-
return T(() => `(max-width: ${r(f, -0.1)})`, t);
|
|
970
|
-
},
|
|
971
|
-
between(f, o) {
|
|
972
|
-
return T(() => `(min-width: ${r(f)}) and (max-width: ${r(o, -0.1)})`, t);
|
|
973
|
-
},
|
|
974
|
-
isGreater(f) {
|
|
975
|
-
return a(`(min-width: ${r(f, 0.1)})`);
|
|
976
|
-
},
|
|
977
|
-
isGreaterOrEqual(f) {
|
|
978
|
-
return a(`(min-width: ${r(f)})`);
|
|
979
|
-
},
|
|
980
|
-
isSmaller(f) {
|
|
981
|
-
return a(`(max-width: ${r(f, -0.1)})`);
|
|
982
|
-
},
|
|
983
|
-
isSmallerOrEqual(f) {
|
|
984
|
-
return a(`(max-width: ${r(f)})`);
|
|
985
|
-
},
|
|
986
|
-
isInBetween(f, o) {
|
|
987
|
-
return a(`(min-width: ${r(f)}) and (max-width: ${r(o, -0.1)})`);
|
|
988
|
-
},
|
|
989
|
-
current: i,
|
|
990
|
-
active() {
|
|
991
|
-
const f = i();
|
|
992
|
-
return O(() => f.value.length === 0 ? "" : f.value.at(-1));
|
|
993
|
-
}
|
|
994
|
-
});
|
|
995
|
-
}
|
|
996
|
-
function Ut(e, t, {
|
|
1144
|
+
function ar(e, t, {
|
|
997
1145
|
pageService: r,
|
|
998
1146
|
tableEvents: u
|
|
999
1147
|
}) {
|
|
1000
|
-
function
|
|
1001
|
-
r && (r.pageIndex =
|
|
1148
|
+
function a(c) {
|
|
1149
|
+
r && (r.pageIndex = c, u("reload"));
|
|
1002
1150
|
}
|
|
1003
|
-
function
|
|
1004
|
-
r && (r.pageSize =
|
|
1151
|
+
function n(c) {
|
|
1152
|
+
r && (r.pageSize = c, u("reload"));
|
|
1005
1153
|
}
|
|
1006
|
-
const l =
|
|
1154
|
+
const l = Mt({
|
|
1007
1155
|
mobile: 0,
|
|
1008
1156
|
tablet: 640,
|
|
1009
1157
|
desktop: 1024
|
|
1010
1158
|
});
|
|
1011
|
-
return r ? () =>
|
|
1159
|
+
return r ? () => o("div", {
|
|
1012
1160
|
class: "table-pagination",
|
|
1013
1161
|
style: {
|
|
1014
1162
|
padding: "10px 0"
|
|
1015
1163
|
}
|
|
1016
|
-
}, [
|
|
1164
|
+
}, [o(Ue, {
|
|
1017
1165
|
current: r.pageIndex,
|
|
1018
|
-
"onUpdate:current": (
|
|
1166
|
+
"onUpdate:current": (c) => r.pageIndex = c,
|
|
1019
1167
|
"page-size": r.pageSize,
|
|
1020
|
-
"onUpdate:page-size": (
|
|
1168
|
+
"onUpdate:page-size": (c) => r.pageSize = c,
|
|
1021
1169
|
total: r.total,
|
|
1022
1170
|
"page-size-options": r.pageSizeOpts,
|
|
1023
1171
|
"hide-on-single-page": !e.alwayShowPagination,
|
|
1024
1172
|
"show-total": !0,
|
|
1025
1173
|
"show-page-size": !0,
|
|
1026
1174
|
simple: l.smaller("desktop").value,
|
|
1027
|
-
onChange: (
|
|
1028
|
-
onPageSizeChange: (
|
|
1175
|
+
onChange: (c) => a(c),
|
|
1176
|
+
onPageSizeChange: (c) => n(c),
|
|
1029
1177
|
style: {
|
|
1030
1178
|
justifyContent: "flex-end"
|
|
1031
1179
|
}
|
|
1032
1180
|
}, null)]) : () => {
|
|
1033
1181
|
};
|
|
1034
1182
|
}
|
|
1035
|
-
const
|
|
1183
|
+
const lr = /* @__PURE__ */ A({
|
|
1036
1184
|
props: {
|
|
1037
1185
|
collapsedColumns: {
|
|
1038
1186
|
type: Array,
|
|
@@ -1040,33 +1188,33 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1040
1188
|
}
|
|
1041
1189
|
},
|
|
1042
1190
|
setup(e) {
|
|
1043
|
-
const t =
|
|
1044
|
-
label:
|
|
1045
|
-
value:
|
|
1191
|
+
const t = D(), r = h(e.collapsedColumns.map((a) => ({
|
|
1192
|
+
label: a.title,
|
|
1193
|
+
value: a.key,
|
|
1046
1194
|
disabled: !1
|
|
1047
|
-
}))), u = h(e.collapsedColumns.filter((
|
|
1048
|
-
return
|
|
1049
|
-
const
|
|
1050
|
-
key:
|
|
1051
|
-
title:
|
|
1052
|
-
collapsed: u.value.includes(
|
|
1195
|
+
}))), u = h(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
|
|
1196
|
+
return Je(() => {
|
|
1197
|
+
const a = e.collapsedColumns.map((n) => ({
|
|
1198
|
+
key: n.key,
|
|
1199
|
+
title: n.title,
|
|
1200
|
+
collapsed: u.value.includes(n.key)
|
|
1053
1201
|
}));
|
|
1054
|
-
t.close(
|
|
1055
|
-
}), () =>
|
|
1202
|
+
t.close(a);
|
|
1203
|
+
}), () => o("div", {
|
|
1056
1204
|
class: "table-collapsed-render"
|
|
1057
|
-
}, [
|
|
1205
|
+
}, [o(He, {
|
|
1058
1206
|
data: r.value,
|
|
1059
1207
|
"default-value": u.value,
|
|
1060
|
-
onChange: (
|
|
1208
|
+
onChange: (a) => u.value = [...a],
|
|
1061
1209
|
title: ["显示列", "隐藏列"],
|
|
1062
1210
|
style: {
|
|
1063
1211
|
justifyContent: "center"
|
|
1064
1212
|
}
|
|
1065
1213
|
}, {
|
|
1066
|
-
default: () => [
|
|
1214
|
+
default: () => [Be(o("template", null, null), [[Ie("slot"), "source"]])]
|
|
1067
1215
|
})]);
|
|
1068
1216
|
}
|
|
1069
|
-
}),
|
|
1217
|
+
}), ur = /* @__PURE__ */ A({
|
|
1070
1218
|
props: {
|
|
1071
1219
|
value: {
|
|
1072
1220
|
type: Object,
|
|
@@ -1082,20 +1230,20 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1082
1230
|
}
|
|
1083
1231
|
},
|
|
1084
1232
|
setup(e) {
|
|
1085
|
-
const t =
|
|
1233
|
+
const t = D();
|
|
1086
1234
|
function r(u) {
|
|
1087
1235
|
e.onSubmit && e.onSubmit(u), t.close(u);
|
|
1088
1236
|
}
|
|
1089
|
-
return console.log(e.value), () =>
|
|
1237
|
+
return console.log(e.value), () => o("div", {
|
|
1090
1238
|
class: "edit-form-container"
|
|
1091
|
-
}, [
|
|
1239
|
+
}, [o(oe, {
|
|
1092
1240
|
name: "form",
|
|
1093
1241
|
value: e.value,
|
|
1094
1242
|
form: e.form,
|
|
1095
1243
|
onSubmit: r
|
|
1096
1244
|
}, null)]);
|
|
1097
1245
|
}
|
|
1098
|
-
}),
|
|
1246
|
+
}), cr = /* @__PURE__ */ A({
|
|
1099
1247
|
props: {
|
|
1100
1248
|
// 数据主键
|
|
1101
1249
|
rowKey: {
|
|
@@ -1234,24 +1382,24 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1234
1382
|
},
|
|
1235
1383
|
expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
|
|
1236
1384
|
setup(e, t) {
|
|
1237
|
-
const r = Math.random().toString(32).slice(2).toUpperCase(), u = h(),
|
|
1238
|
-
key:
|
|
1239
|
-
title:
|
|
1240
|
-
collapsed: !!
|
|
1385
|
+
const r = Math.random().toString(32).slice(2).toUpperCase(), u = h(), a = h(), n = h(), l = h(), [c, m] = pe(e.columns), f = h(!1), i = e.form ?? et(e.columns), s = k(), y = I(), w = h(e.columns.map((d) => ({
|
|
1386
|
+
key: d.key,
|
|
1387
|
+
title: d.title,
|
|
1388
|
+
collapsed: !!d.collapsed
|
|
1241
1389
|
})));
|
|
1242
|
-
function
|
|
1390
|
+
function k() {
|
|
1243
1391
|
switch (!0) {
|
|
1244
1392
|
case (typeof e.pageable == "string" && e.pageable === "server"):
|
|
1245
|
-
return new
|
|
1393
|
+
return new W();
|
|
1246
1394
|
case (typeof e.pageable == "boolean" && e.pageable === !0):
|
|
1247
|
-
return new
|
|
1395
|
+
return new W();
|
|
1248
1396
|
case (typeof e.pageable == "object" && !!e.pageable.reset):
|
|
1249
1397
|
return e.pageable;
|
|
1250
1398
|
case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
|
|
1251
|
-
return new
|
|
1399
|
+
return new W(e.pageable.index, e.pageable.size);
|
|
1252
1400
|
}
|
|
1253
1401
|
}
|
|
1254
|
-
const
|
|
1402
|
+
const S = (() => {
|
|
1255
1403
|
switch (!0) {
|
|
1256
1404
|
case typeof e.pageable == "string":
|
|
1257
1405
|
return e.pageable;
|
|
@@ -1261,213 +1409,213 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1261
1409
|
return "server";
|
|
1262
1410
|
}
|
|
1263
1411
|
})();
|
|
1264
|
-
function
|
|
1265
|
-
const
|
|
1266
|
-
if (
|
|
1267
|
-
return new
|
|
1412
|
+
function I() {
|
|
1413
|
+
const d = e.columns.find((b) => !!b.sortable);
|
|
1414
|
+
if (d || e.sortable)
|
|
1415
|
+
return new J({
|
|
1268
1416
|
...e.sortable || {},
|
|
1269
|
-
...
|
|
1270
|
-
[
|
|
1417
|
+
...d ? {
|
|
1418
|
+
[d.key]: d.sortable
|
|
1271
1419
|
} : {}
|
|
1272
1420
|
});
|
|
1273
1421
|
}
|
|
1274
|
-
function
|
|
1422
|
+
function E(d) {
|
|
1275
1423
|
const {
|
|
1276
1424
|
exportExcel: b
|
|
1277
|
-
} =
|
|
1278
|
-
b((
|
|
1425
|
+
} = Qt();
|
|
1426
|
+
b((d == null ? void 0 : d.columns) || e.columns, (d == null ? void 0 : d.source) || c.value, (d == null ? void 0 : d.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
|
|
1279
1427
|
}
|
|
1280
|
-
function
|
|
1428
|
+
function g(d) {
|
|
1281
1429
|
let b;
|
|
1282
1430
|
switch (!0) {
|
|
1283
|
-
case !!(
|
|
1284
|
-
b =
|
|
1431
|
+
case !!(d != null && d.key):
|
|
1432
|
+
b = c.value.find((T) => T[e.rowKey] === (d == null ? void 0 : d.key));
|
|
1285
1433
|
break;
|
|
1286
|
-
case !!(
|
|
1287
|
-
b =
|
|
1434
|
+
case !!(d != null && d.record):
|
|
1435
|
+
b = d == null ? void 0 : d.record;
|
|
1288
1436
|
break;
|
|
1289
1437
|
}
|
|
1290
1438
|
if (!b)
|
|
1291
1439
|
throw new Error("未找到需要预览的数据");
|
|
1292
|
-
return
|
|
1440
|
+
return n.value.open(er, {
|
|
1293
1441
|
record: b,
|
|
1294
1442
|
columns: e.columns
|
|
1295
1443
|
}, {
|
|
1296
|
-
title: (
|
|
1297
|
-
mode: (
|
|
1444
|
+
title: (d == null ? void 0 : d.title) || "详情",
|
|
1445
|
+
mode: (d == null ? void 0 : d.mode) || "dialog"
|
|
1298
1446
|
});
|
|
1299
1447
|
}
|
|
1300
|
-
function
|
|
1448
|
+
function v(d) {
|
|
1301
1449
|
let b;
|
|
1302
1450
|
switch (!0) {
|
|
1303
|
-
case !!(
|
|
1304
|
-
b =
|
|
1451
|
+
case !!(d != null && d.key):
|
|
1452
|
+
b = c.value.find((T) => T[e.rowKey] === (d == null ? void 0 : d.key));
|
|
1305
1453
|
break;
|
|
1306
|
-
case !!(
|
|
1307
|
-
b =
|
|
1454
|
+
case !!(d != null && d.record):
|
|
1455
|
+
b = d == null ? void 0 : d.record;
|
|
1308
1456
|
break;
|
|
1309
1457
|
}
|
|
1310
1458
|
if (!b)
|
|
1311
1459
|
throw new Error("未找到需要编辑的数据");
|
|
1312
|
-
return
|
|
1460
|
+
return n.value.open(ur, {
|
|
1313
1461
|
value: b,
|
|
1314
|
-
form:
|
|
1315
|
-
onSubmit:
|
|
1462
|
+
form: d == null ? void 0 : d.form,
|
|
1463
|
+
onSubmit: d.onSubmit
|
|
1316
1464
|
}, {
|
|
1317
|
-
title: (
|
|
1318
|
-
mode: (
|
|
1465
|
+
title: (d == null ? void 0 : d.title) || "编辑",
|
|
1466
|
+
mode: (d == null ? void 0 : d.mode) || "dialog",
|
|
1319
1467
|
footer: !0,
|
|
1320
1468
|
form: "form"
|
|
1321
1469
|
});
|
|
1322
1470
|
}
|
|
1323
|
-
function
|
|
1324
|
-
var
|
|
1471
|
+
function O(d) {
|
|
1472
|
+
var p, ee;
|
|
1325
1473
|
if (!e.dataLoad)
|
|
1326
|
-
return;
|
|
1327
|
-
|
|
1474
|
+
return Promise.reject();
|
|
1475
|
+
d != null && d.reset && (s && s.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
|
|
1328
1476
|
const b = {
|
|
1329
|
-
...((
|
|
1477
|
+
...((ee = a.value) == null ? void 0 : ee.formSource) || {}
|
|
1330
1478
|
};
|
|
1331
|
-
Object.keys(b).forEach((
|
|
1332
|
-
[null, void 0, ""].includes(b[
|
|
1479
|
+
Object.keys(b).forEach((te) => {
|
|
1480
|
+
[null, void 0, ""].includes(b[te]) && delete b[te];
|
|
1333
1481
|
});
|
|
1334
|
-
const
|
|
1482
|
+
const T = e.dataLoad({
|
|
1335
1483
|
form: b,
|
|
1336
|
-
page:
|
|
1484
|
+
page: s,
|
|
1337
1485
|
sort: y,
|
|
1338
1486
|
update: m
|
|
1339
1487
|
});
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
}));
|
|
1488
|
+
return P(T) ? (f.value = !0, Promise.resolve(T).finally(() => {
|
|
1489
|
+
f.value = !1;
|
|
1490
|
+
}), T) : Promise.resolve();
|
|
1343
1491
|
}
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1492
|
+
function be() {
|
|
1493
|
+
n.value.open(lr, {
|
|
1346
1494
|
collapsedColumns: w.value
|
|
1347
1495
|
}, {
|
|
1348
1496
|
title: "显示列",
|
|
1349
1497
|
size: "small",
|
|
1350
1498
|
footer: !0
|
|
1351
|
-
}).then((
|
|
1352
|
-
w.value =
|
|
1499
|
+
}).then((d) => {
|
|
1500
|
+
w.value = d;
|
|
1353
1501
|
});
|
|
1354
1502
|
}
|
|
1355
|
-
const
|
|
1503
|
+
const he = (d, {
|
|
1356
1504
|
type: b
|
|
1357
1505
|
}) => {
|
|
1358
1506
|
switch (b) {
|
|
1359
1507
|
case "drag": {
|
|
1360
|
-
m(
|
|
1508
|
+
m(d), t.emit("change", d);
|
|
1361
1509
|
break;
|
|
1362
1510
|
}
|
|
1363
1511
|
}
|
|
1364
|
-
},
|
|
1365
|
-
reload:
|
|
1366
|
-
preview:
|
|
1367
|
-
export:
|
|
1368
|
-
edit:
|
|
1369
|
-
collapse:
|
|
1512
|
+
}, $ = tt({
|
|
1513
|
+
reload: O,
|
|
1514
|
+
preview: g,
|
|
1515
|
+
export: E,
|
|
1516
|
+
edit: v,
|
|
1517
|
+
collapse: be
|
|
1370
1518
|
});
|
|
1371
|
-
function
|
|
1372
|
-
!y ||
|
|
1519
|
+
function ge(d, b) {
|
|
1520
|
+
!y || S === "client" || (b ? y.update(d, b === "descend" ? "desc" : "asc") : y.remove(d), $("reload"));
|
|
1373
1521
|
}
|
|
1374
|
-
const
|
|
1522
|
+
const Q = h(ie({
|
|
1375
1523
|
columns: e.columns,
|
|
1376
1524
|
columnsOptions: e.columnsOptions,
|
|
1377
1525
|
columnsGroups: e.columnsGroups,
|
|
1378
|
-
pageMode:
|
|
1526
|
+
pageMode: S,
|
|
1379
1527
|
collapsedColumns: w,
|
|
1380
|
-
events:
|
|
1381
|
-
})),
|
|
1382
|
-
tableEvents:
|
|
1383
|
-
tableForm:
|
|
1384
|
-
tableSource:
|
|
1385
|
-
formInstance:
|
|
1386
|
-
pageService:
|
|
1528
|
+
events: $
|
|
1529
|
+
})), Y = {
|
|
1530
|
+
tableEvents: $,
|
|
1531
|
+
tableForm: i,
|
|
1532
|
+
tableSource: c,
|
|
1533
|
+
formInstance: a,
|
|
1534
|
+
pageService: s,
|
|
1387
1535
|
formOptions: e.formOptions
|
|
1388
|
-
},
|
|
1389
|
-
selectedRowKeys:
|
|
1390
|
-
rowSelection:
|
|
1391
|
-
onSelect:
|
|
1392
|
-
onSelectAll:
|
|
1393
|
-
reloadSelection:
|
|
1394
|
-
resetSelection:
|
|
1395
|
-
} =
|
|
1536
|
+
}, we = rr(e, t, Y), ve = tr(e, t, Y), xe = ar(e, t, Y), {
|
|
1537
|
+
selectedRowKeys: X,
|
|
1538
|
+
rowSelection: Z,
|
|
1539
|
+
onSelect: Se,
|
|
1540
|
+
onSelectAll: Ce,
|
|
1541
|
+
reloadSelection: ke,
|
|
1542
|
+
resetSelection: Te
|
|
1543
|
+
} = nr(e, t, Y), Me = R(() => ({
|
|
1396
1544
|
rowKey: e.rowKey,
|
|
1397
1545
|
size: e.size,
|
|
1398
1546
|
bordered: e.bordered,
|
|
1399
1547
|
hoverable: e.hoverable,
|
|
1400
1548
|
stripe: e.stripe,
|
|
1401
1549
|
scroll: {
|
|
1402
|
-
x: e.columns.reduce((
|
|
1550
|
+
x: e.columns.reduce((d, b) => d += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
|
|
1403
1551
|
y: e.height ?? "100%"
|
|
1404
1552
|
},
|
|
1405
|
-
rowSelection:
|
|
1553
|
+
rowSelection: Z,
|
|
1406
1554
|
draggable: e.draggable ? {
|
|
1407
1555
|
type: "handle",
|
|
1408
1556
|
width: 40
|
|
1409
1557
|
} : void 0,
|
|
1410
1558
|
pagination: e.pageable === void 0 || e.pageable === "client",
|
|
1411
|
-
selectedKeys:
|
|
1559
|
+
selectedKeys: X.value,
|
|
1412
1560
|
expandable: e.expandable
|
|
1413
1561
|
}));
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1562
|
+
function _e() {
|
|
1563
|
+
Q.value = ie({
|
|
1416
1564
|
columns: e.columns,
|
|
1417
1565
|
columnsOptions: e.columnsOptions,
|
|
1418
1566
|
columnsGroups: e.columnsGroups,
|
|
1419
|
-
pageMode:
|
|
1567
|
+
pageMode: S,
|
|
1420
1568
|
collapsedColumns: w,
|
|
1421
|
-
events:
|
|
1569
|
+
events: $
|
|
1422
1570
|
});
|
|
1423
1571
|
}
|
|
1424
|
-
return
|
|
1425
|
-
l.value && (l.value.id = `table-${r}`), e.autoLoad &&
|
|
1572
|
+
return L(() => {
|
|
1573
|
+
l.value && (l.value.id = `table-${r}`), e.autoLoad && O(), e.grabbable && l.value && Zt(l.value);
|
|
1426
1574
|
}), {
|
|
1427
1575
|
tableId: r,
|
|
1428
1576
|
tableInstance: u,
|
|
1429
|
-
tableSource:
|
|
1430
|
-
tableOptions:
|
|
1431
|
-
tableColumns:
|
|
1432
|
-
tableEvents:
|
|
1433
|
-
tableForm:
|
|
1434
|
-
tableLoading:
|
|
1435
|
-
modalInstance:
|
|
1577
|
+
tableSource: c,
|
|
1578
|
+
tableOptions: Me,
|
|
1579
|
+
tableColumns: Q,
|
|
1580
|
+
tableEvents: $,
|
|
1581
|
+
tableForm: i,
|
|
1582
|
+
tableLoading: f,
|
|
1583
|
+
modalInstance: n,
|
|
1436
1584
|
tableRenderElement: l,
|
|
1437
|
-
formSource:
|
|
1438
|
-
var
|
|
1439
|
-
return (
|
|
1585
|
+
formSource: fe(R(() => {
|
|
1586
|
+
var d;
|
|
1587
|
+
return (d = a == null ? void 0 : a.value) == null ? void 0 : d.formSource;
|
|
1440
1588
|
})),
|
|
1441
|
-
formInstance:
|
|
1442
|
-
reload:
|
|
1443
|
-
preview:
|
|
1444
|
-
edit:
|
|
1445
|
-
export:
|
|
1446
|
-
onSorterChange:
|
|
1447
|
-
onTableChange:
|
|
1589
|
+
formInstance: a,
|
|
1590
|
+
reload: O,
|
|
1591
|
+
preview: g,
|
|
1592
|
+
edit: v,
|
|
1593
|
+
export: E,
|
|
1594
|
+
onSorterChange: ge,
|
|
1595
|
+
onTableChange: he,
|
|
1448
1596
|
renders: {
|
|
1449
|
-
renderTableForm:
|
|
1450
|
-
renderTableActions:
|
|
1451
|
-
renderTablePagination:
|
|
1597
|
+
renderTableForm: we,
|
|
1598
|
+
renderTableActions: ve,
|
|
1599
|
+
renderTablePagination: xe
|
|
1452
1600
|
},
|
|
1453
1601
|
tableSelection: {
|
|
1454
|
-
selectedRowKeys:
|
|
1455
|
-
rowSelection:
|
|
1456
|
-
onSelect:
|
|
1457
|
-
onSelectAll:
|
|
1602
|
+
selectedRowKeys: X,
|
|
1603
|
+
rowSelection: Z,
|
|
1604
|
+
onSelect: Se,
|
|
1605
|
+
onSelectAll: Ce
|
|
1458
1606
|
},
|
|
1459
|
-
resetSelection:
|
|
1460
|
-
reloadSelection:
|
|
1461
|
-
reloadColumns:
|
|
1607
|
+
resetSelection: Te,
|
|
1608
|
+
reloadSelection: ke,
|
|
1609
|
+
reloadColumns: _e
|
|
1462
1610
|
};
|
|
1463
1611
|
},
|
|
1464
1612
|
render() {
|
|
1465
1613
|
this.reloadColumns();
|
|
1466
|
-
const e = () =>
|
|
1614
|
+
const e = () => o("div", {
|
|
1467
1615
|
class: "table-body"
|
|
1468
|
-
}, [
|
|
1616
|
+
}, [o("div", {
|
|
1469
1617
|
class: "table-body-wrapper"
|
|
1470
|
-
}, [
|
|
1618
|
+
}, [o(Ge, se({
|
|
1471
1619
|
loading: this.tableLoading,
|
|
1472
1620
|
data: this.tableSource,
|
|
1473
1621
|
columns: this.tableColumns,
|
|
@@ -1480,38 +1628,38 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1480
1628
|
selectedKeys: this.tableSelection.selectedRowKeys.value,
|
|
1481
1629
|
"onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
|
|
1482
1630
|
}, this.tableOptions), null)])]);
|
|
1483
|
-
return
|
|
1631
|
+
return o("div", {
|
|
1484
1632
|
class: {
|
|
1485
1633
|
"table-render": !0,
|
|
1486
1634
|
"auto-fill": this.autoFill
|
|
1487
1635
|
},
|
|
1488
1636
|
ref: (t) => this.tableRenderElement = t
|
|
1489
|
-
}, [
|
|
1637
|
+
}, [o(Qe, {
|
|
1490
1638
|
ref: (t) => this.modalInstance = t
|
|
1491
1639
|
}, {
|
|
1492
|
-
default: () => [
|
|
1640
|
+
default: () => [o("div", {
|
|
1493
1641
|
class: "table-render-content"
|
|
1494
1642
|
}, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), e(), this.renders.renderTablePagination()])]
|
|
1495
1643
|
})]);
|
|
1496
1644
|
}
|
|
1497
1645
|
});
|
|
1498
|
-
function
|
|
1646
|
+
function br(e) {
|
|
1499
1647
|
return e;
|
|
1500
1648
|
}
|
|
1501
|
-
function
|
|
1649
|
+
function hr(e) {
|
|
1502
1650
|
return e;
|
|
1503
1651
|
}
|
|
1504
|
-
const
|
|
1652
|
+
const gr = {
|
|
1505
1653
|
install(e, t) {
|
|
1506
|
-
e.component("TableRender",
|
|
1654
|
+
e.component("TableRender", cr);
|
|
1507
1655
|
}
|
|
1508
1656
|
};
|
|
1509
1657
|
export {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1658
|
+
cr as TableRender,
|
|
1659
|
+
xr as TableRenderResolver,
|
|
1660
|
+
gr as default,
|
|
1661
|
+
br as defineColumns,
|
|
1662
|
+
hr as defineTableLoad,
|
|
1663
|
+
tt as useEvents,
|
|
1664
|
+
yr as useTable
|
|
1517
1665
|
};
|