zhihao-ui 1.2.67 → 1.2.68

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