@gopowerteam/table-render 0.0.150 → 0.0.152
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-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 +1 -1
- package/dist/cjs/table-columns/index.d.ts +3 -3
- package/dist/cjs/table-columns/phone/index.d.ts +4 -2
- 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 +40 -40
- package/dist/cjs/table-render/table-view-render.d.ts +2 -2
- package/dist/es/index.mjs +792 -579
- 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 +1 -1
- package/dist/es/table-columns/index.d.ts +3 -3
- package/dist/es/table-columns/phone/index.d.ts +4 -2
- 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 +40 -40
- package/dist/es/table-render/table-view-render.d.ts +2 -2
- 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
|
|
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 =
|
|
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 g, getCurrentInstance as F, onMounted as z, onUpdated as Ee, reactive as je, createVNode as s, Fragment as K, createTextVNode as q, getCurrentScope as $e, onScopeDispose as Le, unref as Pe, readonly as fe, computed as R, watchEffect as qe, watch as Ye, h as ze, render as Ae, defineComponent as A, isVNode as Be, mergeProps as se, nextTick as re, withDirectives as De, resolveDirective as Ie } from "vue";
|
|
5
|
+
import { Button as L, Tag as Ve, Dropdown as ne, Message as Fe, Descriptions as Ke, DescriptionsItem as We, Divider as He, Space as ae, Pagination as Ne, Transfer as Ue, Table as Ge } from "@arco-design/web-vue";
|
|
6
|
+
import { useModal as B, onSubmit as Je, ModalProvider as Qe } from "@gopowerteam/modal-render";
|
|
7
|
+
import * as Xe from "exceljs";
|
|
8
|
+
import D from "dayjs";
|
|
9
|
+
import { FormRender as oe } from "@gopowerteam/form-render";
|
|
10
|
+
import { TableRenderResolver as Cr } 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 = g([]), 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 = F(), r = g();
|
|
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 z(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 V {
|
|
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", je({
|
|
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 S(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
112
|
function Y(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 = B(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (f, d) => typeof f == "function" ? f(r) : f === void 0 ? d : f;
|
|
118
|
+
async function m(f) {
|
|
119
|
+
if (await (f.confirm === !0 ? new Promise((o) => {
|
|
120
|
+
n.confirm({
|
|
121
121
|
title: "提示信息",
|
|
122
|
-
content:
|
|
122
|
+
content: f.confirmText ?? "您确定要执行该操作?",
|
|
123
123
|
onOk: () => o(!0),
|
|
124
124
|
onCancel: () => o(!1)
|
|
125
125
|
});
|
|
126
|
-
}) : Promise.resolve(!0)) && (
|
|
127
|
-
const o =
|
|
128
|
-
Y(o) &&
|
|
129
|
-
|
|
130
|
-
}), !Y(o) &&
|
|
126
|
+
}) : Promise.resolve(!0)) && (f != null && f.onClick)) {
|
|
127
|
+
const o = f.onClick(r);
|
|
128
|
+
Y(o) && f.autoReload !== !1 && o.then(() => {
|
|
129
|
+
a != null && a.emits && (a == null || a.emits("reload"));
|
|
130
|
+
}), !Y(o) && f.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
return s(
|
|
134
|
-
onClick: () => m(
|
|
135
|
-
type:
|
|
136
|
-
shape:
|
|
133
|
+
return s(K, null, [l.filter((f) => c(f.visiable, !0)).map((f) => s(L, {
|
|
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
|
|
181
|
+
return x("dict", (n, l) => {
|
|
182
|
+
const c = S(n, l);
|
|
183
183
|
return s("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? s("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? s("span", null, [e.prefix()]) : void 0, s("span", {
|
|
184
184
|
class: "currency_value"
|
|
185
|
-
}, [u(
|
|
185
|
+
}, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ? s("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? s("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(D);
|
|
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,118 +234,118 @@ 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
|
+
D.locale("zh-cn");
|
|
246
|
+
const it = {
|
|
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 s("span", null, [l.isValid() && l.format(
|
|
252
|
+
function dt(e) {
|
|
253
|
+
return x("date", (r, u) => {
|
|
254
|
+
const a = S(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : it[(e == null ? void 0 : e.format) || "datetime"], l = D(a);
|
|
255
|
+
return s("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 ? s(
|
|
270
|
+
function mt(e) {
|
|
271
|
+
const t = st(e), r = ot(e);
|
|
272
|
+
return x("dict", (a, n) => {
|
|
273
|
+
const l = S(a, n);
|
|
274
|
+
return r ? s(Ve, {
|
|
275
275
|
color: r === !0 ? void 0 : r
|
|
276
276
|
}, {
|
|
277
277
|
default: () => [t.get(l) || l]
|
|
278
278
|
}) : s("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 = B();
|
|
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 s(
|
|
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 s(ne, {
|
|
296
296
|
trigger: (e == null ? void 0 : e.trigger) || "click"
|
|
297
297
|
}, {
|
|
298
|
-
default: () => s(
|
|
298
|
+
default: () => s(L, {
|
|
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) => s(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 = S(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
|
+
}, d = `${n.index || n.key}_parsed`;
|
|
341
341
|
if (e != null && e.parse) {
|
|
342
|
-
const o = e == null ? void 0 : e.parse(
|
|
343
|
-
Y(o) ? o.then((y) =>
|
|
342
|
+
const o = e == null ? void 0 : e.parse(c, a);
|
|
343
|
+
Y(o) ? o.then((y) => a[d] = y ?? "") : a[d] = o ?? "";
|
|
344
344
|
}
|
|
345
|
-
if (e != null && e.parse && !
|
|
346
|
-
return s("div", null, [
|
|
345
|
+
if (e != null && e.parse && !a[d] === void 0)
|
|
346
|
+
return s("div", null, [q("Loading...")]);
|
|
347
347
|
{
|
|
348
|
-
const o =
|
|
348
|
+
const o = a[d] || c;
|
|
349
349
|
return o ? s("div", {
|
|
350
350
|
id: m,
|
|
351
351
|
onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, o),
|
|
@@ -358,67 +358,372 @@ function dt(e) {
|
|
|
358
358
|
}
|
|
359
359
|
}, [s("img", {
|
|
360
360
|
alt: "image",
|
|
361
|
-
style:
|
|
361
|
+
style: f,
|
|
362
362
|
src: o
|
|
363
|
-
}, null)]) : s(
|
|
363
|
+
}, null)]) : s(K, null, null);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function W(e) {
|
|
368
|
+
return $e() ? (Le(e), !0) : !1;
|
|
369
|
+
}
|
|
370
|
+
function _(e) {
|
|
371
|
+
return typeof e == "function" ? e() : Pe(e);
|
|
372
|
+
}
|
|
373
|
+
const H = 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 Ct(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 xt(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 kt(e, t, r = {}) {
|
|
395
|
+
const {
|
|
396
|
+
immediate: u = !0
|
|
397
|
+
} = r, a = g(!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, H && m()), W(c), {
|
|
411
|
+
isPending: fe(a),
|
|
412
|
+
start: m,
|
|
413
|
+
stop: c
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function St(e) {
|
|
417
|
+
var t;
|
|
418
|
+
const r = _(e);
|
|
419
|
+
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
420
|
+
}
|
|
421
|
+
const N = H ? window : void 0, me = H ? 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 = N) : [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((d) => d()), n.length = 0;
|
|
429
|
+
}, c = (d, o, y, h) => (d.addEventListener(o, y, h), () => d.removeEventListener(o, y, h)), m = Ye(
|
|
430
|
+
() => [St(t), _(a)],
|
|
431
|
+
([d, o]) => {
|
|
432
|
+
if (l(), !d)
|
|
433
|
+
return;
|
|
434
|
+
const y = wt(o) ? { ...o } : o;
|
|
435
|
+
n.push(
|
|
436
|
+
...r.flatMap((h) => u.map((C) => c(d, h, C, y)))
|
|
437
|
+
);
|
|
438
|
+
},
|
|
439
|
+
{ immediate: !0, flush: "post" }
|
|
440
|
+
), f = () => {
|
|
441
|
+
m(), l();
|
|
442
|
+
};
|
|
443
|
+
return W(f), f;
|
|
444
|
+
}
|
|
445
|
+
function Tt() {
|
|
446
|
+
const e = g(!1), t = F();
|
|
447
|
+
return t && z(() => {
|
|
448
|
+
e.value = !0;
|
|
449
|
+
}, t), e;
|
|
450
|
+
}
|
|
451
|
+
function U(e) {
|
|
452
|
+
const t = Tt();
|
|
453
|
+
return R(() => (t.value, !!e()));
|
|
454
|
+
}
|
|
455
|
+
function $(e, t = {}) {
|
|
456
|
+
const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
457
|
+
let a;
|
|
458
|
+
const n = g(!1), l = (f) => {
|
|
459
|
+
n.value = f.matches;
|
|
460
|
+
}, c = () => {
|
|
461
|
+
a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
|
|
462
|
+
}, m = qe(() => {
|
|
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 W(() => {
|
|
466
|
+
m(), c(), a = void 0;
|
|
467
|
+
}), n;
|
|
468
|
+
}
|
|
469
|
+
function Mt(e, t = {}) {
|
|
470
|
+
function r(d, o) {
|
|
471
|
+
let y = _(e[_(d)]);
|
|
472
|
+
return o != null && (y = xt(y, o)), typeof y == "number" && (y = `${y}px`), y;
|
|
473
|
+
}
|
|
474
|
+
const { window: u = N, strategy: a = "min-width" } = t;
|
|
475
|
+
function n(d) {
|
|
476
|
+
return u ? u.matchMedia(d).matches : !1;
|
|
477
|
+
}
|
|
478
|
+
const l = (d) => $(() => `(min-width: ${r(d)})`, t), c = (d) => $(() => `(max-width: ${r(d)})`, t), m = Object.keys(e).reduce((d, o) => (Object.defineProperty(d, o, {
|
|
479
|
+
get: () => a === "min-width" ? l(o) : c(o),
|
|
480
|
+
enumerable: !0,
|
|
481
|
+
configurable: !0
|
|
482
|
+
}), d), {});
|
|
483
|
+
function f() {
|
|
484
|
+
const d = Object.keys(e).map((o) => [o, l(o)]);
|
|
485
|
+
return R(() => d.filter(([, o]) => o.value).map(([o]) => o));
|
|
486
|
+
}
|
|
487
|
+
return Object.assign(m, {
|
|
488
|
+
greaterOrEqual: l,
|
|
489
|
+
smallerOrEqual: c,
|
|
490
|
+
greater(d) {
|
|
491
|
+
return $(() => `(min-width: ${r(d, 0.1)})`, t);
|
|
492
|
+
},
|
|
493
|
+
smaller(d) {
|
|
494
|
+
return $(() => `(max-width: ${r(d, -0.1)})`, t);
|
|
495
|
+
},
|
|
496
|
+
between(d, o) {
|
|
497
|
+
return $(() => `(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`, t);
|
|
498
|
+
},
|
|
499
|
+
isGreater(d) {
|
|
500
|
+
return n(`(min-width: ${r(d, 0.1)})`);
|
|
501
|
+
},
|
|
502
|
+
isGreaterOrEqual(d) {
|
|
503
|
+
return n(`(min-width: ${r(d)})`);
|
|
504
|
+
},
|
|
505
|
+
isSmaller(d) {
|
|
506
|
+
return n(`(max-width: ${r(d, -0.1)})`);
|
|
507
|
+
},
|
|
508
|
+
isSmallerOrEqual(d) {
|
|
509
|
+
return n(`(max-width: ${r(d)})`);
|
|
510
|
+
},
|
|
511
|
+
isInBetween(d, o) {
|
|
512
|
+
return n(`(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`);
|
|
513
|
+
},
|
|
514
|
+
current: f,
|
|
515
|
+
active() {
|
|
516
|
+
const d = f();
|
|
517
|
+
return R(() => d.value.length === 0 ? "" : d.value.at(-1));
|
|
364
518
|
}
|
|
365
519
|
});
|
|
366
520
|
}
|
|
367
|
-
|
|
368
|
-
|
|
521
|
+
function ue(e, t = {}) {
|
|
522
|
+
const {
|
|
523
|
+
controls: r = !1,
|
|
524
|
+
navigator: u = me
|
|
525
|
+
} = t, a = U(() => u && "permissions" in u);
|
|
526
|
+
let n;
|
|
527
|
+
const l = typeof e == "string" ? { name: e } : e, c = g(), m = () => {
|
|
528
|
+
n && (c.value = n.state);
|
|
529
|
+
}, f = Ct(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 = U(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), f = R(() => l.value || n), d = g(""), o = g(!1), y = kt(() => o.value = !1, a);
|
|
554
|
+
function h() {
|
|
555
|
+
l.value && E(c.value) ? t.clipboard.readText().then((w) => {
|
|
556
|
+
d.value = w;
|
|
557
|
+
}) : d.value = I();
|
|
558
|
+
}
|
|
559
|
+
f.value && r && ye(["copy", "cut"], h);
|
|
560
|
+
async function C(w = _(u)) {
|
|
561
|
+
f.value && w != null && (l.value && E(m.value) ? await t.clipboard.writeText(w) : k(w), d.value = w, o.value = !0, y.start());
|
|
562
|
+
}
|
|
563
|
+
function k(w) {
|
|
564
|
+
const v = document.createElement("textarea");
|
|
565
|
+
v.value = w ?? "", 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 w, v, O;
|
|
569
|
+
return (O = (v = (w = document == null ? void 0 : document.getSelection) == null ? void 0 : w.call(document)) == null ? void 0 : v.toString()) != null ? O : "";
|
|
570
|
+
}
|
|
571
|
+
function E(w) {
|
|
572
|
+
return w === "granted" || w === "prompt";
|
|
573
|
+
}
|
|
574
|
+
return {
|
|
575
|
+
isSupported: f,
|
|
576
|
+
text: d,
|
|
577
|
+
copied: o,
|
|
578
|
+
copy: C
|
|
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
|
-
|
|
379
|
-
|
|
380
|
-
|
|
588
|
+
function Et(e) {
|
|
589
|
+
const t = _t();
|
|
590
|
+
return x("phone", (u, a) => {
|
|
591
|
+
const n = Math.random().toString(36).slice(2), l = S(u, a), c = ce(Rt(l), e == null ? void 0 : e.separator), m = ce(l, e == null ? void 0 : e.separator);
|
|
592
|
+
function f() {
|
|
593
|
+
window.focus(), t.copy(l).then(() => {
|
|
594
|
+
Fe.success({
|
|
595
|
+
content: "复制成功",
|
|
596
|
+
duration: 1e3
|
|
597
|
+
});
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
function d() {
|
|
601
|
+
const C = document.getElementById(n);
|
|
602
|
+
C && (C.innerHTML = m);
|
|
603
|
+
}
|
|
604
|
+
function o() {
|
|
605
|
+
window.open(`tel:${l}`, "_blank");
|
|
606
|
+
}
|
|
607
|
+
const y = 16, h = `cursor:pointer;width:${y}px;height:${y}px;`;
|
|
608
|
+
return s("div", {
|
|
609
|
+
style: "display:flex;align-items:center;gap:4px;"
|
|
610
|
+
}, [s("div", {
|
|
611
|
+
id: n,
|
|
612
|
+
style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
|
|
613
|
+
}, [e != null && e.safe ? c : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && s("i", {
|
|
614
|
+
title: "显示完整号码",
|
|
615
|
+
style: h,
|
|
616
|
+
onClick: d
|
|
617
|
+
}, [s("svg", {
|
|
618
|
+
width: y,
|
|
619
|
+
height: y,
|
|
620
|
+
viewBox: "0 0 48 48",
|
|
621
|
+
fill: "none",
|
|
622
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
623
|
+
}, [s("path", {
|
|
624
|
+
d: "M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",
|
|
625
|
+
fill: "none",
|
|
626
|
+
stroke: "#333",
|
|
627
|
+
"stroke-width": "2",
|
|
628
|
+
"stroke-linejoin": "round"
|
|
629
|
+
}, null), s("path", {
|
|
630
|
+
d: "M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",
|
|
631
|
+
fill: "none",
|
|
632
|
+
stroke: "#333",
|
|
633
|
+
"stroke-width": "4",
|
|
634
|
+
"stroke-linejoin": "round"
|
|
635
|
+
}, null)])]), (e == null ? void 0 : e.allowDial) && s("i", {
|
|
636
|
+
style: h,
|
|
637
|
+
title: "拨出号码",
|
|
638
|
+
onClick: o
|
|
639
|
+
}, [s("svg", {
|
|
640
|
+
width: y,
|
|
641
|
+
height: y,
|
|
642
|
+
viewBox: "0 0 48 48",
|
|
643
|
+
fill: "none",
|
|
644
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
645
|
+
}, [s("path", {
|
|
646
|
+
d: "M41.7796 20.6066C42.0324 18.9108 41.9495 17.1747 41.5309 15.5054C40.978 13.3002 39.8392 11.2118 38.1147 9.4873C36.3902 7.76281 34.3018 6.62409 32.0967 6.07115C30.4274 5.65257 28.6912 5.56967 26.9954 5.82245",
|
|
647
|
+
stroke: "#333",
|
|
648
|
+
"stroke-width": "2",
|
|
649
|
+
"stroke-linecap": "round",
|
|
650
|
+
"stroke-linejoin": "round"
|
|
651
|
+
}, null), s("path", {
|
|
652
|
+
d: "M34.1896 19.8035C34.4604 17.9869 33.8966 16.0699 32.4982 14.6715C31.0997 13.2731 29.1827 12.7092 27.3662 12.98",
|
|
653
|
+
stroke: "#333",
|
|
654
|
+
"stroke-width": "4",
|
|
655
|
+
"stroke-linecap": "round",
|
|
656
|
+
"stroke-linejoin": "round"
|
|
657
|
+
}, null), s("path", {
|
|
658
|
+
d: "M14.3755 8.79423C15.1021 8.79423 15.7715 9.18825 16.1241 9.82349L18.5706 14.2303C18.8909 14.8073 18.9059 15.5052 18.6108 16.0955L16.254 20.8091C16.254 20.8091 16.937 24.3206 19.7954 27.179C22.6538 30.0374 26.1535 30.7086 26.1535 30.7086L30.8664 28.3522C31.4571 28.0568 32.1555 28.0721 32.7327 28.393L37.152 30.85C37.7866 31.2028 38.1802 31.8719 38.1802 32.598L38.1802 37.6715C38.1802 40.2552 35.7803 42.1213 33.3322 41.2952C28.3043 39.5987 20.4996 36.3685 15.5528 31.4216C10.6059 26.4748 7.3757 18.6701 5.67916 13.6422C4.85314 11.1941 6.71923 8.79423 9.30288 8.79423L14.3755 8.79423Z",
|
|
659
|
+
fill: "none",
|
|
660
|
+
stroke: "#333",
|
|
661
|
+
"stroke-width": "4",
|
|
662
|
+
"stroke-linejoin": "round"
|
|
663
|
+
}, null)])]), (e == null ? void 0 : e.allowCopy) && s("i", {
|
|
664
|
+
style: h,
|
|
665
|
+
title: "复制号码",
|
|
666
|
+
onClick: f
|
|
667
|
+
}, [s("svg", {
|
|
668
|
+
width: y,
|
|
669
|
+
height: y,
|
|
670
|
+
viewBox: "0 0 48 48",
|
|
671
|
+
fill: "none",
|
|
672
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
673
|
+
}, [s("path", {
|
|
674
|
+
d: "M13 12.4316V7.8125C13 6.2592 14.2592 5 15.8125 5H40.1875C41.7408 5 43 6.2592 43 7.8125V32.1875C43 33.7408 41.7408 35 40.1875 35H35.5163",
|
|
675
|
+
stroke: "#333",
|
|
676
|
+
"stroke-width": "2",
|
|
677
|
+
"stroke-linecap": "round",
|
|
678
|
+
"stroke-linejoin": "round"
|
|
679
|
+
}, null), s("path", {
|
|
680
|
+
d: "M32.1875 13H7.8125C6.2592 13 5 14.2592 5 15.8125V40.1875C5 41.7408 6.2592 43 7.8125 43H32.1875C33.7408 43 35 41.7408 35 40.1875V15.8125C35 14.2592 33.7408 13 32.1875 13Z",
|
|
681
|
+
fill: "none",
|
|
682
|
+
stroke: "#333",
|
|
683
|
+
"stroke-width": "4",
|
|
684
|
+
"stroke-linejoin": "round"
|
|
685
|
+
}, null)])])]);
|
|
381
686
|
});
|
|
382
687
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
688
|
+
function jt(e) {
|
|
689
|
+
return x("render", (r) => e(r));
|
|
385
690
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
388
|
-
const
|
|
691
|
+
function $t(e) {
|
|
692
|
+
return x("tag", (r, u) => {
|
|
693
|
+
const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : S(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;
|
|
389
694
|
return s("div", {
|
|
390
695
|
style: {
|
|
391
696
|
display: "flex",
|
|
392
697
|
flexWrap: "wrap"
|
|
393
698
|
}
|
|
394
|
-
}, [
|
|
395
|
-
const y = typeof l == "function" ? l(
|
|
699
|
+
}, [n.slice(0, a).map((d, o) => {
|
|
700
|
+
const y = typeof l == "function" ? l(d, o) : l[o % l.length], h = typeof c == "function" ? c(d, o) : c[o % c.length];
|
|
396
701
|
return s("span", {
|
|
397
702
|
style: {
|
|
398
|
-
minWidth:
|
|
703
|
+
minWidth: f ? `${f}px` : "unset",
|
|
399
704
|
textAlign: "center",
|
|
400
705
|
margin: "2px",
|
|
401
706
|
padding: "2px 5px",
|
|
402
707
|
border: `solid 2px ${e != null && e.border ? y : "transparent"}`,
|
|
403
708
|
borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
|
|
404
709
|
color: y,
|
|
405
|
-
backgroundColor:
|
|
710
|
+
backgroundColor: h
|
|
406
711
|
}
|
|
407
|
-
}, [
|
|
712
|
+
}, [d]);
|
|
408
713
|
}), m && "..."]);
|
|
409
714
|
});
|
|
410
715
|
}
|
|
411
|
-
function
|
|
716
|
+
function ie(e) {
|
|
412
717
|
if (typeof e == "string")
|
|
413
718
|
return e;
|
|
414
719
|
if (typeof e == "number")
|
|
415
720
|
return `${e}px`;
|
|
416
721
|
}
|
|
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" ? (
|
|
722
|
+
function Lt(e, t, r) {
|
|
723
|
+
var u, a;
|
|
724
|
+
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 : S(r, t);
|
|
420
725
|
}
|
|
421
|
-
function
|
|
726
|
+
function Pt(e, t) {
|
|
422
727
|
if (typeof e != "function") {
|
|
423
728
|
if (typeof (e == null ? void 0 : e.color) == "function")
|
|
424
729
|
return e == null ? void 0 : e.color(t);
|
|
@@ -426,103 +731,103 @@ function yt(e, t) {
|
|
|
426
731
|
return e == null ? void 0 : e.color;
|
|
427
732
|
}
|
|
428
733
|
}
|
|
429
|
-
function
|
|
734
|
+
function qt(e, t) {
|
|
430
735
|
if (typeof e != "function")
|
|
431
|
-
return typeof (e == null ? void 0 : e.size) == "function" ?
|
|
736
|
+
return typeof (e == null ? void 0 : e.size) == "function" ? ie(e == null ? void 0 : e.size(t)) : ie(e == null ? void 0 : e.size);
|
|
432
737
|
}
|
|
433
|
-
function
|
|
738
|
+
function Yt(e, t) {
|
|
434
739
|
let r = "";
|
|
435
|
-
const u =
|
|
436
|
-
return u && (r += `color:${u};`),
|
|
740
|
+
const u = Pt(e, t), a = qt(e, t);
|
|
741
|
+
return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
|
|
437
742
|
}
|
|
438
|
-
function
|
|
439
|
-
return
|
|
440
|
-
const
|
|
743
|
+
function zt(e) {
|
|
744
|
+
return x("text", (r, u) => {
|
|
745
|
+
const a = Lt(e || {}, u, r), n = Yt(e || {}, r);
|
|
441
746
|
return s("span", {
|
|
442
|
-
style:
|
|
443
|
-
}, [
|
|
747
|
+
style: n
|
|
748
|
+
}, [a]);
|
|
444
749
|
});
|
|
445
750
|
}
|
|
446
|
-
function
|
|
751
|
+
function At() {
|
|
447
752
|
return {
|
|
448
|
-
dropdown:
|
|
449
|
-
text:
|
|
450
|
-
dict:
|
|
451
|
-
tag:
|
|
452
|
-
render:
|
|
453
|
-
phone:
|
|
454
|
-
image:
|
|
455
|
-
currency:
|
|
456
|
-
date:
|
|
457
|
-
button:
|
|
753
|
+
dropdown: yt,
|
|
754
|
+
text: zt,
|
|
755
|
+
dict: mt,
|
|
756
|
+
tag: $t,
|
|
757
|
+
render: jt,
|
|
758
|
+
phone: Et,
|
|
759
|
+
image: ht,
|
|
760
|
+
currency: lt,
|
|
761
|
+
date: dt,
|
|
762
|
+
button: nt
|
|
458
763
|
};
|
|
459
764
|
}
|
|
460
|
-
function
|
|
765
|
+
function G(e, t) {
|
|
461
766
|
if (!(e != null && e.render))
|
|
462
767
|
return;
|
|
463
768
|
const r = e.render({
|
|
464
|
-
...
|
|
769
|
+
...At()
|
|
465
770
|
// ...(Table?.$override?.table || {}),
|
|
466
771
|
});
|
|
467
772
|
return {
|
|
468
773
|
render: ({
|
|
469
774
|
record: u
|
|
470
775
|
}) => r(u, e, t),
|
|
471
|
-
[
|
|
776
|
+
[rt]: r.$type,
|
|
472
777
|
disableColumnMode: r.$disableColumnMode,
|
|
473
778
|
disableViewMode: r.$disableViewMode,
|
|
474
779
|
isRender: r.$type === "render",
|
|
475
780
|
type: r.$type
|
|
476
781
|
};
|
|
477
782
|
}
|
|
478
|
-
function
|
|
783
|
+
function de({
|
|
479
784
|
columns: e,
|
|
480
785
|
columnsOptions: t,
|
|
481
786
|
columnsGroups: r,
|
|
482
787
|
pageMode: u,
|
|
483
|
-
collapsedColumns:
|
|
484
|
-
events:
|
|
788
|
+
collapsedColumns: a,
|
|
789
|
+
events: n
|
|
485
790
|
}) {
|
|
486
|
-
const l = e.map((
|
|
791
|
+
const l = e.map((c) => ({
|
|
487
792
|
...t || {},
|
|
488
|
-
...
|
|
489
|
-
})).map((
|
|
490
|
-
return
|
|
793
|
+
...c
|
|
794
|
+
})).map((c) => It(c, u, a, n)).filter(Boolean);
|
|
795
|
+
return Dt(l, r);
|
|
491
796
|
}
|
|
492
|
-
function
|
|
493
|
-
const r = [], u = (
|
|
494
|
-
if ("children" in
|
|
495
|
-
const l = t.find((
|
|
797
|
+
function Bt(e, t) {
|
|
798
|
+
const r = [], u = (n) => {
|
|
799
|
+
if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
|
|
800
|
+
const l = t.find((c) => {
|
|
496
801
|
var m;
|
|
497
|
-
return ((m = Object.getOwnPropertyDescriptor(
|
|
802
|
+
return ((m = Object.getOwnPropertyDescriptor(c, "key")) == null ? void 0 : m.value) === n.key;
|
|
498
803
|
});
|
|
499
804
|
if (l)
|
|
500
805
|
return r.push(l), l;
|
|
501
806
|
}
|
|
502
|
-
return
|
|
503
|
-
},
|
|
504
|
-
if (r != null && r.length &&
|
|
505
|
-
const
|
|
807
|
+
return n;
|
|
808
|
+
}, a = u(e);
|
|
809
|
+
if (r != null && r.length && a) {
|
|
810
|
+
const n = Math.min(...r.map((l) => t.indexOf(l)));
|
|
506
811
|
r.forEach((l) => {
|
|
507
|
-
const
|
|
508
|
-
t.splice(
|
|
509
|
-
}), t.splice(
|
|
812
|
+
const c = t.indexOf(l);
|
|
813
|
+
t.splice(c, 1);
|
|
814
|
+
}), t.splice(n, 0, a);
|
|
510
815
|
}
|
|
511
816
|
}
|
|
512
|
-
function
|
|
817
|
+
function Dt(e, t = []) {
|
|
513
818
|
return t.forEach((r) => {
|
|
514
|
-
|
|
819
|
+
Bt(r, e);
|
|
515
820
|
}), e;
|
|
516
821
|
}
|
|
517
|
-
function
|
|
822
|
+
function It(e, t, r, u) {
|
|
518
823
|
const {
|
|
519
|
-
render:
|
|
520
|
-
disableColumnMode:
|
|
521
|
-
} =
|
|
824
|
+
render: a,
|
|
825
|
+
disableColumnMode: n
|
|
826
|
+
} = G(e, {
|
|
522
827
|
previewing: !1,
|
|
523
828
|
emits: u
|
|
524
829
|
}) || {};
|
|
525
|
-
if (!(
|
|
830
|
+
if (!(n || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !r.value.find((l) => l.key === e.key && l.collapsed === !0))
|
|
526
831
|
return {
|
|
527
832
|
dataIndex: e.index || e.key,
|
|
528
833
|
title: e.title,
|
|
@@ -538,13 +843,13 @@ function kt(e, t, r, u) {
|
|
|
538
843
|
tooltip: !0,
|
|
539
844
|
...e.extraProps,
|
|
540
845
|
key: e.key,
|
|
541
|
-
render:
|
|
846
|
+
render: a
|
|
542
847
|
};
|
|
543
848
|
}
|
|
544
|
-
function
|
|
545
|
-
return new
|
|
849
|
+
function Vt() {
|
|
850
|
+
return new Xe.Workbook();
|
|
546
851
|
}
|
|
547
|
-
function
|
|
852
|
+
function Ft(e, t = "Sheet1") {
|
|
548
853
|
return e.addWorksheet(t, {
|
|
549
854
|
headerFooter: {
|
|
550
855
|
firstHeader: "",
|
|
@@ -552,55 +857,55 @@ function Tt(e, t = "Sheet1") {
|
|
|
552
857
|
}
|
|
553
858
|
});
|
|
554
859
|
}
|
|
555
|
-
function
|
|
860
|
+
function Kt(e, t) {
|
|
556
861
|
e.columns = t;
|
|
557
862
|
}
|
|
558
|
-
function
|
|
863
|
+
function Wt(e, t) {
|
|
559
864
|
e.addRows(t);
|
|
560
865
|
}
|
|
561
|
-
async function
|
|
866
|
+
async function Ht({
|
|
562
867
|
columns: e,
|
|
563
868
|
rows: t,
|
|
564
869
|
filename: r
|
|
565
870
|
}) {
|
|
566
|
-
const u =
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
871
|
+
const u = Vt(), a = Ft(u);
|
|
872
|
+
Kt(a, e), Wt(a, t);
|
|
873
|
+
const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
|
|
874
|
+
Nt(l, r || `${D().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
|
|
570
875
|
}
|
|
571
|
-
function
|
|
876
|
+
function Nt(e, t) {
|
|
572
877
|
const r = document.createElement("a");
|
|
573
878
|
r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
|
|
574
879
|
URL.revokeObjectURL(r.href);
|
|
575
880
|
}, 1e3);
|
|
576
881
|
}
|
|
577
|
-
function
|
|
882
|
+
function Ut(e, t) {
|
|
578
883
|
const r = {};
|
|
579
|
-
return e.filter((
|
|
580
|
-
options:
|
|
581
|
-
render:
|
|
582
|
-
content: typeof
|
|
583
|
-
})).forEach((
|
|
584
|
-
var
|
|
585
|
-
const
|
|
884
|
+
return e.filter((a) => a.exportable !== !1).map((a) => ({
|
|
885
|
+
options: a,
|
|
886
|
+
render: G(a),
|
|
887
|
+
content: typeof a.exportable == "object" ? a.exportable.content : void 0
|
|
888
|
+
})).forEach((a) => {
|
|
889
|
+
var c;
|
|
890
|
+
const n = (c = a.render) == null ? void 0 : c.render, l = () => {
|
|
586
891
|
var m;
|
|
587
892
|
switch (!0) {
|
|
588
|
-
case !!
|
|
589
|
-
return
|
|
590
|
-
case !!
|
|
591
|
-
const
|
|
893
|
+
case !!a.content:
|
|
894
|
+
return a.content && a.content(t);
|
|
895
|
+
case !!n: {
|
|
896
|
+
const f = document.createElement("div"), d = ze(() => n && n({
|
|
592
897
|
record: t
|
|
593
898
|
}));
|
|
594
|
-
return
|
|
899
|
+
return Ae(d, f), (m = d.el) == null ? void 0 : m.innerText;
|
|
595
900
|
}
|
|
596
901
|
default:
|
|
597
|
-
return
|
|
902
|
+
return S(t, a.options);
|
|
598
903
|
}
|
|
599
904
|
};
|
|
600
|
-
r[
|
|
905
|
+
r[a.options.key] = l();
|
|
601
906
|
}), r;
|
|
602
907
|
}
|
|
603
|
-
function
|
|
908
|
+
function Gt(e) {
|
|
604
909
|
switch (!0) {
|
|
605
910
|
case typeof e == "number":
|
|
606
911
|
return e / 6;
|
|
@@ -610,31 +915,31 @@ function Yt(e) {
|
|
|
610
915
|
return 30;
|
|
611
916
|
}
|
|
612
917
|
}
|
|
613
|
-
function
|
|
614
|
-
const u = e.filter((
|
|
615
|
-
var l,
|
|
918
|
+
function Jt(e, t, r) {
|
|
919
|
+
const u = e.filter((n) => n.exportable !== !1).map((n) => {
|
|
920
|
+
var l, c;
|
|
616
921
|
return {
|
|
617
|
-
key:
|
|
618
|
-
header: ((l =
|
|
619
|
-
width: ((
|
|
922
|
+
key: n.key,
|
|
923
|
+
header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
|
|
924
|
+
width: ((c = n.exportable) == null ? void 0 : c.width) || Gt(n.width)
|
|
620
925
|
};
|
|
621
|
-
}),
|
|
622
|
-
|
|
926
|
+
}), a = t.map((n) => Ut(e, n));
|
|
927
|
+
Ht({
|
|
623
928
|
columns: u,
|
|
624
|
-
rows:
|
|
929
|
+
rows: a,
|
|
625
930
|
filename: r
|
|
626
931
|
});
|
|
627
932
|
}
|
|
628
|
-
function
|
|
933
|
+
function Qt() {
|
|
629
934
|
return {
|
|
630
|
-
exportExcel:
|
|
935
|
+
exportExcel: Jt
|
|
631
936
|
};
|
|
632
937
|
}
|
|
633
|
-
class
|
|
938
|
+
class J {
|
|
634
939
|
constructor(t) {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
940
|
+
M(this, "sort", {});
|
|
941
|
+
M(this, "defaultSort", {});
|
|
942
|
+
M(this, "before", (t) => {
|
|
638
943
|
t.paramsQuery = {
|
|
639
944
|
...t.paramsQuery || {},
|
|
640
945
|
sort: this.stringify(this.sort)
|
|
@@ -656,8 +961,8 @@ class K {
|
|
|
656
961
|
*/
|
|
657
962
|
remove(t) {
|
|
658
963
|
const r = Object.entries(this.sort).filter(([u]) => u !== t);
|
|
659
|
-
this.sort = {}, r && r.forEach(([u,
|
|
660
|
-
this.sort[u] =
|
|
964
|
+
this.sort = {}, r && r.forEach(([u, a]) => {
|
|
965
|
+
this.sort[u] = a;
|
|
661
966
|
});
|
|
662
967
|
}
|
|
663
968
|
/**
|
|
@@ -670,35 +975,35 @@ class K {
|
|
|
670
975
|
* 转换排序对象为字符串
|
|
671
976
|
*/
|
|
672
977
|
stringify(t) {
|
|
673
|
-
return typeof t != "object" ? [] : (t instanceof
|
|
978
|
+
return typeof t != "object" ? [] : (t instanceof J && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
|
|
674
979
|
}
|
|
675
980
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
981
|
+
const Xt = 300;
|
|
982
|
+
function Zt(e) {
|
|
678
983
|
const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
|
|
679
984
|
if (!r)
|
|
680
985
|
return;
|
|
681
|
-
let u,
|
|
986
|
+
let u, a = !1, n;
|
|
682
987
|
r.addEventListener("mousedown", () => {
|
|
683
988
|
console.log("mousedown"), u = setTimeout(() => {
|
|
684
|
-
u && (r.style.cursor = "grab", r.style.userSelect = "none",
|
|
685
|
-
},
|
|
989
|
+
u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
|
|
990
|
+
}, Xt);
|
|
686
991
|
}), r.addEventListener("mouseup", () => {
|
|
687
|
-
clearTimeout(u), u && (u = void 0,
|
|
992
|
+
clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
|
|
688
993
|
}), r.addEventListener("mousemove", (l) => {
|
|
689
|
-
if (
|
|
690
|
-
if (
|
|
691
|
-
|
|
994
|
+
if (a)
|
|
995
|
+
if (n === void 0)
|
|
996
|
+
n = l.clientX;
|
|
692
997
|
else {
|
|
693
|
-
const
|
|
694
|
-
|
|
998
|
+
const c = n - l.clientX;
|
|
999
|
+
n = l.clientX, r.scrollLeft += c;
|
|
695
1000
|
}
|
|
696
1001
|
});
|
|
697
1002
|
}
|
|
698
|
-
function
|
|
699
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1003
|
+
function pt(e) {
|
|
1004
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
|
|
700
1005
|
}
|
|
701
|
-
const
|
|
1006
|
+
const er = /* @__PURE__ */ A({
|
|
702
1007
|
props: {
|
|
703
1008
|
record: {
|
|
704
1009
|
type: Object,
|
|
@@ -732,60 +1037,60 @@ const Pt = /* @__PURE__ */ E({
|
|
|
732
1037
|
}
|
|
733
1038
|
},
|
|
734
1039
|
setup(e) {
|
|
735
|
-
const t =
|
|
736
|
-
options:
|
|
737
|
-
renderer:
|
|
1040
|
+
const t = F(), r = g(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
|
|
1041
|
+
options: n,
|
|
1042
|
+
renderer: G(n, {
|
|
738
1043
|
previewing: !0
|
|
739
1044
|
})
|
|
740
1045
|
})).filter(({
|
|
741
|
-
options:
|
|
1046
|
+
options: n
|
|
742
1047
|
}) => {
|
|
743
1048
|
var l;
|
|
744
|
-
return !((l = e.exclude) != null && l.includes(
|
|
1049
|
+
return !((l = e.exclude) != null && l.includes(n.key));
|
|
745
1050
|
}).filter(({
|
|
746
|
-
renderer:
|
|
747
|
-
}) => !(
|
|
748
|
-
function
|
|
749
|
-
var
|
|
1051
|
+
renderer: n
|
|
1052
|
+
}) => !(n != null && n.disableViewMode));
|
|
1053
|
+
function a() {
|
|
1054
|
+
var n;
|
|
750
1055
|
if (t) {
|
|
751
|
-
const l = (
|
|
1056
|
+
const l = (n = t.proxy) == null ? void 0 : n.$el;
|
|
752
1057
|
r.value = Math.floor(l.offsetWidth / e.minWidth);
|
|
753
1058
|
}
|
|
754
1059
|
}
|
|
755
|
-
return
|
|
756
|
-
|
|
1060
|
+
return z(() => {
|
|
1061
|
+
a();
|
|
757
1062
|
}), () => {
|
|
758
|
-
let
|
|
1063
|
+
let n;
|
|
759
1064
|
return s("div", {
|
|
760
1065
|
class: "preview-container"
|
|
761
|
-
}, [s(
|
|
1066
|
+
}, [s(Ke, {
|
|
762
1067
|
column: r.value,
|
|
763
1068
|
bordered: !0,
|
|
764
1069
|
align: "left",
|
|
765
1070
|
layout: e.layout
|
|
766
|
-
},
|
|
1071
|
+
}, pt(n = u.map((l) => s(We, {
|
|
767
1072
|
label: l.options.title
|
|
768
1073
|
}, {
|
|
769
1074
|
default: () => {
|
|
770
|
-
var
|
|
771
|
-
return [(
|
|
1075
|
+
var c, m;
|
|
1076
|
+
return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
|
|
772
1077
|
record: e.record
|
|
773
|
-
}) :
|
|
1078
|
+
}) : S(e.record, l.options)];
|
|
774
1079
|
}
|
|
775
|
-
}))) ?
|
|
776
|
-
default: () => [
|
|
1080
|
+
}))) ? n : {
|
|
1081
|
+
default: () => [n]
|
|
777
1082
|
})]);
|
|
778
1083
|
};
|
|
779
1084
|
}
|
|
780
1085
|
});
|
|
781
|
-
function
|
|
1086
|
+
function tr(e, t, {
|
|
782
1087
|
tableForm: r,
|
|
783
1088
|
tableEvents: u
|
|
784
1089
|
}) {
|
|
785
|
-
const
|
|
786
|
-
return
|
|
1090
|
+
const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
|
|
1091
|
+
return a || n ? () => s(K, null, [n && s(He, {
|
|
787
1092
|
margin: 0
|
|
788
|
-
}, null),
|
|
1093
|
+
}, null), a && s("div", {
|
|
789
1094
|
class: "table-actions",
|
|
790
1095
|
style: {
|
|
791
1096
|
display: "flex",
|
|
@@ -796,40 +1101,40 @@ function Dt(e, t, {
|
|
|
796
1101
|
}
|
|
797
1102
|
}, [s("div", {
|
|
798
1103
|
class: "built-in"
|
|
799
|
-
}, [s(
|
|
800
|
-
default: () => [e.refreshable && s(
|
|
1104
|
+
}, [s(ae, null, {
|
|
1105
|
+
default: () => [e.refreshable && s(L, {
|
|
801
1106
|
type: "primary",
|
|
802
1107
|
onClick: () => u("reload")
|
|
803
1108
|
}, {
|
|
804
|
-
default: () => [
|
|
805
|
-
}), e.exportable && s(
|
|
1109
|
+
default: () => [q("刷新")]
|
|
1110
|
+
}), e.exportable && s(L, {
|
|
806
1111
|
type: "primary",
|
|
807
1112
|
onClick: () => u("export")
|
|
808
1113
|
}, {
|
|
809
|
-
default: () => [
|
|
810
|
-
}), e.collapsable && s(
|
|
1114
|
+
default: () => [q("导出")]
|
|
1115
|
+
}), e.collapsable && s(L, {
|
|
811
1116
|
type: "primary",
|
|
812
1117
|
onClick: () => u("collapse")
|
|
813
1118
|
}, {
|
|
814
|
-
default: () => [
|
|
1119
|
+
default: () => [q("显示")]
|
|
815
1120
|
})]
|
|
816
1121
|
})]), s("div", {
|
|
817
1122
|
class: "customs"
|
|
818
|
-
}, [s(
|
|
1123
|
+
}, [s(ae, null, {
|
|
819
1124
|
default: () => [t.slots.actions && t.slots.actions()]
|
|
820
1125
|
})])])]) : () => {
|
|
821
1126
|
};
|
|
822
1127
|
}
|
|
823
|
-
function
|
|
1128
|
+
function rr(e, t, {
|
|
824
1129
|
tableForm: r,
|
|
825
1130
|
tableEvents: u,
|
|
826
|
-
formInstance:
|
|
1131
|
+
formInstance: a
|
|
827
1132
|
}) {
|
|
828
1133
|
return r != null && r.length ? () => s("div", {
|
|
829
1134
|
class: "table-form"
|
|
830
|
-
}, [s(
|
|
1135
|
+
}, [s(oe, se({
|
|
831
1136
|
form: r,
|
|
832
|
-
ref: (
|
|
1137
|
+
ref: (n) => a && (a.value = n),
|
|
833
1138
|
searchable: !0,
|
|
834
1139
|
onSubmit: () => u("reload", {
|
|
835
1140
|
reset: !0
|
|
@@ -837,173 +1142,81 @@ function At(e, t, {
|
|
|
837
1142
|
}, e.formOptions), null)]) : () => {
|
|
838
1143
|
};
|
|
839
1144
|
}
|
|
840
|
-
function
|
|
1145
|
+
function nr(e, t, {
|
|
841
1146
|
tableSource: r
|
|
842
1147
|
}) {
|
|
843
|
-
const u =
|
|
844
|
-
function
|
|
1148
|
+
const u = g([]);
|
|
1149
|
+
function a() {
|
|
845
1150
|
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
1151
|
}
|
|
847
|
-
function
|
|
848
|
-
|
|
849
|
-
e.checkboxRows !== void 0 && (u.value = [...e.checkboxRows.map((
|
|
1152
|
+
function n() {
|
|
1153
|
+
re(() => {
|
|
1154
|
+
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
1155
|
});
|
|
851
1156
|
}
|
|
852
1157
|
function l() {
|
|
853
|
-
const
|
|
1158
|
+
const f = typeof e.selection == "string" ? {
|
|
854
1159
|
type: e.selection
|
|
855
1160
|
} : e.selection;
|
|
856
|
-
switch (
|
|
1161
|
+
switch (f == null ? void 0 : f.type) {
|
|
857
1162
|
case "radio":
|
|
858
1163
|
return {
|
|
859
1164
|
title: "选择",
|
|
860
|
-
...
|
|
1165
|
+
...f,
|
|
861
1166
|
selectedRowKeys: u.value
|
|
862
1167
|
};
|
|
863
1168
|
case "checkbox":
|
|
864
1169
|
return {
|
|
865
1170
|
showCheckedAll: !0,
|
|
866
1171
|
selectedRowKeys: u.value,
|
|
867
|
-
...
|
|
1172
|
+
...f
|
|
868
1173
|
};
|
|
869
1174
|
}
|
|
870
1175
|
}
|
|
871
|
-
function
|
|
1176
|
+
function c(f, d, o) {
|
|
872
1177
|
const {
|
|
873
1178
|
type: y
|
|
874
1179
|
} = l() || {};
|
|
875
1180
|
switch (y) {
|
|
876
1181
|
case "radio":
|
|
877
|
-
t.emit("update:radio-key",
|
|
1182
|
+
t.emit("update:radio-key", d), t.emit("update:radio-row", o);
|
|
878
1183
|
break;
|
|
879
1184
|
case "checkbox":
|
|
880
|
-
t.emit("update:checkbox-keys",
|
|
881
|
-
var
|
|
882
|
-
return r.value.find((
|
|
1185
|
+
t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((h) => {
|
|
1186
|
+
var C;
|
|
1187
|
+
return r.value.find((k) => k[e.rowKey] === h) || ((C = e.checkboxRows) == null ? void 0 : C.find((k) => k[e.rowKey] === h));
|
|
883
1188
|
}));
|
|
884
1189
|
break;
|
|
885
1190
|
}
|
|
886
1191
|
}
|
|
887
1192
|
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((o) => o[e.rowKey] ===
|
|
1193
|
+
re(() => {
|
|
1194
|
+
t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((f) => {
|
|
1195
|
+
var d;
|
|
1196
|
+
return r.value.find((o) => o[e.rowKey] === f) || ((d = e.checkboxRows) == null ? void 0 : d.find((o) => o[e.rowKey] === f));
|
|
892
1197
|
}));
|
|
893
1198
|
});
|
|
894
1199
|
}
|
|
895
|
-
return
|
|
1200
|
+
return n(), {
|
|
896
1201
|
selectedRowKeys: u,
|
|
897
1202
|
rowSelection: l(),
|
|
898
|
-
onSelect:
|
|
1203
|
+
onSelect: c,
|
|
899
1204
|
onSelectAll: m,
|
|
900
|
-
resetSelection:
|
|
901
|
-
reloadSelection:
|
|
1205
|
+
resetSelection: a,
|
|
1206
|
+
reloadSelection: n
|
|
902
1207
|
};
|
|
903
1208
|
}
|
|
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(/^-?\d+\.?\d*/)) == 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, {
|
|
1209
|
+
function ar(e, t, {
|
|
997
1210
|
pageService: r,
|
|
998
1211
|
tableEvents: u
|
|
999
1212
|
}) {
|
|
1000
|
-
function
|
|
1001
|
-
r && (r.pageIndex =
|
|
1213
|
+
function a(c) {
|
|
1214
|
+
r && (r.pageIndex = c, u("reload"));
|
|
1002
1215
|
}
|
|
1003
|
-
function
|
|
1004
|
-
r && (r.pageSize =
|
|
1216
|
+
function n(c) {
|
|
1217
|
+
r && (r.pageSize = c, u("reload"));
|
|
1005
1218
|
}
|
|
1006
|
-
const l =
|
|
1219
|
+
const l = Mt({
|
|
1007
1220
|
mobile: 0,
|
|
1008
1221
|
tablet: 640,
|
|
1009
1222
|
desktop: 1024
|
|
@@ -1013,26 +1226,26 @@ function Ut(e, t, {
|
|
|
1013
1226
|
style: {
|
|
1014
1227
|
padding: "10px 0"
|
|
1015
1228
|
}
|
|
1016
|
-
}, [s(
|
|
1229
|
+
}, [s(Ne, {
|
|
1017
1230
|
current: r.pageIndex,
|
|
1018
|
-
"onUpdate:current": (
|
|
1231
|
+
"onUpdate:current": (c) => r.pageIndex = c,
|
|
1019
1232
|
"page-size": r.pageSize,
|
|
1020
|
-
"onUpdate:page-size": (
|
|
1233
|
+
"onUpdate:page-size": (c) => r.pageSize = c,
|
|
1021
1234
|
total: r.total,
|
|
1022
1235
|
"page-size-options": r.pageSizeOpts,
|
|
1023
1236
|
"hide-on-single-page": !e.alwayShowPagination,
|
|
1024
1237
|
"show-total": !0,
|
|
1025
1238
|
"show-page-size": !0,
|
|
1026
1239
|
simple: l.smaller("desktop").value,
|
|
1027
|
-
onChange: (
|
|
1028
|
-
onPageSizeChange: (
|
|
1240
|
+
onChange: (c) => a(c),
|
|
1241
|
+
onPageSizeChange: (c) => n(c),
|
|
1029
1242
|
style: {
|
|
1030
1243
|
justifyContent: "flex-end"
|
|
1031
1244
|
}
|
|
1032
1245
|
}, null)]) : () => {
|
|
1033
1246
|
};
|
|
1034
1247
|
}
|
|
1035
|
-
const
|
|
1248
|
+
const lr = /* @__PURE__ */ A({
|
|
1036
1249
|
props: {
|
|
1037
1250
|
collapsedColumns: {
|
|
1038
1251
|
type: Array,
|
|
@@ -1040,33 +1253,33 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1040
1253
|
}
|
|
1041
1254
|
},
|
|
1042
1255
|
setup(e) {
|
|
1043
|
-
const t =
|
|
1044
|
-
label:
|
|
1045
|
-
value:
|
|
1256
|
+
const t = B(), r = g(e.collapsedColumns.map((a) => ({
|
|
1257
|
+
label: a.title,
|
|
1258
|
+
value: a.key,
|
|
1046
1259
|
disabled: !1
|
|
1047
|
-
}))), u =
|
|
1048
|
-
return
|
|
1049
|
-
const
|
|
1050
|
-
key:
|
|
1051
|
-
title:
|
|
1052
|
-
collapsed: u.value.includes(
|
|
1260
|
+
}))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
|
|
1261
|
+
return Je(() => {
|
|
1262
|
+
const a = e.collapsedColumns.map((n) => ({
|
|
1263
|
+
key: n.key,
|
|
1264
|
+
title: n.title,
|
|
1265
|
+
collapsed: u.value.includes(n.key)
|
|
1053
1266
|
}));
|
|
1054
|
-
t.close(
|
|
1267
|
+
t.close(a);
|
|
1055
1268
|
}), () => s("div", {
|
|
1056
1269
|
class: "table-collapsed-render"
|
|
1057
|
-
}, [s(
|
|
1270
|
+
}, [s(Ue, {
|
|
1058
1271
|
data: r.value,
|
|
1059
1272
|
"default-value": u.value,
|
|
1060
|
-
onChange: (
|
|
1273
|
+
onChange: (a) => u.value = [...a],
|
|
1061
1274
|
title: ["显示列", "隐藏列"],
|
|
1062
1275
|
style: {
|
|
1063
1276
|
justifyContent: "center"
|
|
1064
1277
|
}
|
|
1065
1278
|
}, {
|
|
1066
|
-
default: () => [
|
|
1279
|
+
default: () => [De(s("template", null, null), [[Ie("slot"), "source"]])]
|
|
1067
1280
|
})]);
|
|
1068
1281
|
}
|
|
1069
|
-
}),
|
|
1282
|
+
}), ur = /* @__PURE__ */ A({
|
|
1070
1283
|
props: {
|
|
1071
1284
|
value: {
|
|
1072
1285
|
type: Object,
|
|
@@ -1082,20 +1295,20 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1082
1295
|
}
|
|
1083
1296
|
},
|
|
1084
1297
|
setup(e) {
|
|
1085
|
-
const t =
|
|
1298
|
+
const t = B();
|
|
1086
1299
|
function r(u) {
|
|
1087
1300
|
e.onSubmit && e.onSubmit(u), t.close(u);
|
|
1088
1301
|
}
|
|
1089
1302
|
return console.log(e.value), () => s("div", {
|
|
1090
1303
|
class: "edit-form-container"
|
|
1091
|
-
}, [s(
|
|
1304
|
+
}, [s(oe, {
|
|
1092
1305
|
name: "form",
|
|
1093
1306
|
value: e.value,
|
|
1094
1307
|
form: e.form,
|
|
1095
1308
|
onSubmit: r
|
|
1096
1309
|
}, null)]);
|
|
1097
1310
|
}
|
|
1098
|
-
}),
|
|
1311
|
+
}), cr = /* @__PURE__ */ A({
|
|
1099
1312
|
props: {
|
|
1100
1313
|
// 数据主键
|
|
1101
1314
|
rowKey: {
|
|
@@ -1234,24 +1447,24 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1234
1447
|
},
|
|
1235
1448
|
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
1449
|
setup(e, t) {
|
|
1237
|
-
const r = Math.random().toString(32).slice(2).toUpperCase(), u =
|
|
1238
|
-
key:
|
|
1239
|
-
title:
|
|
1240
|
-
collapsed: !!
|
|
1450
|
+
const r = Math.random().toString(32).slice(2).toUpperCase(), u = g(), a = g(), n = g(), l = g(), [c, m] = pe(e.columns), f = g(!1), d = e.form ?? et(e.columns), o = C(), y = I(), h = g(e.columns.map((i) => ({
|
|
1451
|
+
key: i.key,
|
|
1452
|
+
title: i.title,
|
|
1453
|
+
collapsed: !!i.collapsed
|
|
1241
1454
|
})));
|
|
1242
|
-
function
|
|
1455
|
+
function C() {
|
|
1243
1456
|
switch (!0) {
|
|
1244
1457
|
case (typeof e.pageable == "string" && e.pageable === "server"):
|
|
1245
|
-
return new
|
|
1458
|
+
return new V();
|
|
1246
1459
|
case (typeof e.pageable == "boolean" && e.pageable === !0):
|
|
1247
|
-
return new
|
|
1460
|
+
return new V();
|
|
1248
1461
|
case (typeof e.pageable == "object" && !!e.pageable.reset):
|
|
1249
1462
|
return e.pageable;
|
|
1250
1463
|
case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
|
|
1251
|
-
return new
|
|
1464
|
+
return new V(e.pageable.index, e.pageable.size);
|
|
1252
1465
|
}
|
|
1253
1466
|
}
|
|
1254
|
-
const
|
|
1467
|
+
const k = (() => {
|
|
1255
1468
|
switch (!0) {
|
|
1256
1469
|
case typeof e.pageable == "string":
|
|
1257
1470
|
return e.pageable;
|
|
@@ -1261,204 +1474,204 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1261
1474
|
return "server";
|
|
1262
1475
|
}
|
|
1263
1476
|
})();
|
|
1264
|
-
function
|
|
1265
|
-
const
|
|
1266
|
-
if (
|
|
1267
|
-
return new
|
|
1477
|
+
function I() {
|
|
1478
|
+
const i = e.columns.find((b) => !!b.sortable);
|
|
1479
|
+
if (i || e.sortable)
|
|
1480
|
+
return new J({
|
|
1268
1481
|
...e.sortable || {},
|
|
1269
|
-
...
|
|
1270
|
-
[
|
|
1482
|
+
...i ? {
|
|
1483
|
+
[i.key]: i.sortable
|
|
1271
1484
|
} : {}
|
|
1272
1485
|
});
|
|
1273
1486
|
}
|
|
1274
|
-
function
|
|
1487
|
+
function E(i) {
|
|
1275
1488
|
const {
|
|
1276
1489
|
exportExcel: b
|
|
1277
|
-
} =
|
|
1278
|
-
b((
|
|
1490
|
+
} = Qt();
|
|
1491
|
+
b((i == null ? void 0 : i.columns) || e.columns, (i == null ? void 0 : i.source) || c.value, (i == null ? void 0 : i.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
|
|
1279
1492
|
}
|
|
1280
|
-
function
|
|
1493
|
+
function w(i) {
|
|
1281
1494
|
let b;
|
|
1282
1495
|
switch (!0) {
|
|
1283
|
-
case !!(
|
|
1284
|
-
b =
|
|
1496
|
+
case !!(i != null && i.key):
|
|
1497
|
+
b = c.value.find((T) => T[e.rowKey] === (i == null ? void 0 : i.key));
|
|
1285
1498
|
break;
|
|
1286
|
-
case !!(
|
|
1287
|
-
b =
|
|
1499
|
+
case !!(i != null && i.record):
|
|
1500
|
+
b = i == null ? void 0 : i.record;
|
|
1288
1501
|
break;
|
|
1289
1502
|
}
|
|
1290
1503
|
if (!b)
|
|
1291
1504
|
throw new Error("未找到需要预览的数据");
|
|
1292
|
-
return
|
|
1505
|
+
return n.value.open(er, {
|
|
1293
1506
|
record: b,
|
|
1294
1507
|
columns: e.columns
|
|
1295
1508
|
}, {
|
|
1296
|
-
title: (
|
|
1297
|
-
mode: (
|
|
1509
|
+
title: (i == null ? void 0 : i.title) || "详情",
|
|
1510
|
+
mode: (i == null ? void 0 : i.mode) || "dialog"
|
|
1298
1511
|
});
|
|
1299
1512
|
}
|
|
1300
|
-
function
|
|
1513
|
+
function v(i) {
|
|
1301
1514
|
let b;
|
|
1302
1515
|
switch (!0) {
|
|
1303
|
-
case !!(
|
|
1304
|
-
b =
|
|
1516
|
+
case !!(i != null && i.key):
|
|
1517
|
+
b = c.value.find((T) => T[e.rowKey] === (i == null ? void 0 : i.key));
|
|
1305
1518
|
break;
|
|
1306
|
-
case !!(
|
|
1307
|
-
b =
|
|
1519
|
+
case !!(i != null && i.record):
|
|
1520
|
+
b = i == null ? void 0 : i.record;
|
|
1308
1521
|
break;
|
|
1309
1522
|
}
|
|
1310
1523
|
if (!b)
|
|
1311
1524
|
throw new Error("未找到需要编辑的数据");
|
|
1312
|
-
return
|
|
1525
|
+
return n.value.open(ur, {
|
|
1313
1526
|
value: b,
|
|
1314
|
-
form:
|
|
1315
|
-
onSubmit:
|
|
1527
|
+
form: i == null ? void 0 : i.form,
|
|
1528
|
+
onSubmit: i.onSubmit
|
|
1316
1529
|
}, {
|
|
1317
|
-
title: (
|
|
1318
|
-
mode: (
|
|
1530
|
+
title: (i == null ? void 0 : i.title) || "编辑",
|
|
1531
|
+
mode: (i == null ? void 0 : i.mode) || "dialog",
|
|
1319
1532
|
footer: !0,
|
|
1320
1533
|
form: "form"
|
|
1321
1534
|
});
|
|
1322
1535
|
}
|
|
1323
|
-
function
|
|
1324
|
-
var
|
|
1536
|
+
function O(i) {
|
|
1537
|
+
var p, ee;
|
|
1325
1538
|
if (!e.dataLoad)
|
|
1326
1539
|
return Promise.reject();
|
|
1327
|
-
|
|
1540
|
+
i != null && i.reset && (o && o.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
|
|
1328
1541
|
const b = {
|
|
1329
|
-
...((
|
|
1542
|
+
...((ee = a.value) == null ? void 0 : ee.formSource) || {}
|
|
1330
1543
|
};
|
|
1331
|
-
Object.keys(b).forEach((
|
|
1332
|
-
[null, void 0, ""].includes(b[
|
|
1544
|
+
Object.keys(b).forEach((te) => {
|
|
1545
|
+
[null, void 0, ""].includes(b[te]) && delete b[te];
|
|
1333
1546
|
});
|
|
1334
|
-
const
|
|
1547
|
+
const T = e.dataLoad({
|
|
1335
1548
|
form: b,
|
|
1336
1549
|
page: o,
|
|
1337
1550
|
sort: y,
|
|
1338
1551
|
update: m
|
|
1339
1552
|
});
|
|
1340
|
-
return Y(
|
|
1341
|
-
|
|
1342
|
-
}),
|
|
1553
|
+
return Y(T) ? (f.value = !0, Promise.resolve(T).finally(() => {
|
|
1554
|
+
f.value = !1;
|
|
1555
|
+
}), T) : Promise.resolve();
|
|
1343
1556
|
}
|
|
1344
|
-
function
|
|
1345
|
-
|
|
1346
|
-
collapsedColumns:
|
|
1557
|
+
function be() {
|
|
1558
|
+
n.value.open(lr, {
|
|
1559
|
+
collapsedColumns: h.value
|
|
1347
1560
|
}, {
|
|
1348
1561
|
title: "显示列",
|
|
1349
1562
|
size: "small",
|
|
1350
1563
|
footer: !0
|
|
1351
|
-
}).then((
|
|
1352
|
-
|
|
1564
|
+
}).then((i) => {
|
|
1565
|
+
h.value = i;
|
|
1353
1566
|
});
|
|
1354
1567
|
}
|
|
1355
|
-
const
|
|
1568
|
+
const he = (i, {
|
|
1356
1569
|
type: b
|
|
1357
1570
|
}) => {
|
|
1358
1571
|
switch (b) {
|
|
1359
1572
|
case "drag": {
|
|
1360
|
-
m(
|
|
1573
|
+
m(i), t.emit("change", i);
|
|
1361
1574
|
break;
|
|
1362
1575
|
}
|
|
1363
1576
|
}
|
|
1364
|
-
},
|
|
1365
|
-
reload:
|
|
1366
|
-
preview:
|
|
1367
|
-
export:
|
|
1368
|
-
edit:
|
|
1369
|
-
collapse:
|
|
1577
|
+
}, j = tt({
|
|
1578
|
+
reload: O,
|
|
1579
|
+
preview: w,
|
|
1580
|
+
export: E,
|
|
1581
|
+
edit: v,
|
|
1582
|
+
collapse: be
|
|
1370
1583
|
});
|
|
1371
|
-
function
|
|
1372
|
-
!y ||
|
|
1584
|
+
function ge(i, b) {
|
|
1585
|
+
!y || k === "client" || (b ? y.update(i, b === "descend" ? "desc" : "asc") : y.remove(i), j("reload"));
|
|
1373
1586
|
}
|
|
1374
|
-
const
|
|
1587
|
+
const Q = g(de({
|
|
1375
1588
|
columns: e.columns,
|
|
1376
1589
|
columnsOptions: e.columnsOptions,
|
|
1377
1590
|
columnsGroups: e.columnsGroups,
|
|
1378
|
-
pageMode:
|
|
1379
|
-
collapsedColumns:
|
|
1380
|
-
events:
|
|
1381
|
-
})),
|
|
1382
|
-
tableEvents:
|
|
1383
|
-
tableForm:
|
|
1384
|
-
tableSource:
|
|
1385
|
-
formInstance:
|
|
1591
|
+
pageMode: k,
|
|
1592
|
+
collapsedColumns: h,
|
|
1593
|
+
events: j
|
|
1594
|
+
})), P = {
|
|
1595
|
+
tableEvents: j,
|
|
1596
|
+
tableForm: d,
|
|
1597
|
+
tableSource: c,
|
|
1598
|
+
formInstance: a,
|
|
1386
1599
|
pageService: o,
|
|
1387
1600
|
formOptions: e.formOptions
|
|
1388
|
-
},
|
|
1389
|
-
selectedRowKeys:
|
|
1390
|
-
rowSelection:
|
|
1391
|
-
onSelect:
|
|
1392
|
-
onSelectAll:
|
|
1393
|
-
reloadSelection:
|
|
1394
|
-
resetSelection:
|
|
1395
|
-
} =
|
|
1601
|
+
}, we = rr(e, t, P), ve = tr(e, t, P), Ce = ar(e, t, P), {
|
|
1602
|
+
selectedRowKeys: X,
|
|
1603
|
+
rowSelection: Z,
|
|
1604
|
+
onSelect: xe,
|
|
1605
|
+
onSelectAll: ke,
|
|
1606
|
+
reloadSelection: Se,
|
|
1607
|
+
resetSelection: Te
|
|
1608
|
+
} = nr(e, t, P), Me = R(() => ({
|
|
1396
1609
|
rowKey: e.rowKey,
|
|
1397
1610
|
size: e.size,
|
|
1398
1611
|
bordered: e.bordered,
|
|
1399
1612
|
hoverable: e.hoverable,
|
|
1400
1613
|
stripe: e.stripe,
|
|
1401
1614
|
scroll: {
|
|
1402
|
-
x: e.columns.reduce((
|
|
1615
|
+
x: e.columns.reduce((i, b) => i += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
|
|
1403
1616
|
y: e.height ?? "100%"
|
|
1404
1617
|
},
|
|
1405
|
-
rowSelection:
|
|
1618
|
+
rowSelection: Z,
|
|
1406
1619
|
draggable: e.draggable ? {
|
|
1407
1620
|
type: "handle",
|
|
1408
1621
|
width: 40
|
|
1409
1622
|
} : void 0,
|
|
1410
1623
|
pagination: e.pageable === void 0 || e.pageable === "client",
|
|
1411
|
-
selectedKeys:
|
|
1624
|
+
selectedKeys: X.value,
|
|
1412
1625
|
expandable: e.expandable
|
|
1413
1626
|
}));
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1627
|
+
function _e() {
|
|
1628
|
+
Q.value = de({
|
|
1416
1629
|
columns: e.columns,
|
|
1417
1630
|
columnsOptions: e.columnsOptions,
|
|
1418
1631
|
columnsGroups: e.columnsGroups,
|
|
1419
|
-
pageMode:
|
|
1420
|
-
collapsedColumns:
|
|
1421
|
-
events:
|
|
1632
|
+
pageMode: k,
|
|
1633
|
+
collapsedColumns: h,
|
|
1634
|
+
events: j
|
|
1422
1635
|
});
|
|
1423
1636
|
}
|
|
1424
|
-
return
|
|
1425
|
-
l.value && (l.value.id = `table-${r}`), e.autoLoad &&
|
|
1637
|
+
return z(() => {
|
|
1638
|
+
l.value && (l.value.id = `table-${r}`), e.autoLoad && O(), e.grabbable && l.value && Zt(l.value);
|
|
1426
1639
|
}), {
|
|
1427
1640
|
tableId: r,
|
|
1428
1641
|
tableInstance: u,
|
|
1429
|
-
tableSource:
|
|
1430
|
-
tableOptions:
|
|
1431
|
-
tableColumns:
|
|
1432
|
-
tableEvents:
|
|
1433
|
-
tableForm:
|
|
1434
|
-
tableLoading:
|
|
1435
|
-
modalInstance:
|
|
1642
|
+
tableSource: c,
|
|
1643
|
+
tableOptions: Me,
|
|
1644
|
+
tableColumns: Q,
|
|
1645
|
+
tableEvents: j,
|
|
1646
|
+
tableForm: d,
|
|
1647
|
+
tableLoading: f,
|
|
1648
|
+
modalInstance: n,
|
|
1436
1649
|
tableRenderElement: l,
|
|
1437
|
-
formSource:
|
|
1438
|
-
var
|
|
1439
|
-
return (
|
|
1650
|
+
formSource: fe(R(() => {
|
|
1651
|
+
var i;
|
|
1652
|
+
return (i = a == null ? void 0 : a.value) == null ? void 0 : i.formSource;
|
|
1440
1653
|
})),
|
|
1441
|
-
formInstance:
|
|
1442
|
-
reload:
|
|
1443
|
-
preview:
|
|
1444
|
-
edit:
|
|
1445
|
-
export:
|
|
1446
|
-
onSorterChange:
|
|
1447
|
-
onTableChange:
|
|
1654
|
+
formInstance: a,
|
|
1655
|
+
reload: O,
|
|
1656
|
+
preview: w,
|
|
1657
|
+
edit: v,
|
|
1658
|
+
export: E,
|
|
1659
|
+
onSorterChange: ge,
|
|
1660
|
+
onTableChange: he,
|
|
1448
1661
|
renders: {
|
|
1449
|
-
renderTableForm:
|
|
1450
|
-
renderTableActions:
|
|
1451
|
-
renderTablePagination:
|
|
1662
|
+
renderTableForm: we,
|
|
1663
|
+
renderTableActions: ve,
|
|
1664
|
+
renderTablePagination: Ce
|
|
1452
1665
|
},
|
|
1453
1666
|
tableSelection: {
|
|
1454
|
-
selectedRowKeys:
|
|
1455
|
-
rowSelection:
|
|
1456
|
-
onSelect:
|
|
1457
|
-
onSelectAll:
|
|
1667
|
+
selectedRowKeys: X,
|
|
1668
|
+
rowSelection: Z,
|
|
1669
|
+
onSelect: xe,
|
|
1670
|
+
onSelectAll: ke
|
|
1458
1671
|
},
|
|
1459
|
-
resetSelection:
|
|
1460
|
-
reloadSelection:
|
|
1461
|
-
reloadColumns:
|
|
1672
|
+
resetSelection: Te,
|
|
1673
|
+
reloadSelection: Se,
|
|
1674
|
+
reloadColumns: _e
|
|
1462
1675
|
};
|
|
1463
1676
|
},
|
|
1464
1677
|
render() {
|
|
@@ -1467,7 +1680,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1467
1680
|
class: "table-body"
|
|
1468
1681
|
}, [s("div", {
|
|
1469
1682
|
class: "table-body-wrapper"
|
|
1470
|
-
}, [s(
|
|
1683
|
+
}, [s(Ge, se({
|
|
1471
1684
|
loading: this.tableLoading,
|
|
1472
1685
|
data: this.tableSource,
|
|
1473
1686
|
columns: this.tableColumns,
|
|
@@ -1486,7 +1699,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1486
1699
|
"auto-fill": this.autoFill
|
|
1487
1700
|
},
|
|
1488
1701
|
ref: (t) => this.tableRenderElement = t
|
|
1489
|
-
}, [s(
|
|
1702
|
+
}, [s(Qe, {
|
|
1490
1703
|
ref: (t) => this.modalInstance = t
|
|
1491
1704
|
}, {
|
|
1492
1705
|
default: () => [s("div", {
|
|
@@ -1495,23 +1708,23 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1495
1708
|
})]);
|
|
1496
1709
|
}
|
|
1497
1710
|
});
|
|
1498
|
-
function
|
|
1711
|
+
function br(e) {
|
|
1499
1712
|
return e;
|
|
1500
1713
|
}
|
|
1501
|
-
function
|
|
1714
|
+
function hr(e) {
|
|
1502
1715
|
return e;
|
|
1503
1716
|
}
|
|
1504
|
-
const
|
|
1717
|
+
const gr = {
|
|
1505
1718
|
install(e, t) {
|
|
1506
|
-
e.component("TableRender",
|
|
1719
|
+
e.component("TableRender", cr);
|
|
1507
1720
|
}
|
|
1508
1721
|
};
|
|
1509
1722
|
export {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1723
|
+
cr as TableRender,
|
|
1724
|
+
Cr as TableRenderResolver,
|
|
1725
|
+
gr as default,
|
|
1726
|
+
br as defineColumns,
|
|
1727
|
+
hr as defineTableLoad,
|
|
1728
|
+
tt as useEvents,
|
|
1729
|
+
yr as useTable
|
|
1517
1730
|
};
|