zhihao-ui 1.2.13 → 1.2.14

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.
@@ -0,0 +1,1121 @@
1
+ import { reactive as Y, computed as V, toRefs as Fe, ref as R, defineComponent as ae, useCssVars as rt, inject as Oe, openBlock as _, createElementBlock as z, createBlock as L, resolveDynamicComponent as de, mergeProps as X, withKeys as st, unref as g, createSlots as pe, withCtx as S, Fragment as Z, renderList as he, renderSlot as j, createElementVNode as E, toDisplayString as Q, createVNode as P, withModifiers as ut, normalizeClass as Ae, createCommentVNode as B, createTextVNode as G, resolveComponent as ie, useSlots as Ue, normalizeProps as ct, guardReactiveProps as it, nextTick as me, onMounted as dt, onActivated as pt, onDeactivated as ht, onUnmounted as mt, watch as ft, provide as gt, resolveDirective as vt, withDirectives as ye, vShow as bt, toHandlers as yt } from "vue";
2
+ import { N as Ke, Q as Ct, R as St, U as xe, Y as _t, f as wt, Z as kt, j as Pt, _ as Tt, K as fe, E as Ie, $ as _e, a0 as Et, a1 as Ne, e as H, g as We, a2 as $t, a3 as je, a4 as Bt, a5 as Rt, a6 as zt, i as It, a7 as Mt, a8 as Lt, m as Ce, a9 as Dt, d as Vt, aa as Ft, ab as Me, ac as Le } from "./vendor-CUDSGmu_.js";
3
+ import { D as ee, C as Ot } from "./DatePicker-Cc2HzfbO.js";
4
+ import { _ as oe, Z as Se } from "./Button-B9P_SsZw.js";
5
+ import { _ as At } from "./Dialog-CPGMb7bN.js";
6
+ import { w as Ut } from "./utils-BbabHGt0.js";
7
+ const Kt = (b, c = {}, a = !0, d, p, C = (t) => t) => {
8
+ const t = Y({
9
+ // 表格数据
10
+ tableData: [],
11
+ // 分页数据
12
+ pageable: {
13
+ // 当前页数
14
+ page: 1,
15
+ // 每页显示条数
16
+ size: 10,
17
+ // 总条数
18
+ total: 0
19
+ },
20
+ // 查询参数(只包括查询)
21
+ searchParam: {},
22
+ // 初始化默认的查询参数
23
+ searchInitParam: {},
24
+ // 总参数(包含分页和查询参数)
25
+ totalParam: {},
26
+ // 是否在加载中
27
+ loading: !1
28
+ }), v = V({
29
+ get: () => ({
30
+ page: t.pageable.page,
31
+ size: t.pageable.size
32
+ }),
33
+ set: (k) => {
34
+ console.log("我是分页更新之后的值", k);
35
+ }
36
+ }), o = async () => {
37
+ if (t.loading = !0, !b) {
38
+ t.loading = !1;
39
+ return;
40
+ }
41
+ try {
42
+ const k = localStorage.getItem("MytaskGotoListPageQuery");
43
+ if (k) {
44
+ c = {}, t.totalParam = {};
45
+ const s = JSON.parse(k);
46
+ c = { ...c, ...s }, t.searchParam = { ...s };
47
+ }
48
+ Object.assign(t.totalParam, c, a ? v.value : {}), console.log(c, t.totalParam, "totalParam");
49
+ for (const s in t.searchParam)
50
+ t.searchParam[s] === "" && delete t.searchParam[s];
51
+ let e = await b(C({ ...t.searchInitParam, ...t.totalParam }));
52
+ if (d && (e = await d(e)), t.tableData = a ? e.list : e, a) {
53
+ const { currentPage: s, pageSize: r, total: m } = e;
54
+ N({ page: s, size: r, total: m });
55
+ }
56
+ } catch (k) {
57
+ p && p(k);
58
+ } finally {
59
+ t.loading = !1;
60
+ }
61
+ }, h = () => {
62
+ t.totalParam = {}, t.searchInitParam = {}, c = {};
63
+ const k = {};
64
+ for (const e in t.searchParam)
65
+ (t.searchParam[e] || t.searchParam[e] === !1 || t.searchParam[e] === 0) && (k[e] = t.searchParam[e]);
66
+ Object.assign(t.totalParam, k, a ? v.value : {});
67
+ }, N = (k) => {
68
+ Object.assign(t.pageable, k);
69
+ }, F = () => {
70
+ t.pageable.page = 1, h(), o().then();
71
+ }, W = () => {
72
+ t.pageable.page = 1, t.searchParam = { ...t.searchInitParam }, h(), o().then();
73
+ }, A = (k) => {
74
+ t.pageable.page = 1, t.pageable.size = k, o().then();
75
+ }, O = (k) => {
76
+ t.pageable.page = k, o().then();
77
+ };
78
+ return {
79
+ ...Fe(t),
80
+ getTableList: o,
81
+ search: F,
82
+ reset: W,
83
+ handleSizeChange: A,
84
+ handleCurrentChange: O,
85
+ updatedTotalParam: h
86
+ };
87
+ }, xt = (b = "id", c) => {
88
+ const a = R(!1), d = R([]), p = V(() => {
89
+ let t = [];
90
+ return d.value.forEach((v) => t.push(Ke(v, b))), t;
91
+ });
92
+ return {
93
+ isSelected: a,
94
+ selectedList: d,
95
+ selectedListIds: p,
96
+ selectionChange: (t) => {
97
+ t.length ? a.value = !0 : a.value = !1, d.value = t, c && c(t);
98
+ }
99
+ };
100
+ }, Nt = 12;
101
+ function we(b, c, a, d) {
102
+ return b.reduce((p, C) => {
103
+ if (p) return p;
104
+ if (C[a] === c) return C;
105
+ if (C[d]) return we(C[d], c, a, d);
106
+ }, null);
107
+ }
108
+ function Wt(b, c, a) {
109
+ const d = St(a) ? ee : a, p = Ke(b, c);
110
+ return Ct(p) || p === "" ? d : p;
111
+ }
112
+ const De = Wt;
113
+ function x(b) {
114
+ const c = b.split(".");
115
+ return c.length == 1 ? b : c[c.length - 1];
116
+ }
117
+ function Ve(b, c, a, d) {
118
+ const p = (a == null ? void 0 : a.value) ?? "value", C = (a == null ? void 0 : a.label) ?? "label", t = (a == null ? void 0 : a.children) ?? "children";
119
+ let v = {};
120
+ return Array.isArray(c) && (v = we(c, b, p, t)), d == "tag" ? v != null && v.tagType ? v.tagType : "" : v ? v[C] : ee;
121
+ }
122
+ function jt(b, c, a) {
123
+ const d = "value", p = "children";
124
+ let C = {};
125
+ return Array.isArray(c) && (C = we(c, b, d, p)), C;
126
+ }
127
+ function Ht(b) {
128
+ return xe(b) ? b.length ? b.join(" / ") : ee : b ?? ee;
129
+ }
130
+ function ce(b, c) {
131
+ return c.includes(".") ? (c.split(".").forEach((a) => b = b[a] ?? ee), b) : b[c] ?? ee;
132
+ }
133
+ const te = (b, c) => {
134
+ const a = c || Nt, p = document.createElement("canvas").getContext("2d");
135
+ return p.font = `${a}px Microsoft YaHei`, p.measureText(b).width;
136
+ }, qt = (b) => {
137
+ const c = b || "zhihao-col-setting", a = () => {
138
+ const v = localStorage.getItem(c);
139
+ return v ? JSON.parse(v) : {};
140
+ }, d = (v) => {
141
+ localStorage.setItem(c, JSON.stringify(v));
142
+ };
143
+ return {
144
+ getMap: a,
145
+ setMap: d,
146
+ getColumnCache: (v) => a()[v] || [],
147
+ setColumnCache: (v, o) => {
148
+ const h = a();
149
+ h[v] = o, d(h);
150
+ },
151
+ removeColumnCache: (v) => {
152
+ const o = a();
153
+ delete o[v], d(o);
154
+ }
155
+ };
156
+ }, Zt = { class: "search-form-item" }, Gt = /* @__PURE__ */ ae({
157
+ __name: "SearchFormItem",
158
+ props: {
159
+ column: {},
160
+ searchParam: {}
161
+ },
162
+ emits: ["search"],
163
+ setup(b, { emit: c }) {
164
+ rt((e) => ({
165
+ "00203d4e": F.value
166
+ }));
167
+ const a = b, d = c, p = V(() => a.searchParam), C = V(() => {
168
+ var e, s, r;
169
+ return {
170
+ label: ((e = a.column.fieldNames) == null ? void 0 : e.label) ?? "label",
171
+ value: ((s = a.column.fieldNames) == null ? void 0 : s.value) ?? "value",
172
+ children: ((r = a.column.fieldNames) == null ? void 0 : r.children) ?? "children"
173
+ };
174
+ }), t = Oe("enumMap", R(/* @__PURE__ */ new Map())), v = V(() => {
175
+ var s;
176
+ let e = t.value.get(a.column.prop);
177
+ return e ? (((s = a.column.search) == null ? void 0 : s.el) === "select-v2" && a.column.fieldNames && (e = e.map((r) => ({ ...r, label: r[C.value.label], value: r[C.value.value] }))), e) : [];
178
+ }), o = V(() => {
179
+ var e, s;
180
+ return ((s = (e = a.column.search) == null ? void 0 : e.props) == null ? void 0 : s.options) ?? v.value ?? [];
181
+ }), h = V(() => {
182
+ var $, l;
183
+ const e = C.value.label, s = C.value.value, r = C.value.children, m = ($ = a.column.search) == null ? void 0 : $.el;
184
+ let f = ((l = a.column.search) == null ? void 0 : l.props) ?? {};
185
+ return m === "tree-select" && (f = { ...f, props: { ...f.props, label: e, children: r }, nodeKey: s }), m === "cascader" && (f = { ...f, props: { ...f.props, label: e, value: s, children: r } }), f;
186
+ }), N = V(() => {
187
+ var r, m, f, $, l, w, T;
188
+ const e = a.column.search;
189
+ return ["datetimerange", "daterange", "monthrange"].includes((r = e == null ? void 0 : e.props) == null ? void 0 : r.type) || (m = e == null ? void 0 : e.props) != null && m.isRange ? {
190
+ rangeSeparator: ((f = e == null ? void 0 : e.props) == null ? void 0 : f.rangeSeparator) ?? "-",
191
+ startPlaceholder: (($ = e == null ? void 0 : e.props) == null ? void 0 : $.startPlaceholder) ?? "开始时间",
192
+ endPlaceholder: ((l = e == null ? void 0 : e.props) == null ? void 0 : l.endPlaceholder) ?? "结束时间"
193
+ } : { placeholder: ((w = e == null ? void 0 : e.props) == null ? void 0 : w.placeholder) ?? ((T = e == null ? void 0 : e.el) != null && T.includes("input") ? "请输入" : "请选择") };
194
+ }), F = V(() => {
195
+ var f, $;
196
+ const e = a.column.search, s = p.value[(e == null ? void 0 : e.key) ?? x(a.column.prop)], r = e == null ? void 0 : e.el, m = (f = e == null ? void 0 : e.props) == null ? void 0 : f.placeholder;
197
+ if (e != null && e.width)
198
+ if (_t(e == null ? void 0 : e.width)) {
199
+ if (e == null ? void 0 : e.width(s))
200
+ return (e == null ? void 0 : e.width(s)) + "px";
201
+ } else
202
+ return (e == null ? void 0 : e.width) + "px";
203
+ if (s && s.length !== 0 && ["select", "select-v2", "tree-select", "cascader"].includes(r || "")) {
204
+ if (xe(s)) {
205
+ let T = o.value;
206
+ const I = [];
207
+ if (s.forEach((D) => {
208
+ const U = T.find((ge) => ge[C.value.value] === D);
209
+ I.push(U ? U[C.value.label] : D);
210
+ const q = U[C.value.children] ?? o.value;
211
+ T = U ? q : [];
212
+ }), ($ = e == null ? void 0 : e.props) != null && $.multiple) {
213
+ const q = te(I[0]) + 42;
214
+ return s.length > 1 ? q + 26 + te("+ " + (s.length - 1)) + "px" : q + "px";
215
+ }
216
+ return te(I.join(" / ")) + "px";
217
+ }
218
+ let l = o.value.find((T) => T[C.value.value] === s);
219
+ const w = l ? l[C.value.label] : s;
220
+ return te(w) + "px";
221
+ } else return m ? te(m) + "px" : "100px";
222
+ }), W = V(() => {
223
+ var e, s, r, m, f;
224
+ return (r = (s = (e = a.column) == null ? void 0 : e.search) == null ? void 0 : s.props) != null && r.multiple && ((f = (m = a.column) == null ? void 0 : m.search) == null ? void 0 : f.el) === "select" ? {
225
+ collapseTags: !0,
226
+ collapseTagsTooltip: !0
227
+ } : {};
228
+ }), A = V(() => {
229
+ var s;
230
+ const e = a.column.search;
231
+ return ((s = e == null ? void 0 : e.props) == null ? void 0 : s.clearable) ?? ((e == null ? void 0 : e.defaultValue) == null || !1);
232
+ }), O = (e) => {
233
+ var s, r, m, f, $, l, w, T, I;
234
+ if (((m = (r = (s = a.column) == null ? void 0 : s.search) == null ? void 0 : r.props) == null ? void 0 : m.type) === "daterange") {
235
+ const { searchParam: D } = Fe(a);
236
+ if (e != null && e.length) {
237
+ const U = ((l = ($ = (f = a.column) == null ? void 0 : f.search) == null ? void 0 : $.props) == null ? void 0 : l.beginTime) || "beginTime", q = ((I = (T = (w = a.column) == null ? void 0 : w.search) == null ? void 0 : T.props) == null ? void 0 : I.endTime) || "endTime";
238
+ D.value[U] = e[0], D.value[q] = e[1];
239
+ } else
240
+ delete D.value.beginTime, delete D.value.endTime;
241
+ }
242
+ (e == null || e === "") && d("search"), e instanceof Array && !e.length && d("search");
243
+ }, k = () => {
244
+ var e;
245
+ ["input", "input-number"].includes(((e = a.column.search) == null ? void 0 : e.el) || "") && d("search");
246
+ };
247
+ return (e, s) => {
248
+ var r, m, f, $, l, w, T;
249
+ return _(), z("div", Zt, [
250
+ (_(), L(de(((r = e.column.search) == null ? void 0 : r.render) ?? `el-${(m = e.column.search) == null ? void 0 : m.el}`), X({ ...h.value, ...N.value, searchParam: p.value, clearable: A.value, ...W.value }, {
251
+ modelValue: p.value[((f = e.column.search) == null ? void 0 : f.key) ?? g(x)(e.column.prop)],
252
+ "onUpdate:modelValue": s[0] || (s[0] = (I) => {
253
+ var D;
254
+ return p.value[((D = e.column.search) == null ? void 0 : D.key) ?? g(x)(e.column.prop)] = I;
255
+ }),
256
+ modelModifiers: { trim: !0 },
257
+ data: (($ = e.column.search) == null ? void 0 : $.el) === "tree-select" ? v.value : [],
258
+ options: o.value,
259
+ "prefix-icon": (w = (l = e.column.search) == null ? void 0 : l.props) == null ? void 0 : w.prefixIcon,
260
+ onChange: O,
261
+ onKeyup: st(k, ["enter"])
262
+ }), pe({
263
+ default: S(() => {
264
+ var I;
265
+ return [
266
+ ((I = e.column.search) == null ? void 0 : I.el) === "select" ? (_(!0), z(Z, { key: 0 }, he(v.value, (D, U) => (_(), L(de("el-option"), {
267
+ key: U,
268
+ label: D[C.value.label] ?? "",
269
+ value: D[C.value.value]
270
+ }, null, 8, ["label", "value"]))), 128)) : j(e.$slots, "default", { key: 1 }, void 0, !0)
271
+ ];
272
+ }),
273
+ _: 2
274
+ }, [
275
+ ((T = e.column.search) == null ? void 0 : T.el) === "cascader" ? {
276
+ name: "default",
277
+ fn: S(({ data: I }) => [
278
+ E("span", null, Q(I[C.value.label]), 1)
279
+ ]),
280
+ key: "0"
281
+ } : void 0
282
+ ]), 1040, ["modelValue", "data", "options", "prefix-icon"]))
283
+ ]);
284
+ };
285
+ }
286
+ }), Qt = /* @__PURE__ */ oe(Gt, [["__scopeId", "data-v-b34b8b6d"]]), Jt = { class: "table-search" }, Yt = { key: 0 }, Xt = {
287
+ key: 0,
288
+ class: "operation"
289
+ }, ea = /* @__PURE__ */ ae({
290
+ __name: "SearchForm",
291
+ props: {
292
+ columns: { default: () => [] },
293
+ searchParam: { default: () => ({}) },
294
+ search: {},
295
+ reset: {},
296
+ isShowResetBtn: { type: Boolean, default: !0 },
297
+ isShowSearchBtn: { type: Boolean, default: !0 }
298
+ },
299
+ setup(b) {
300
+ const c = b;
301
+ return (a, d) => (_(), z("div", Jt, [
302
+ P(g(wt), {
303
+ ref: "formRef",
304
+ model: a.searchParam,
305
+ class: "table-search--left",
306
+ onSubmit: d[0] || (d[0] = ut(() => {
307
+ }, ["prevent"]))
308
+ }, {
309
+ default: S(() => [
310
+ j(a.$slots, "default", {}, void 0, !0),
311
+ a.columns.length ? (_(), z(Z, { key: 0 }, [
312
+ (_(!0), z(Z, null, he(a.columns, (p) => {
313
+ var C, t, v;
314
+ return _(), z(Z, {
315
+ key: p.prop
316
+ }, [
317
+ !g(kt)((C = p.search) == null ? void 0 : C.isShow) || (t = p.search) != null && t.isShow ? (_(), z("div", Yt, [
318
+ P(g(Pt), null, pe({
319
+ default: S(() => [
320
+ P(Qt, {
321
+ column: p,
322
+ "search-param": a.searchParam,
323
+ onSearch: a.search
324
+ }, null, 8, ["column", "search-param", "onSearch"])
325
+ ]),
326
+ _: 2
327
+ }, [
328
+ (v = p.search) != null && v.label ? {
329
+ name: "label",
330
+ fn: S(() => [
331
+ P(g(Tt), { size: 4 }, {
332
+ default: S(() => {
333
+ var o, h;
334
+ return [
335
+ E("span", null, Q(`${p.search.label}`), 1),
336
+ (o = p.search) != null && o.tooltip ? (_(), L(g(fe), {
337
+ key: 0,
338
+ effect: "dark",
339
+ content: (h = p.search) == null ? void 0 : h.tooltip,
340
+ placement: "top"
341
+ }, {
342
+ default: S(() => d[1] || (d[1] = [
343
+ E("i", {
344
+ class: Ae("iconfont icon-yiwen")
345
+ }, null, -1)
346
+ ])),
347
+ _: 2
348
+ }, 1032, ["content"])) : B("", !0)
349
+ ];
350
+ }),
351
+ _: 2
352
+ }, 1024),
353
+ d[2] || (d[2] = E("span", null, ":", -1))
354
+ ]),
355
+ key: "0"
356
+ } : void 0
357
+ ]), 1024)
358
+ ])) : B("", !0)
359
+ ], 64);
360
+ }), 128)),
361
+ c.isShowSearchBtn ? (_(), L(g(Ie), {
362
+ key: 0,
363
+ type: "primary",
364
+ class: "table-search--search-btn",
365
+ onClick: a.search
366
+ }, {
367
+ icon: S(() => d[3] || (d[3] = [
368
+ E("i", { class: "iconfont icon-search" }, null, -1)
369
+ ])),
370
+ default: S(() => [
371
+ d[4] || (d[4] = G(" 搜索 "))
372
+ ]),
373
+ _: 1
374
+ }, 8, ["onClick"])) : B("", !0)
375
+ ], 64)) : B("", !0)
376
+ ]),
377
+ _: 3
378
+ }, 8, ["model"]),
379
+ c.isShowResetBtn && a.columns.length ? (_(), z("div", Xt, [
380
+ P(g(fe), {
381
+ class: "box-item",
382
+ effect: "light",
383
+ content: "重置",
384
+ placement: "top"
385
+ }, {
386
+ default: S(() => {
387
+ var p;
388
+ return [
389
+ a.columns.length > 1 || ((p = a.columns[0].search) == null ? void 0 : p.el) !== "input" ? (_(), L(g(Ie), {
390
+ key: 0,
391
+ class: "table-search--reset-btn",
392
+ onClick: a.reset
393
+ }, {
394
+ icon: S(() => [
395
+ P(g(_e), { size: 14 }, {
396
+ default: S(() => [
397
+ P(g(Et))
398
+ ]),
399
+ _: 1
400
+ })
401
+ ]),
402
+ _: 1
403
+ }, 8, ["onClick"])) : B("", !0)
404
+ ];
405
+ }),
406
+ _: 1
407
+ })
408
+ ])) : B("", !0)
409
+ ]));
410
+ }
411
+ }), ta = /* @__PURE__ */ oe(ea, [["__scopeId", "data-v-2e2396eb"]]), aa = { class: "el-pagination__total zh-page-total" }, na = /* @__PURE__ */ ae({
412
+ __name: "tablePagination",
413
+ props: {
414
+ pageable: {},
415
+ handleSizeChange: { type: Function },
416
+ handleCurrentChange: { type: Function }
417
+ },
418
+ setup(b) {
419
+ return (c, a) => {
420
+ const d = ie("el-pagination");
421
+ return c.pageable.total ? (_(), L(d, {
422
+ key: 0,
423
+ class: "zh-pagination",
424
+ background: !0,
425
+ "current-page": c.pageable.page,
426
+ "page-size": c.pageable.size,
427
+ total: c.pageable.total,
428
+ layout: "slot, sizes, prev, pager, next, jumper",
429
+ onSizeChange: c.handleSizeChange,
430
+ onCurrentChange: c.handleCurrentChange
431
+ }, {
432
+ default: S(() => [
433
+ E("div", aa, "共" + Q(c.pageable.total) + "条数据", 1)
434
+ ]),
435
+ _: 1
436
+ }, 8, ["current-page", "page-size", "total", "onSizeChange", "onCurrentChange"])) : B("", !0);
437
+ };
438
+ }
439
+ }), oa = /* @__PURE__ */ oe(na, [["__scopeId", "data-v-7e4152cd"]]), la = /* @__PURE__ */ ae({
440
+ __name: "TableColumn",
441
+ props: {
442
+ column: {},
443
+ customColumn: { type: Boolean }
444
+ },
445
+ setup(b) {
446
+ const c = b, a = R(c.column), d = Ue(), p = Oe("enumMap", R(/* @__PURE__ */ new Map())), C = (o, h) => p.value.get(o.prop) && o.isFilterEnum ? Ve(ce(h.row, o.prop), p.value.get(o.prop), o.fieldNames) : Ht(ce(h.row, o.prop)), t = (o, h) => Ve(ce(h.row, o.prop), p.value.get(o.prop), o.fieldNames, "tag"), v = (o) => /* @__PURE__ */ React.createElement(React.Fragment, null, o.isShow && /* @__PURE__ */ React.createElement(
447
+ "el-table-column",
448
+ {
449
+ ...o,
450
+ "class-name": o.wrap && "table-column--wrap",
451
+ showOverflowTooltip: o.showOverflowTooltip ?? o.prop !== "operation"
452
+ },
453
+ {
454
+ default: (h) => {
455
+ var N, F, W;
456
+ if (o._children) return o._children.map((A) => v(A));
457
+ if (o.render) return o.render(h);
458
+ if (o.prop === "operation") {
459
+ if (!d[x(o.prop)]) {
460
+ a.value.width = 0;
461
+ return;
462
+ }
463
+ const A = ((F = (N = d[x(o.prop)](h)) == null ? void 0 : N.at(0)) == null ? void 0 : F.children) || [], O = (l) => Array.from(l).map((w) => {
464
+ var T, I;
465
+ return ((T = w.type) == null ? void 0 : T.name) === "ElButton" && w.children !== "v-if" ? w : (I = w.children) != null && I.length ? O(w.children) : null;
466
+ }).filter(Boolean).flat(), k = O(A), e = (l) => {
467
+ let w = "";
468
+ return l.forEach((T) => {
469
+ w += T.children.default()[0].children;
470
+ }), te(w, 14) + 6 * l.length + +(8 * l.length - 1);
471
+ }, s = (l) => {
472
+ a.value.hasOperationMaxWidth || (a.value.width = 0, a.value.hasOperationMaxWidth = !0);
473
+ const w = a.value.width;
474
+ let T = 0;
475
+ l > 0 && (T = Math.round(l) + 32), T > Number.parseInt((w == null ? void 0 : w.toString()) || "0") && (a.value.width = T, a.value.hasOperationMaxWidth = !0);
476
+ };
477
+ if (k.length <= 3) {
478
+ const l = e(k), w = c.customColumn ? l + 20 : l;
479
+ return s(w), /* @__PURE__ */ React.createElement("div", { class: "operation-container" }, k);
480
+ }
481
+ const r = [], m = k.slice(0, 2), f = /* @__PURE__ */ React.createElement("el-button", { link: !0, type: "primary" }, "更多");
482
+ r.push(...m), r[3] = /* @__PURE__ */ React.createElement("el-dropdown", null, {
483
+ default: () => f,
484
+ dropdown: () => /* @__PURE__ */ React.createElement("el-dropdown-menu", null, k.slice(2).map((l) => /* @__PURE__ */ React.createElement("el-dropdown-item", null, l)))
485
+ });
486
+ const $ = e([...m, f]);
487
+ return s($), /* @__PURE__ */ React.createElement("div", { class: "operation-container" }, r);
488
+ }
489
+ return d[x(o.prop)] ? d[x(o.prop)](h) : o.tag ? /* @__PURE__ */ React.createElement("el-tag", { type: t(o, h) }, C(o, h)) : o.click && C(o, h) !== ee ? /* @__PURE__ */ React.createElement(
490
+ "span",
491
+ {
492
+ class: "el-link el-link--primary scan-link",
493
+ onClick: function() {
494
+ o.click(h == null ? void 0 : h.row);
495
+ }
496
+ },
497
+ o.formatter ? o.formatter(h.row, h.column, h.row[o.prop], h.$index) : C(o, h)
498
+ ) : /* @__PURE__ */ React.createElement(
499
+ "span",
500
+ {
501
+ class: ((W = jt(
502
+ ce(h.row, o.prop),
503
+ p.value.get(o.prop)
504
+ )) == null ? void 0 : W.state) || "text"
505
+ },
506
+ o.formatter ? o.formatter(h.row, h.column, h.row[o.prop], h.$index) : C(o, h)
507
+ );
508
+ },
509
+ header: (h) => o.headerRender ? o.headerRender(h) : d[`${x(o.prop)}Header`] ? d[`${x(o.prop)}Header`](h) : o.label
510
+ }
511
+ ));
512
+ return (o, h) => (_(), L(v, ct(it(a.value)), null, 16));
513
+ }
514
+ }), ra = { class: "custom-column-dialog" }, sa = { class: "table-body" }, ua = { class: "name" }, ca = {
515
+ key: 0,
516
+ class: "ml-10"
517
+ }, ia = { class: "custom-width-label text" }, da = {
518
+ key: 0,
519
+ class: "custom-width-input-box"
520
+ }, pa = { class: "custom-column-footer" }, ha = { class: "flex-1" }, ma = /* @__PURE__ */ ae({
521
+ __name: "ColSetting",
522
+ props: {
523
+ originTableColumns: { default: () => [] }
524
+ },
525
+ emits: ["close", "submit", "dragSort"],
526
+ setup(b, { expose: c, emit: a }) {
527
+ const d = R(), p = R(!1), C = b, t = R([]), v = R((/* @__PURE__ */ new Date()).getTime()), o = R(!1), h = R(), N = (s) => {
528
+ t.value = s, o.value = !0, me(() => {
529
+ O();
530
+ });
531
+ }, F = (s) => {
532
+ p.value = s;
533
+ }, W = a, A = async () => {
534
+ W("submit", t.value), o.value = !1;
535
+ }, O = () => {
536
+ h.value && (h.value.destroy(), v.value = (/* @__PURE__ */ new Date()).getTime(), d.value.doLayout()), me(() => {
537
+ const s = document.querySelector(".custom-column-dialog tbody");
538
+ h.value = Ne.create(s, {
539
+ handle: ".move",
540
+ animation: 300,
541
+ filter: ".operation",
542
+ onEnd({ newIndex: r, oldIndex: m }) {
543
+ if (!r || !m) return;
544
+ let f = H(t.value);
545
+ const $ = f[m];
546
+ if (r < m)
547
+ for (let l = r; l < m; l++)
548
+ f[l].order = String(Number(f[l].order) + 1);
549
+ else
550
+ for (let l = m + 1; l <= r; l++)
551
+ f[l].order = String(Number(f[l].order) - 1);
552
+ $.order = String(r), t.value = H(f);
553
+ }
554
+ });
555
+ });
556
+ }, k = () => {
557
+ const s = H(C.originTableColumns);
558
+ p.value ? t.value = s : t.value = t.value.map((r) => {
559
+ const m = t.value.find((f) => f.prop === r.prop);
560
+ return !(m != null && m.isShow) || m.prop === "operation" ? r : s.find((f) => f.prop === r.prop);
561
+ }), O();
562
+ }, e = () => {
563
+ o.value = !1;
564
+ };
565
+ return c({
566
+ openColSetting: N
567
+ }), (s, r) => {
568
+ const m = ie("el-checkbox"), f = ie("el-table-column"), $ = ie("el-icon");
569
+ return _(), z("div", ra, [
570
+ P(At, {
571
+ modelValue: o.value,
572
+ "onUpdate:modelValue": r[1] || (r[1] = (l) => o.value = l),
573
+ size: "middle"
574
+ }, {
575
+ header: S(() => r[2] || (r[2] = [
576
+ E("div", { class: "title" }, "自定义列", -1),
577
+ E("div", { class: "sub-title" }, "勾选需要展示的列,拖动列名进行排序", -1)
578
+ ])),
579
+ footer: S(() => [
580
+ E("div", pa, [
581
+ P(m, {
582
+ modelValue: p.value,
583
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => p.value = l),
584
+ class: "checkbox",
585
+ label: "全局",
586
+ onChange: F
587
+ }, null, 8, ["modelValue"]),
588
+ E("div", ha, [
589
+ P(Se, {
590
+ plain: "",
591
+ onClick: e
592
+ }, {
593
+ default: S(() => r[4] || (r[4] = [
594
+ G("取消")
595
+ ])),
596
+ _: 1
597
+ }),
598
+ P(Se, {
599
+ plain: "",
600
+ class: "w-auto",
601
+ onClick: k
602
+ }, {
603
+ default: S(() => [
604
+ G(Q(p.value ? "全局恢复默认" : "恢复默认"), 1)
605
+ ]),
606
+ _: 1
607
+ }),
608
+ P(Se, {
609
+ type: "primary",
610
+ onClick: A
611
+ }, {
612
+ default: S(() => r[5] || (r[5] = [
613
+ G("保存")
614
+ ])),
615
+ _: 1
616
+ })
617
+ ])
618
+ ])
619
+ ]),
620
+ default: S(() => [
621
+ E("div", sa, [
622
+ (_(), L(g(We), {
623
+ ref_key: "tableRef",
624
+ ref: d,
625
+ class: "custom-colum-table",
626
+ key: v.value,
627
+ data: t.value,
628
+ "row-class-name": (l) => l.row.prop === "operation" ? "operation" : ""
629
+ }, {
630
+ default: S(() => [
631
+ P(f, {
632
+ width: "100",
633
+ label: "选择"
634
+ }, {
635
+ default: S(({ row: l }) => [
636
+ P(m, {
637
+ class: "custom-column-check",
638
+ modelValue: l.isShow,
639
+ "onUpdate:modelValue": (w) => l.isShow = w,
640
+ disabled: l.readonly
641
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])
642
+ ]),
643
+ _: 1
644
+ }),
645
+ P(f, {
646
+ prop: "label",
647
+ label: "名称"
648
+ }, {
649
+ default: S(({ row: l }) => [
650
+ E("div", ua, [
651
+ G(Q(l.label) + " ", 1),
652
+ l.readonly ? (_(), z("span", ca, "(必选)")) : B("", !0),
653
+ l.prop !== "operation" ? (_(), L($, {
654
+ key: 1,
655
+ class: "move move-icon"
656
+ }, {
657
+ default: S(() => [
658
+ P(g($t))
659
+ ]),
660
+ _: 1
661
+ })) : B("", !0)
662
+ ])
663
+ ]),
664
+ _: 1
665
+ }),
666
+ P(f, {
667
+ prop: "width",
668
+ label: "宽度",
669
+ width: "180"
670
+ }, {
671
+ default: S(({ row: l }) => [
672
+ E("div", {
673
+ class: Ae(`custom-width-box ${l.readonly && "readonly"}`)
674
+ }, [
675
+ r[3] || (r[3] = E("span", { class: "text" }, "宽度", -1)),
676
+ E("span", ia, Q(l.width) + " px", 1),
677
+ l.readonly ? B("", !0) : (_(), z("div", da, [
678
+ P(g(je), {
679
+ modelValue: l.width,
680
+ "onUpdate:modelValue": (w) => l.width = w,
681
+ class: "custom-width-input",
682
+ min: 10,
683
+ max: 1e3,
684
+ controls: !1
685
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
686
+ ]))
687
+ ], 2)
688
+ ]),
689
+ _: 1
690
+ })
691
+ ]),
692
+ _: 1
693
+ }, 8, ["data", "row-class-name"]))
694
+ ])
695
+ ]),
696
+ _: 1
697
+ }, 8, ["modelValue"])
698
+ ]);
699
+ };
700
+ }
701
+ }), fa = /* @__PURE__ */ oe(ma, [["__scopeId", "data-v-0ae65c5f"]]), ga = { class: "no-card table-main zh-table" }, va = { class: "table-title-container" }, ba = {
702
+ key: 0,
703
+ class: "table-title"
704
+ }, ya = {
705
+ key: 1,
706
+ class: "table-header-tip"
707
+ }, Ca = { class: "table-header-container" }, Sa = {
708
+ key: 0,
709
+ class: "table-header"
710
+ }, _a = { class: "header-button-ri" }, wa = { class: "table-body-container" }, ka = { class: "text d-flex inline-input-text pointer" }, Pa = {
711
+ key: 1,
712
+ class: "inline-input-box d-flex"
713
+ }, Ta = { class: "table-empty" }, Ea = ["src"], $a = /* @__PURE__ */ ae({
714
+ __name: "Table",
715
+ props: {
716
+ columns: { default: () => [] },
717
+ data: {},
718
+ requestApi: {},
719
+ requestAuto: { type: Boolean, default: !0 },
720
+ requestError: { type: Function, default: (b) => {
721
+ console.error("protable中请求数据错误", b);
722
+ } },
723
+ handleParam: {},
724
+ dataCallback: {},
725
+ selectChangeCallback: {},
726
+ title: {},
727
+ pagination: { type: Boolean, default: !0 },
728
+ initParam: { default: {} },
729
+ border: { type: Boolean, default: !1 },
730
+ rowKey: { default: "id" },
731
+ isShowSearch: { type: Boolean, default: !0 },
732
+ maxHeight: {},
733
+ isShowSearchBtn: { type: Boolean, default: !0 },
734
+ isShowResetBtn: { type: Boolean, default: !0 },
735
+ customColumn: { type: Boolean, default: !1 },
736
+ onSortChange: {},
737
+ offset: {},
738
+ customColumnCacheKey: {},
739
+ customColumnPageCacheKey: {}
740
+ },
741
+ emits: ["search", "reset", "dargSort"],
742
+ setup(b, { expose: c, emit: a }) {
743
+ var ze;
744
+ const d = R((/* @__PURE__ */ new Date()).getTime()), p = {
745
+ mounted(n) {
746
+ var u;
747
+ (u = n.querySelector("input")) == null || u.focus();
748
+ }
749
+ }, C = Ue(), t = b, v = R(), o = ["selection", "radio", "index", "expand", "sort", "input"], h = R(t.isShowSearch), N = R(""), F = R({}), W = R(t.maxHeight || "1000px"), { selectionChange: A, selectedList: O, selectedListIds: k, isSelected: e } = xt(t.rowKey, t.selectChangeCallback), {
750
+ loading: s,
751
+ tableData: r,
752
+ pageable: m,
753
+ searchParam: f,
754
+ searchInitParam: $,
755
+ getTableList: l,
756
+ search: w,
757
+ reset: T,
758
+ handleSizeChange: I,
759
+ handleCurrentChange: D
760
+ } = Kt(t.requestApi, t.initParam, t.pagination, t.dataCallback, t.requestError, t.handleParam), U = (n) => {
761
+ function u(ot) {
762
+ return ot.replace(/[A-Z]/g, (lt) => "_" + lt.toLowerCase());
763
+ }
764
+ const y = {
765
+ ascending: "asc",
766
+ descending: "desc"
767
+ }, { prop: i, order: M } = n, K = u(x(i)), ue = y[M];
768
+ f.value = {
769
+ ...f.value,
770
+ sortKey: K,
771
+ sortOrder: ue
772
+ }, m.value.page = 1, w();
773
+ }, q = () => v.value.clearSelection(), ge = () => v.value.clearSort(), ke = R(!1), Pe = () => {
774
+ Je(), at(), t.requestAuto && l(), t.data && (m.value.total = t.data.length);
775
+ };
776
+ dt(() => {
777
+ Pe(), me(() => {
778
+ ke.value = !0;
779
+ });
780
+ }), pt(() => {
781
+ ke.value && Pe();
782
+ }), ht(() => {
783
+ }), mt(() => {
784
+ });
785
+ const le = V(() => t.data ? t.pagination ? t.data.slice((m.value.page - 1) * m.value.size, m.value.size * m.value.page) : t.data : r.value), He = (n) => {
786
+ m.value.total = n;
787
+ };
788
+ ft(() => t.initParam, l, { deep: !0 });
789
+ let ne = Y(t.columns);
790
+ const qe = V(() => Te(ne)), J = R(/* @__PURE__ */ new Map()), Ze = async ({ prop: n, enum: u }) => {
791
+ if (!u || J.value.has(n) && (typeof u == "function" || J.value.get(n) === u)) return;
792
+ if (typeof u != "function") return J.value.set(n, g(u));
793
+ J.value.set(n, []);
794
+ const { data: y } = await u();
795
+ J.value.set(n, y);
796
+ };
797
+ gt("enumMap", J);
798
+ const Te = (n, u = []) => (n.forEach(async (y) => {
799
+ var i;
800
+ (i = y._children) != null && i.length && u.push(...Te(y._children)), u.push(y), y.isShow = y.isShow ?? !0, y.isFilterEnum = y.isFilterEnum ?? !0, await Ze(y);
801
+ }), u.filter((y) => {
802
+ var i;
803
+ return !((i = y._children) != null && i.length);
804
+ })), Ee = V(() => {
805
+ var n;
806
+ return (n = qe.value) == null ? void 0 : n.filter((u) => {
807
+ var y, i;
808
+ return ((y = u.search) == null ? void 0 : y.el) || ((i = u.search) == null ? void 0 : i.render);
809
+ }).sort((u, y) => u.search.order - y.search.order);
810
+ });
811
+ (ze = Ee.value) == null || ze.forEach((n, u) => {
812
+ var M, K, ue;
813
+ n.search.order = ((M = n.search) == null ? void 0 : M.order) ?? u + 2;
814
+ const y = ((K = n.search) == null ? void 0 : K.key) ?? x(n.prop), i = (ue = n.search) == null ? void 0 : ue.defaultValue;
815
+ i != null && ($.value[y] = i, f.value[y] = i);
816
+ });
817
+ const ve = a, Ge = () => {
818
+ var n;
819
+ (n = v.value) == null || n.clearSelection(), w(), ve("search");
820
+ }, Qe = () => {
821
+ T(), ge(), ve("reset");
822
+ }, Je = () => {
823
+ const n = document.querySelector(".el-table__body-wrapper tbody");
824
+ n && Ne.create(n, {
825
+ handle: ".move",
826
+ animation: 300,
827
+ onEnd({ newIndex: u, oldIndex: y }) {
828
+ const [i] = le.value.splice(y, 1);
829
+ le.value.splice(u, 0, i), ve("dargSort", { newIndex: u, oldIndex: y });
830
+ }
831
+ });
832
+ }, re = R(0), Ye = (n, u) => {
833
+ const y = r.value.findIndex((i) => i.$showInput);
834
+ y > -1 && (r.value[y] = H(F.value), r.value[y].$showInput = !1), re.value = De(n, String(u)), n.$showInput = !0, F.value = H(n);
835
+ }, Xe = async (n, u, y) => {
836
+ Dt(n, u, re.value), y && await y(n), n.$showInput = !1, Vt.success("更新成功"), await l();
837
+ }, et = async (n) => {
838
+ const u = r.value.findIndex((y) => Ft(Me(y, Le), Me(n, Le)));
839
+ u > -1 && (r.value[u] = H(F.value), r.value[u].$showInput = !1);
840
+ }, $e = qt(t.customColumnCacheKey), Be = R(null), be = () => ne.map(
841
+ (n, u) => ({
842
+ readonly: n.isCustomDisable || ["id", "operation"].includes(String(n.prop)),
843
+ order: u,
844
+ index: u,
845
+ width: n.width || n.minWidth,
846
+ ...n
847
+ })
848
+ ).sort((n, u) => {
849
+ const y = Number(n.order), i = Number(u.order);
850
+ return y - i;
851
+ }), tt = () => {
852
+ se = Y(be()), me(() => {
853
+ Be.value.openColSetting(H(se));
854
+ });
855
+ }, at = () => {
856
+ if (!t.customColumnPageCacheKey) return;
857
+ const n = $e.getColumnCache(t.customColumnPageCacheKey);
858
+ n != null && n.length && (se = Y(n), ne = Y(se));
859
+ };
860
+ let se = Y(be());
861
+ const Re = H(be()), nt = (n) => {
862
+ t.customColumnPageCacheKey && (n = n.map((u) => {
863
+ const y = Re.find((i) => i.prop === u.prop);
864
+ return y && y.minWidth && (u.minWidth = u.width, delete u.width), u;
865
+ }), ne = Y(H(n)), $e.setColumnCache(t.customColumnPageCacheKey, n), d.value = (/* @__PURE__ */ new Date()).getTime(), v.value.doLayout());
866
+ };
867
+ return c({
868
+ element: v,
869
+ tableData: le,
870
+ radio: N,
871
+ pageable: m,
872
+ searchParam: f,
873
+ searchInitParam: $,
874
+ setPageTotal: He,
875
+ getTableList: l,
876
+ search: w,
877
+ reset: T,
878
+ handleSizeChange: I,
879
+ handleCurrentChange: D,
880
+ clearSelection: q,
881
+ enumMap: J,
882
+ isSelected: e,
883
+ selectedList: O,
884
+ selectedListIds: k
885
+ }), (n, u) => {
886
+ const y = vt("loading");
887
+ return _(), L(g(Bt), { locale: g(Rt) }, {
888
+ default: S(() => [
889
+ E("div", ga, [
890
+ E("div", va, [
891
+ n.title ? (_(), z("div", ba, Q(n.title), 1)) : B("", !0),
892
+ g(C).headerTip ? (_(), z("div", ya, [
893
+ j(n.$slots, "headerTip", {}, void 0, !0)
894
+ ])) : B("", !0)
895
+ ]),
896
+ E("div", Ca, [
897
+ ye(P(ta, {
898
+ search: Ge,
899
+ reset: Qe,
900
+ columns: Ee.value,
901
+ "search-param": g(f),
902
+ "is-show-reset-btn": t.isShowResetBtn,
903
+ "is-show-search-btn": t.isShowSearchBtn
904
+ }, {
905
+ default: S(() => [
906
+ n.$slots.tableHeader ? (_(), z("div", Sa, [
907
+ E("div", _a, [
908
+ j(n.$slots, "tableHeader", {
909
+ selectedList: g(O),
910
+ selectedListIds: g(k),
911
+ isSelected: g(e)
912
+ }, void 0, !0)
913
+ ])
914
+ ])) : B("", !0)
915
+ ]),
916
+ _: 3
917
+ }, 8, ["columns", "search-param", "is-show-reset-btn", "is-show-search-btn"]), [
918
+ [bt, h.value]
919
+ ])
920
+ ]),
921
+ E("div", wa, [
922
+ t.customColumn ? (_(), z("div", {
923
+ key: 0,
924
+ class: "col-setting-button",
925
+ onClick: tt
926
+ }, [
927
+ P(g(fe), {
928
+ class: "box-item",
929
+ effect: "dark",
930
+ content: "自定义列",
931
+ placement: "top"
932
+ }, {
933
+ default: S(() => [
934
+ P(g(_e), {
935
+ size: 14,
936
+ color: "#000000a6"
937
+ }, {
938
+ default: S(() => [
939
+ P(g(zt))
940
+ ]),
941
+ _: 1
942
+ })
943
+ ]),
944
+ _: 1
945
+ })
946
+ ])) : B("", !0),
947
+ ye((_(), L(g(We), X({
948
+ ref_key: "tableRef",
949
+ ref: v
950
+ }, n.$attrs, {
951
+ key: d.value,
952
+ data: le.value,
953
+ border: n.border,
954
+ "row-key": n.rowKey,
955
+ "max-height": W.value,
956
+ "row-style": { height: "42px" },
957
+ "tooltip-effect": "light",
958
+ "tooltip-options": { showArrow: !1, placement: "bottom-start", offset: t.offset ? t.offset : -20 }
959
+ }, yt(n.$attrs), {
960
+ onSelectionChange: g(A),
961
+ onSortChange: u[1] || (u[1] = (i) => t.onSortChange ? t.onSortChange(i) : U(i))
962
+ }), {
963
+ append: S(() => [
964
+ j(n.$slots, "append", {}, void 0, !0)
965
+ ]),
966
+ empty: S(() => [
967
+ E("div", Ta, [
968
+ j(n.$slots, "empty", {}, () => [
969
+ E("img", {
970
+ src: `${g(Ot)}ghy-components/empty.png`,
971
+ alt: "notData"
972
+ }, null, 8, Ea),
973
+ u[5] || (u[5] = E("div", null, "暂无数据", -1))
974
+ ], !0)
975
+ ])
976
+ ]),
977
+ default: S(() => [
978
+ (_(!0), z(Z, null, he(g(ne).sort((i, M) => i.order - M.order), (i) => (_(), z(Z, { key: i }, [
979
+ i.type && o.includes(i.type) && i.isShow ? (_(), L(g(It), X({
980
+ key: 0,
981
+ ref_for: !0
982
+ }, i, {
983
+ align: i.align ?? "left",
984
+ "reserve-selection": i.type == "selection"
985
+ }), pe({
986
+ default: S((M) => [
987
+ i.type == "expand" ? (_(), z(Z, { key: 0 }, [
988
+ i.render ? (_(), L(de(i.render), X({
989
+ key: 0,
990
+ ref_for: !0
991
+ }, M), null, 16)) : j(n.$slots, i.type, X({
992
+ key: 1,
993
+ ref_for: !0
994
+ }, M), void 0, !0)
995
+ ], 64)) : B("", !0),
996
+ i.type == "sort" ? (_(), L(g(Mt), {
997
+ key: 1,
998
+ class: "move"
999
+ }, {
1000
+ default: S(() => [
1001
+ P(g(_e), null, {
1002
+ default: S(() => [
1003
+ P(g(Lt))
1004
+ ]),
1005
+ _: 1
1006
+ })
1007
+ ]),
1008
+ _: 1
1009
+ })) : B("", !0),
1010
+ i.type == "input" ? (_(), z(Z, { key: 2 }, [
1011
+ M.row.$showInput ? (_(), z("div", Pa, [
1012
+ ye(P(g(je), {
1013
+ min: 0,
1014
+ max: n.MAX_WEIGHT,
1015
+ controls: !1,
1016
+ modelValue: re.value,
1017
+ "onUpdate:modelValue": u[0] || (u[0] = (K) => re.value = K)
1018
+ }, null, 8, ["max", "modelValue"]), [
1019
+ [p]
1020
+ ]),
1021
+ P(g(Ce), {
1022
+ type: "primary",
1023
+ underline: !1,
1024
+ onClick: (K) => Xe(M.row, String(i.prop), i.blurCallback),
1025
+ class: "ml-5"
1026
+ }, {
1027
+ default: S(() => u[3] || (u[3] = [
1028
+ G(" 保存 ")
1029
+ ])),
1030
+ _: 2
1031
+ }, 1032, ["onClick"]),
1032
+ P(g(Ce), {
1033
+ type: "primary",
1034
+ underline: !1,
1035
+ onClick: (K) => et(M.row),
1036
+ class: "ml-5"
1037
+ }, {
1038
+ default: S(() => u[4] || (u[4] = [
1039
+ G(" 取消 ")
1040
+ ])),
1041
+ _: 2
1042
+ }, 1032, ["onClick"])
1043
+ ])) : (_(), L(g(fe), {
1044
+ key: 0,
1045
+ content: "编辑",
1046
+ placement: "top"
1047
+ }, {
1048
+ default: S(() => [
1049
+ E("span", ka, [
1050
+ G(Q(g(De)(M.row, String(i.prop))) + " ", 1),
1051
+ P(g(Ce), {
1052
+ underline: !1,
1053
+ disabled: n.userStore.banButton,
1054
+ class: "text d-flex inline-input-text pointer",
1055
+ onClick: (K) => Ye(M.row, i.prop)
1056
+ }, {
1057
+ default: S(() => u[2] || (u[2] = [
1058
+ E("i", { class: "iconfont icon-edit" }, null, -1)
1059
+ ])),
1060
+ _: 2
1061
+ }, 1032, ["disabled", "onClick"])
1062
+ ])
1063
+ ]),
1064
+ _: 2
1065
+ }, 1024))
1066
+ ], 64)) : B("", !0)
1067
+ ]),
1068
+ _: 2
1069
+ }, [
1070
+ i.headerRender ? {
1071
+ name: "header",
1072
+ fn: S((M) => [
1073
+ (_(), L(de(i.headerRender), X({ ref_for: !0 }, M), null, 16))
1074
+ ]),
1075
+ key: "0"
1076
+ } : void 0
1077
+ ]), 1040, ["align", "reserve-selection"])) : B("", !0),
1078
+ !i.type && i.prop && i.isShow ? (_(), L(la, {
1079
+ key: 1,
1080
+ column: i,
1081
+ "custom-column": n.customColumn
1082
+ }, pe({ _: 2 }, [
1083
+ he(Object.keys(n.$slots), (M) => ({
1084
+ name: M,
1085
+ fn: S((K) => [
1086
+ j(n.$slots, M, X({ ref_for: !0 }, K), void 0, !0)
1087
+ ])
1088
+ }))
1089
+ ]), 1032, ["column", "custom-column"])) : B("", !0)
1090
+ ], 64))), 128))
1091
+ ]),
1092
+ _: 3
1093
+ }, 16, ["data", "border", "row-key", "max-height", "tooltip-options", "onSelectionChange"])), [
1094
+ [y, g(s)]
1095
+ ])
1096
+ ]),
1097
+ j(n.$slots, "pagination", {}, () => [
1098
+ n.pagination ? (_(), L(oa, {
1099
+ key: 0,
1100
+ pageable: g(m),
1101
+ "handle-size-change": g(I),
1102
+ "handle-current-change": g(D)
1103
+ }, null, 8, ["pageable", "handle-size-change", "handle-current-change"])) : B("", !0)
1104
+ ], !0)
1105
+ ]),
1106
+ t.customColumn ? (_(), L(fa, {
1107
+ key: 0,
1108
+ ref_key: "colRef",
1109
+ ref: Be,
1110
+ "origin-table-columns": g(Re),
1111
+ onSubmit: nt
1112
+ }, null, 8, ["origin-table-columns"])) : B("", !0)
1113
+ ]),
1114
+ _: 3
1115
+ }, 8, ["locale"]);
1116
+ };
1117
+ }
1118
+ }), Ba = /* @__PURE__ */ oe($a, [["__scopeId", "data-v-7bb3e01f"]]), Va = Ut(Ba);
1119
+ export {
1120
+ Va as Z
1121
+ };