asiaint-lowcode 3.1.65 → 3.1.67
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/asiaint-lowcode.js +1 -1
- package/dist/asiaint-lowcode.umd.cjs +164 -164
- package/dist/index.d.ts +5 -4
- package/dist/lazy/{Card-DQy_73W2.js → Card-1LRb9cxy.js} +1 -1
- package/dist/lazy/{Cascader-CtzTW0RD.js → Cascader-Hc82QRlm.js} +1 -1
- package/dist/lazy/{Checkbox-C3JNZICi.js → Checkbox-M-jhT3N1.js} +2 -2
- package/dist/lazy/{Collapse-DJEQap5X.js → Collapse-C7tEg1j-.js} +1 -1
- package/dist/lazy/{Component-y3aOd9-z.js → Component-B4W8-ytw.js} +1 -1
- package/dist/lazy/{Component-BAshTLOg.js → Component-CMNqst14.js} +1 -1
- package/dist/lazy/{Component-ZUBGroaY.js → Component-COzAVkzz.js} +1 -1
- package/dist/lazy/{Component-BgK6mQbn.js → Component-CTOFM8CV.js} +1 -1
- package/dist/lazy/{Component-Bgfsr2ts.js → Component-CsPZQWoo.js} +1 -1
- package/dist/lazy/{Component-kzLbZu4h.js → Component-DBg99hlT.js} +1 -1
- package/dist/lazy/{CurdCard-MiLLhlHM.js → CurdCard-BrWJUvcs.js} +1 -1
- package/dist/lazy/{Custom-CliCe8Bw.js → Custom-DSO2q6bS.js} +1 -1
- package/dist/lazy/{DatePicker-Db8N5LY3.js → DatePicker-VsFok0BM.js} +1 -1
- package/dist/lazy/{DragList-BaqZTGpm.js → DragList-DG33jgkE.js} +1 -1
- package/dist/lazy/{FilterSearch-C_G3s8Kb.js → FilterSearch-PSvvnq5L.js} +1 -1
- package/dist/lazy/{FloatCurd-CETKnryY.js → FloatCurd-BmLMaa6y.js} +1 -1
- package/dist/lazy/{FormList-C9VKupXL.js → FormList-Ba7DPhTO.js} +1 -1
- package/dist/lazy/{Grid-Cu4bJr2B.js → Grid-BAtB3KUm.js} +1 -1
- package/dist/lazy/{InfiniteScroll-DOHRPkbR.js → InfiniteScroll-BQPKbiOw.js} +1 -1
- package/dist/lazy/{Inline-C9PXiuaQ.js → Inline-BxMi0vVv.js} +1 -1
- package/dist/lazy/{JsonEdit-CNPEB1LW.js → JsonEdit-RvpkznKI.js} +1 -1
- package/dist/lazy/{LogList-kGXJGj-z.js → LogList-CpT-0HH4.js} +1 -1
- package/dist/lazy/{ObjGroup-CYDCbHM1.js → ObjGroup-ChEPmWju.js} +1 -1
- package/dist/lazy/{OfferDetails-R_FY79Lo.js → OfferDetails-CTyVBQ9q.js} +1 -1
- package/dist/lazy/{Pagination-ox2qBRDh.js → Pagination-CLVNlN_G.js} +1 -1
- package/dist/lazy/{Progress-B4Xmwvaz.js → Progress-CeK1Wxfz.js} +1 -1
- package/dist/lazy/{Radio-DQ6rOHW7.js → Radio-D3Frpudo.js} +2 -2
- package/dist/lazy/{SearchSelect-xkqLFAOp.js → SearchSelect-Ck5rXCHi.js} +2 -2
- package/dist/lazy/{Select-BHTnDN0y.js → Select-BcLHxyke.js} +2 -2
- package/dist/lazy/Table-DXB2Aihi.js +619 -0
- package/dist/lazy/{Tabs-Bkr-2IyV.js → Tabs-KcE9xDjh.js} +1 -1
- package/dist/lazy/{TextArea-CLd9cWwX.js → TextArea-BbflBxSb.js} +1 -1
- package/dist/lazy/{Wrapper-D9cUKd1F.js → Wrapper-BxwoBeta.js} +1 -1
- package/dist/lazy/{index-BKTTTi1O.js → index-CShYNljc.js} +2828 -2808
- package/dist/lazy/{useSelect-DUoT9O0Z.js → useSelect-5CLgyy83.js} +1 -1
- package/dist/style.css +2 -2
- package/package.json +1 -1
- package/dist/lazy/Table-DBYCRi60.js +0 -609
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
import { defineComponent as Ye, computed as j, inject as U, ref as z, useTemplateRef as Ze, onMounted as et, onActivated as tt, onBeforeUnmount as nt, readonly as at, toRefs as ot, onUnmounted as lt, resolveComponent as T, openBlock as r, createElementBlock as d, normalizeClass as $, createVNode as m, withCtx as v, createElementVNode as P, toDisplayString as b, unref as g, createCommentVNode as y, withDirectives as pe, createBlock as k, Fragment as _, renderList as de, normalizeStyle as J, withModifiers as ge, vShow as ve, mergeProps as rt, nextTick as it } from "vue";
|
|
2
|
+
import { $ as st, h as I, k as ut, j as ct, a as pt, I as D, b as W, C as dt, _ as gt } from "./index-CShYNljc.js";
|
|
3
|
+
import { ElTable as vt, ElLoading as he, ElMessage as ht } from "element-plus";
|
|
4
|
+
const mt = ["id"], yt = { class: "custom-slot" }, ft = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "poll-wrapper"
|
|
7
|
+
}, Ct = { class: "empty-content" }, kt = ["title"], zt = ["title", "onClick"], Pt = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "icon-text-wrapper"
|
|
10
|
+
}, St = ["title", "onClick"], bt = { key: 2 }, wt = ["title"], Bt = { class: "row-btn-wrapper" }, Nt = /* @__PURE__ */ Ye({
|
|
11
|
+
__name: "Table",
|
|
12
|
+
props: {
|
|
13
|
+
title: {},
|
|
14
|
+
key: {},
|
|
15
|
+
rulePath: {},
|
|
16
|
+
rowKey: {},
|
|
17
|
+
showDynamicSearch: { type: Boolean },
|
|
18
|
+
multipleSelection: { type: Boolean },
|
|
19
|
+
highlightCurrentRow: { type: Boolean },
|
|
20
|
+
"highlight-current-row": { type: Boolean },
|
|
21
|
+
stripe: { type: Boolean },
|
|
22
|
+
rowClick: {},
|
|
23
|
+
rowDbClick: {},
|
|
24
|
+
sizeChange: {},
|
|
25
|
+
pageChange: {},
|
|
26
|
+
topBtns: {},
|
|
27
|
+
rowBtns: {},
|
|
28
|
+
rowBtnsLabel: {},
|
|
29
|
+
rowBtnsWidth: {},
|
|
30
|
+
columns: {},
|
|
31
|
+
hidden: { type: Boolean },
|
|
32
|
+
hiddenPagination: { type: Boolean },
|
|
33
|
+
handleCurrentChange: {},
|
|
34
|
+
selectable: {},
|
|
35
|
+
pageSizes: {},
|
|
36
|
+
pagerCount: {},
|
|
37
|
+
paginationLayout: {},
|
|
38
|
+
defaultPageSize: {},
|
|
39
|
+
typeSwitch: { type: Boolean },
|
|
40
|
+
displayType: { default: "table" },
|
|
41
|
+
onMounted: {},
|
|
42
|
+
onActivated: {},
|
|
43
|
+
height: {},
|
|
44
|
+
collapsible: { type: Boolean },
|
|
45
|
+
sortable: { type: Boolean, default: !0 },
|
|
46
|
+
paginationPosition: {},
|
|
47
|
+
totalText: {},
|
|
48
|
+
onPollChange: {},
|
|
49
|
+
showPollCheckbox: { type: Boolean },
|
|
50
|
+
name: {},
|
|
51
|
+
gridColumns: {}
|
|
52
|
+
},
|
|
53
|
+
setup(me, { expose: ye }) {
|
|
54
|
+
const a = me, x = j(() => a.displayType ? a.displayType : a.typeSwitch ? "card" : "table"), fe = U("ruleModule", void 0), O = U("ruleMap", void 0), c = j(() => a.rulePath && O[a.rulePath] ? O[a.rulePath] : fe), h = U("pageMethodMap", {}), L = U("getGlobalParams", () => {
|
|
55
|
+
}), Q = U(st), X = Q ? Q.translateFn : null, N = z(), Ce = (e, t, o) => {
|
|
56
|
+
p.value[e] && (p.value[e][t] = o);
|
|
57
|
+
}, ke = (e, t) => {
|
|
58
|
+
const o = a.columns.find((s) => s.key === e);
|
|
59
|
+
o && (o.hidden = !t);
|
|
60
|
+
}, F = (e, t, o, s) => {
|
|
61
|
+
try {
|
|
62
|
+
c.value[e.onClick](h, t, o, s), s == null || s.stopPropagation();
|
|
63
|
+
} catch (C) {
|
|
64
|
+
console.error(C);
|
|
65
|
+
}
|
|
66
|
+
}, ze = (e) => {
|
|
67
|
+
if (a.rowClick)
|
|
68
|
+
try {
|
|
69
|
+
c.value[a.rowClick](h, e);
|
|
70
|
+
} catch (t) {
|
|
71
|
+
console.error(t);
|
|
72
|
+
}
|
|
73
|
+
}, Pe = (e) => {
|
|
74
|
+
if (a.rowDbClick)
|
|
75
|
+
try {
|
|
76
|
+
c.value[a.rowDbClick](h, e);
|
|
77
|
+
} catch (t) {
|
|
78
|
+
console.error(t);
|
|
79
|
+
}
|
|
80
|
+
}, Se = z([]), be = (e) => {
|
|
81
|
+
Se.value = e;
|
|
82
|
+
}, we = (e, t) => {
|
|
83
|
+
if (!a.selectable)
|
|
84
|
+
return !0;
|
|
85
|
+
try {
|
|
86
|
+
return c.value[a.selectable](h, e, t);
|
|
87
|
+
} catch (o) {
|
|
88
|
+
console.error(o);
|
|
89
|
+
}
|
|
90
|
+
return !0;
|
|
91
|
+
}, Be = () => {
|
|
92
|
+
var e;
|
|
93
|
+
(e = N.value) == null || e.clearSelection();
|
|
94
|
+
}, Ne = (e, t) => {
|
|
95
|
+
var o, s;
|
|
96
|
+
if (a.rowKey) {
|
|
97
|
+
const C = p.value.find((V) => V[a.rowKey] === e);
|
|
98
|
+
if (!C)
|
|
99
|
+
return;
|
|
100
|
+
t === void 0 ? (o = N.value) == null || o.toggleRowSelection(C) : (s = N.value) == null || s.toggleRowSelection(C, t);
|
|
101
|
+
} else
|
|
102
|
+
return console.error("rowKey is required");
|
|
103
|
+
}, Re = () => p.value, Y = z(), Te = (e) => {
|
|
104
|
+
if (Y.value = e, !!a.handleCurrentChange)
|
|
105
|
+
try {
|
|
106
|
+
c.value[a.handleCurrentChange](h, e);
|
|
107
|
+
} catch (t) {
|
|
108
|
+
console.error(t);
|
|
109
|
+
}
|
|
110
|
+
}, _e = () => Y.value, Me = () => {
|
|
111
|
+
var e;
|
|
112
|
+
return (e = N.value) == null ? void 0 : e.getSelectionRows();
|
|
113
|
+
}, $e = async () => !0, Ie = (e, t) => {
|
|
114
|
+
var s;
|
|
115
|
+
const o = (s = a.topBtns) == null ? void 0 : s.find((C) => C.key === e);
|
|
116
|
+
o && (o.hidden = t);
|
|
117
|
+
}, De = (e, t) => {
|
|
118
|
+
var s;
|
|
119
|
+
const o = (s = a.rowBtns) == null ? void 0 : s.find((C) => C.key === e);
|
|
120
|
+
o && (o.condition = !t);
|
|
121
|
+
}, K = z(0), xe = (e) => {
|
|
122
|
+
K.value = e;
|
|
123
|
+
}, i = z({ pageNum: 1, pageSize: a.defaultPageSize || 5 }), w = z({ pageNum: 1, pageSize: a.defaultPageSize || 5 }), Le = () => i.value, Ve = (e) => {
|
|
124
|
+
let t = !1;
|
|
125
|
+
return e.pageNum !== void 0 && e.pageNum > -1 && (i.value.pageNum !== e.pageNum && (t = !0), i.value.pageNum = e.pageNum), e.pageSize !== void 0 && e.pageSize > -1 && (i.value.pageSize !== e.pageSize && (t = !0), i.value.pageSize = e.pageSize), { pagination: i.value, isChange: t };
|
|
126
|
+
}, Z = async () => {
|
|
127
|
+
if (i.value.pageNum = 1, !a.sizeChange)
|
|
128
|
+
return;
|
|
129
|
+
const e = he.service({
|
|
130
|
+
target: `#${a.name}`,
|
|
131
|
+
text: "Loading..."
|
|
132
|
+
});
|
|
133
|
+
try {
|
|
134
|
+
await c.value[a.sizeChange](h, i.value), w.value.pageNum = i.value.pageNum, w.value.pageSize = i.value.pageSize;
|
|
135
|
+
} catch (t) {
|
|
136
|
+
console.error(t), i.value.pageNum = w.value.pageNum, i.value.pageSize = w.value.pageSize;
|
|
137
|
+
} finally {
|
|
138
|
+
e.close();
|
|
139
|
+
}
|
|
140
|
+
}, ee = async () => {
|
|
141
|
+
if (!a.pageChange)
|
|
142
|
+
return;
|
|
143
|
+
const e = he.service({
|
|
144
|
+
target: `#${a.name}`,
|
|
145
|
+
text: "Loading..."
|
|
146
|
+
});
|
|
147
|
+
try {
|
|
148
|
+
await c.value[a.pageChange](h, i.value), w.value.pageNum = i.value.pageNum, w.value.pageSize = i.value.pageSize;
|
|
149
|
+
} catch (t) {
|
|
150
|
+
console.error(t), i.value.pageNum = w.value.pageNum, i.value.pageSize = w.value.pageSize;
|
|
151
|
+
} finally {
|
|
152
|
+
e.close();
|
|
153
|
+
}
|
|
154
|
+
}, Ae = (e) => {
|
|
155
|
+
var t;
|
|
156
|
+
(t = N.value) == null || t.setCurrentRow(e);
|
|
157
|
+
}, Ee = (e) => {
|
|
158
|
+
var t;
|
|
159
|
+
(t = N.value) == null || t.setCurrentRow(p.value[e]);
|
|
160
|
+
}, Ue = (e, t, o) => {
|
|
161
|
+
a.columns.forEach((s) => {
|
|
162
|
+
s.key === e && s[t] && (s[t] = o);
|
|
163
|
+
});
|
|
164
|
+
}, p = z([]), Fe = (e) => {
|
|
165
|
+
p.value = e || [];
|
|
166
|
+
}, Ke = (e = {}) => {
|
|
167
|
+
p.value.push(e);
|
|
168
|
+
}, He = (e) => {
|
|
169
|
+
e >= 0 && e < p.value.length && p.value.splice(e, 1);
|
|
170
|
+
}, je = async () => {
|
|
171
|
+
p.value = [...p.value];
|
|
172
|
+
}, te = Ze("rootRef"), R = (e, t) => {
|
|
173
|
+
const o = X ? X(e, t) : t[e.key];
|
|
174
|
+
if (!e.encrypted || !o)
|
|
175
|
+
return o;
|
|
176
|
+
const s = `${o}`;
|
|
177
|
+
return s.length <= 4 ? "*".repeat(s.length) : s.slice(0, -4) + "****";
|
|
178
|
+
}, We = (e, t) => {
|
|
179
|
+
if (!e.getTextStyle || !c.value)
|
|
180
|
+
return {};
|
|
181
|
+
try {
|
|
182
|
+
return c.value[e.getTextStyle](h, t, e);
|
|
183
|
+
} catch (o) {
|
|
184
|
+
console.error(o);
|
|
185
|
+
}
|
|
186
|
+
}, B = (e, t) => {
|
|
187
|
+
if (!(!e.getIconInfo || !c.value))
|
|
188
|
+
try {
|
|
189
|
+
return c.value[e.getIconInfo](h, t, e);
|
|
190
|
+
} catch (o) {
|
|
191
|
+
console.error(o);
|
|
192
|
+
}
|
|
193
|
+
}, H = (e, t) => {
|
|
194
|
+
if (!(!e.getIconPopoverContent || !c.value))
|
|
195
|
+
try {
|
|
196
|
+
return c.value[e.getIconPopoverContent](h, t, e);
|
|
197
|
+
} catch (o) {
|
|
198
|
+
console.error(o);
|
|
199
|
+
}
|
|
200
|
+
}, Ge = (e, t) => {
|
|
201
|
+
if (!(!e.getCustomContent || !c.value))
|
|
202
|
+
try {
|
|
203
|
+
return c.value[e.getCustomContent](h, t, e);
|
|
204
|
+
} catch (o) {
|
|
205
|
+
console.error(o);
|
|
206
|
+
}
|
|
207
|
+
}, qe = j(() => !a.rowBtns || a.rowBtns.length === 0 || !p.value || p.value.length === 0 ? !1 : p.value.some(
|
|
208
|
+
(e) => {
|
|
209
|
+
var t;
|
|
210
|
+
return (t = a.rowBtns) == null ? void 0 : t.some((o) => o.condition === void 0 || o.condition === null ? !0 : I(o.condition, {
|
|
211
|
+
$row: e,
|
|
212
|
+
$globalParams: L()
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
)), ne = ut(), G = z(a.showPollCheckbox || !1), ae = z(10), f = z(10), Je = (e) => {
|
|
216
|
+
try {
|
|
217
|
+
a.onPollChange && c.value[a.onPollChange](h, e ? f.value : 0);
|
|
218
|
+
} catch (t) {
|
|
219
|
+
console.error(t);
|
|
220
|
+
}
|
|
221
|
+
}, Oe = (e) => {
|
|
222
|
+
if (f.value = Number(e), Number.isInteger(f.value) || (f.value = Math.floor(f.value)), f.value <= 0 || f.value > 99) {
|
|
223
|
+
f.value = ae.value, ht.warning("Incorrect input. Please input number in 1-99 seconds");
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
try {
|
|
227
|
+
a.onPollChange && (c.value[a.onPollChange](h, f.value), ae.value = f.value);
|
|
228
|
+
} catch (t) {
|
|
229
|
+
console.error(t);
|
|
230
|
+
}
|
|
231
|
+
}, Qe = z(void 0), Xe = j(() => Qe.value || a.height), oe = async () => {
|
|
232
|
+
if (!a.onMounted || !c.value)
|
|
233
|
+
return;
|
|
234
|
+
await it();
|
|
235
|
+
const e = a.onMounted;
|
|
236
|
+
try {
|
|
237
|
+
c.value[e](h);
|
|
238
|
+
} catch (t) {
|
|
239
|
+
console.error(t);
|
|
240
|
+
}
|
|
241
|
+
}, le = async () => {
|
|
242
|
+
if (!a.onActivated || !c.value)
|
|
243
|
+
return;
|
|
244
|
+
const e = a.onActivated;
|
|
245
|
+
try {
|
|
246
|
+
c.value[e](h);
|
|
247
|
+
} catch (t) {
|
|
248
|
+
console.error(t);
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
et(async () => {
|
|
252
|
+
await oe();
|
|
253
|
+
}), tt(() => {
|
|
254
|
+
le();
|
|
255
|
+
}), nt(() => {
|
|
256
|
+
});
|
|
257
|
+
const re = at({
|
|
258
|
+
...ot(a),
|
|
259
|
+
setCellData: Ce,
|
|
260
|
+
clearSelection: Be,
|
|
261
|
+
getData: Re,
|
|
262
|
+
getCurrentRow: _e,
|
|
263
|
+
getSelectedRows: Me,
|
|
264
|
+
addRow: Ke,
|
|
265
|
+
deleteRow: He,
|
|
266
|
+
refresh: je,
|
|
267
|
+
validate: $e,
|
|
268
|
+
setData: Fe,
|
|
269
|
+
selectRow: Ae,
|
|
270
|
+
selectRowNum: Ee,
|
|
271
|
+
setTotal: xe,
|
|
272
|
+
getPagination: Le,
|
|
273
|
+
setPagination: Ve,
|
|
274
|
+
setTopBtnHidden: Ie,
|
|
275
|
+
setColVisible: ke,
|
|
276
|
+
setColumn: Ue,
|
|
277
|
+
setRowsBtnHidden: De,
|
|
278
|
+
pollEnabled: G,
|
|
279
|
+
pollInterval: f,
|
|
280
|
+
rootRef: te,
|
|
281
|
+
mounted: oe,
|
|
282
|
+
activated: le,
|
|
283
|
+
toggleSelection: Ne,
|
|
284
|
+
type: "table"
|
|
285
|
+
});
|
|
286
|
+
if (a.name) {
|
|
287
|
+
const e = ct(a.name, re);
|
|
288
|
+
lt(() => {
|
|
289
|
+
e();
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return ye(re), (e, t) => {
|
|
293
|
+
const o = T("el-checkbox"), s = T("el-input"), C = T("el-pagination"), V = T("el-table-column"), q = T("el-popover"), ie = T("el-tooltip"), se = T("el-button");
|
|
294
|
+
return e.hidden ? y("", !0) : (r(), d("div", {
|
|
295
|
+
key: 0,
|
|
296
|
+
class: $(["table-render", {
|
|
297
|
+
tableBorder: x.value === "table",
|
|
298
|
+
[e.name]: !0,
|
|
299
|
+
"top-pagination": e.paginationPosition === "top"
|
|
300
|
+
}]),
|
|
301
|
+
ref_key: "rootRef",
|
|
302
|
+
ref: te,
|
|
303
|
+
id: e.name
|
|
304
|
+
}, [
|
|
305
|
+
e.paginationPosition === "top" ? (r(), d("div", {
|
|
306
|
+
key: 0,
|
|
307
|
+
class: $(["pagination-wrapper", {
|
|
308
|
+
cardlistPadding: x.value === "card"
|
|
309
|
+
}])
|
|
310
|
+
}, [
|
|
311
|
+
m(C, {
|
|
312
|
+
layout: e.paginationLayout || "slot ,sizes, prev, pager, next",
|
|
313
|
+
total: K.value,
|
|
314
|
+
"page-sizes": e.pageSizes || [5, 6, 10, 20, 30, 40],
|
|
315
|
+
"default-page-size": e.defaultPageSize,
|
|
316
|
+
"current-page": i.value.pageNum,
|
|
317
|
+
"onUpdate:currentPage": t[2] || (t[2] = (n) => i.value.pageNum = n),
|
|
318
|
+
"page-size": i.value.pageSize,
|
|
319
|
+
"onUpdate:pageSize": t[3] || (t[3] = (n) => i.value.pageSize = n),
|
|
320
|
+
"pager-count": Number(e.pagerCount) || 5,
|
|
321
|
+
onSizeChange: Z,
|
|
322
|
+
onCurrentChange: ee
|
|
323
|
+
}, {
|
|
324
|
+
default: v(() => [
|
|
325
|
+
P("div", yt, [
|
|
326
|
+
e.showPollCheckbox ? (r(), d("div", ft, [
|
|
327
|
+
m(o, {
|
|
328
|
+
modelValue: G.value,
|
|
329
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => G.value = n),
|
|
330
|
+
onChange: Je
|
|
331
|
+
}, null, 8, ["modelValue"]),
|
|
332
|
+
P("span", null, b(g(ne).table.pollText), 1),
|
|
333
|
+
m(s, {
|
|
334
|
+
type: "number",
|
|
335
|
+
style: { width: "45px", height: "28px" },
|
|
336
|
+
modelValue: f.value,
|
|
337
|
+
"onUpdate:modelValue": t[1] || (t[1] = (n) => f.value = n),
|
|
338
|
+
onChange: Oe
|
|
339
|
+
}, null, 8, ["modelValue"]),
|
|
340
|
+
P("span", null, b(g(ne).table.pollUnit), 1)
|
|
341
|
+
])) : y("", !0),
|
|
342
|
+
P("span", null, b(g(I)(e.totalText, { $total: K.value })), 1)
|
|
343
|
+
])
|
|
344
|
+
]),
|
|
345
|
+
_: 1
|
|
346
|
+
}, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
|
|
347
|
+
], 2)) : y("", !0),
|
|
348
|
+
pe(P("div", null, [
|
|
349
|
+
m(g(vt), {
|
|
350
|
+
ref_key: "tableRef",
|
|
351
|
+
ref: N,
|
|
352
|
+
data: p.value,
|
|
353
|
+
"highlight-current-row": "",
|
|
354
|
+
"row-key": e.rowKey,
|
|
355
|
+
stripe: e.stripe,
|
|
356
|
+
onRowClick: ze,
|
|
357
|
+
onRowDblclick: Pe,
|
|
358
|
+
onSelectionChange: be,
|
|
359
|
+
onCurrentChange: Te,
|
|
360
|
+
height: Xe.value
|
|
361
|
+
}, {
|
|
362
|
+
empty: v(() => [
|
|
363
|
+
P("div", Ct, [
|
|
364
|
+
m(g(pt), {
|
|
365
|
+
name: "tableEmpty",
|
|
366
|
+
style: { width: 56, height: 56 }
|
|
367
|
+
}),
|
|
368
|
+
t[6] || (t[6] = P("div", null, "No data available,please check", -1))
|
|
369
|
+
])
|
|
370
|
+
]),
|
|
371
|
+
default: v(() => [
|
|
372
|
+
e.multipleSelection ? (r(), k(V, {
|
|
373
|
+
key: 0,
|
|
374
|
+
type: "selection",
|
|
375
|
+
width: "55",
|
|
376
|
+
selectable: we
|
|
377
|
+
})) : y("", !0),
|
|
378
|
+
(r(!0), d(_, null, de(e.columns, (n) => (r(), d(_, {
|
|
379
|
+
key: n.key
|
|
380
|
+
}, [
|
|
381
|
+
n.hidden ? y("", !0) : (r(), k(V, {
|
|
382
|
+
key: 0,
|
|
383
|
+
prop: n.key,
|
|
384
|
+
"min-width": n.minWidth,
|
|
385
|
+
fixed: n.fixed || !1,
|
|
386
|
+
sortable: n.sortable ?? e.sortable ?? !0
|
|
387
|
+
}, {
|
|
388
|
+
header: v(() => [
|
|
389
|
+
P("div", {
|
|
390
|
+
class: "text-ellipsis",
|
|
391
|
+
title: n.label
|
|
392
|
+
}, b(n.label), 9, kt)
|
|
393
|
+
]),
|
|
394
|
+
default: v(({ row: u, $index: l }) => {
|
|
395
|
+
var A, M, ue, ce;
|
|
396
|
+
return [
|
|
397
|
+
n.type === "link" ? (r(), d("div", {
|
|
398
|
+
key: 0,
|
|
399
|
+
class: $(["text-ellipsis link-style", { "click-style": n.onClick }]),
|
|
400
|
+
title: R(n, u),
|
|
401
|
+
onClick: (S) => F(n, u, l, S)
|
|
402
|
+
}, b(R(n, u)), 11, zt)) : n.type === "iconText" ? (r(), d("div", Pt, [
|
|
403
|
+
n.iconPosition === "left" ? (r(), d(_, { key: 0 }, [
|
|
404
|
+
n.iconPopover && Array.isArray(H(n, u)) ? (r(), k(q, { key: 0 }, {
|
|
405
|
+
reference: v(() => {
|
|
406
|
+
var S, E;
|
|
407
|
+
return [
|
|
408
|
+
m(D, {
|
|
409
|
+
name: (S = B(n, u)) == null ? void 0 : S.name,
|
|
410
|
+
color: (E = B(n, u)) == null ? void 0 : E.color
|
|
411
|
+
}, null, 8, ["name", "color"])
|
|
412
|
+
];
|
|
413
|
+
}),
|
|
414
|
+
default: v(() => [
|
|
415
|
+
m(g(W), {
|
|
416
|
+
list: H(n, u) || []
|
|
417
|
+
}, null, 8, ["list"])
|
|
418
|
+
]),
|
|
419
|
+
_: 2
|
|
420
|
+
}, 1024)) : (r(), k(D, {
|
|
421
|
+
key: 1,
|
|
422
|
+
name: (A = B(n, u)) == null ? void 0 : A.name,
|
|
423
|
+
color: (M = B(n, u)) == null ? void 0 : M.color
|
|
424
|
+
}, null, 8, ["name", "color"]))
|
|
425
|
+
], 64)) : y("", !0),
|
|
426
|
+
P("span", {
|
|
427
|
+
class: $(["text-ellipsis", { "click-style": n.onClick }]),
|
|
428
|
+
title: R(n, u),
|
|
429
|
+
onClick: (S) => F(n, u, l, S)
|
|
430
|
+
}, b(R(n, u)), 11, St),
|
|
431
|
+
n.iconPosition === "right" ? (r(), d(_, { key: 1 }, [
|
|
432
|
+
n.iconPopover && Array.isArray(H(n, u)) ? (r(), k(q, { key: 0 }, {
|
|
433
|
+
reference: v(() => {
|
|
434
|
+
var S, E;
|
|
435
|
+
return [
|
|
436
|
+
m(D, {
|
|
437
|
+
name: (S = B(n, u)) == null ? void 0 : S.name,
|
|
438
|
+
color: (E = B(n, u)) == null ? void 0 : E.color
|
|
439
|
+
}, null, 8, ["name", "color"])
|
|
440
|
+
];
|
|
441
|
+
}),
|
|
442
|
+
default: v(() => [
|
|
443
|
+
m(g(W), {
|
|
444
|
+
list: H(n, u) || []
|
|
445
|
+
}, null, 8, ["list"])
|
|
446
|
+
]),
|
|
447
|
+
_: 2
|
|
448
|
+
}, 1024)) : (r(), k(D, {
|
|
449
|
+
key: 1,
|
|
450
|
+
name: (ue = B(n, u)) == null ? void 0 : ue.name,
|
|
451
|
+
color: (ce = B(n, u)) == null ? void 0 : ce.color
|
|
452
|
+
}, null, 8, ["name", "color"]))
|
|
453
|
+
], 64)) : y("", !0)
|
|
454
|
+
])) : n.type === "customContent" ? (r(), d("div", bt, [
|
|
455
|
+
m(g(W), {
|
|
456
|
+
list: Ge(n, u) || []
|
|
457
|
+
}, null, 8, ["list"])
|
|
458
|
+
])) : (r(), d("div", {
|
|
459
|
+
key: 3,
|
|
460
|
+
class: $({ "text-ellipsis": !n.noEllipsis }),
|
|
461
|
+
title: R(n, u),
|
|
462
|
+
style: J(We(n, u))
|
|
463
|
+
}, b(R(n, u)), 15, wt))
|
|
464
|
+
];
|
|
465
|
+
}),
|
|
466
|
+
_: 2
|
|
467
|
+
}, 1032, ["prop", "min-width", "fixed", "sortable"]))
|
|
468
|
+
], 64))), 128)),
|
|
469
|
+
qe.value && e.rowBtns && e.rowBtns.length > 0 ? (r(), k(V, {
|
|
470
|
+
key: 1,
|
|
471
|
+
label: e.rowBtnsLabel || "Action",
|
|
472
|
+
fixed: "right",
|
|
473
|
+
align: "left",
|
|
474
|
+
width: e.rowBtnsWidth || (e.rowBtns.length * 34 + 12 > 100 ? e.rowBtns.length * 34 + 12 : 100)
|
|
475
|
+
}, {
|
|
476
|
+
default: v(({ row: n, $index: u }) => [
|
|
477
|
+
P("div", Bt, [
|
|
478
|
+
(r(!0), d(_, null, de(e.rowBtns, (l) => {
|
|
479
|
+
var A;
|
|
480
|
+
return r(), d(_, {
|
|
481
|
+
key: l.key
|
|
482
|
+
}, [
|
|
483
|
+
l.component === "Popover" ? (r(), k(q, {
|
|
484
|
+
key: 0,
|
|
485
|
+
title: l.label,
|
|
486
|
+
trigger: "click",
|
|
487
|
+
"popper-class": "btn-popover",
|
|
488
|
+
width: (A = l.children) != null && A.length && l.children[0].width || 400
|
|
489
|
+
}, {
|
|
490
|
+
reference: v(() => [
|
|
491
|
+
l.condition === void 0 || l.condition === null || g(I)(l.condition, {
|
|
492
|
+
$row: n,
|
|
493
|
+
$globalParams: g(L)()
|
|
494
|
+
}) ? (r(), k(se, {
|
|
495
|
+
key: 0,
|
|
496
|
+
disabled: l.disabled,
|
|
497
|
+
link: "",
|
|
498
|
+
size: "small",
|
|
499
|
+
type: l.type,
|
|
500
|
+
onClick: ge((M) => F(l, n, u, M), ["stop"])
|
|
501
|
+
}, {
|
|
502
|
+
default: v(() => [
|
|
503
|
+
m(ie, {
|
|
504
|
+
class: "box-item",
|
|
505
|
+
effect: "dark",
|
|
506
|
+
content: l.label,
|
|
507
|
+
placement: "top"
|
|
508
|
+
}, {
|
|
509
|
+
default: v(() => [
|
|
510
|
+
l.icon ? (r(), k(D, {
|
|
511
|
+
key: 0,
|
|
512
|
+
name: l.icon.name,
|
|
513
|
+
color: l.icon.color
|
|
514
|
+
}, null, 8, ["name", "color"])) : y("", !0)
|
|
515
|
+
]),
|
|
516
|
+
_: 2
|
|
517
|
+
}, 1032, ["content"]),
|
|
518
|
+
l.buttonText ? (r(), d("span", {
|
|
519
|
+
key: 0,
|
|
520
|
+
style: J({ color: l.buttonText.color, fontSize: "14px" })
|
|
521
|
+
}, b(g(I)(l.buttonText.text, {
|
|
522
|
+
$row: n,
|
|
523
|
+
$globalParams: g(L)()
|
|
524
|
+
})), 5)) : y("", !0)
|
|
525
|
+
]),
|
|
526
|
+
_: 2
|
|
527
|
+
}, 1032, ["disabled", "type", "onClick"])) : y("", !0)
|
|
528
|
+
]),
|
|
529
|
+
default: v(() => [
|
|
530
|
+
P("div", null, [
|
|
531
|
+
m(g(W), {
|
|
532
|
+
list: l.children
|
|
533
|
+
}, null, 8, ["list"])
|
|
534
|
+
])
|
|
535
|
+
]),
|
|
536
|
+
_: 2
|
|
537
|
+
}, 1032, ["title", "width"])) : (r(), d(_, { key: 1 }, [
|
|
538
|
+
l.condition === void 0 || l.condition === null || g(I)(l.condition, {
|
|
539
|
+
$row: n,
|
|
540
|
+
$globalParams: g(L)()
|
|
541
|
+
}) ? (r(), k(se, {
|
|
542
|
+
key: 0,
|
|
543
|
+
disabled: l.disabled,
|
|
544
|
+
link: "",
|
|
545
|
+
size: "small",
|
|
546
|
+
type: l.type,
|
|
547
|
+
onClick: ge((M) => F(l, n, u, M), ["stop"])
|
|
548
|
+
}, {
|
|
549
|
+
default: v(() => [
|
|
550
|
+
m(ie, {
|
|
551
|
+
class: "box-item",
|
|
552
|
+
effect: "dark",
|
|
553
|
+
content: l.label,
|
|
554
|
+
placement: "top"
|
|
555
|
+
}, {
|
|
556
|
+
default: v(() => [
|
|
557
|
+
l.icon ? (r(), k(D, {
|
|
558
|
+
key: 0,
|
|
559
|
+
name: l.icon.name,
|
|
560
|
+
color: l.icon.color
|
|
561
|
+
}, null, 8, ["name", "color"])) : y("", !0)
|
|
562
|
+
]),
|
|
563
|
+
_: 2
|
|
564
|
+
}, 1032, ["content"]),
|
|
565
|
+
l.buttonText ? (r(), d("span", {
|
|
566
|
+
key: 0,
|
|
567
|
+
style: J({ color: l.buttonText.color, fontSize: "14px" })
|
|
568
|
+
}, b(g(I)(l.buttonText.text, {
|
|
569
|
+
$row: n,
|
|
570
|
+
$globalParams: g(L)()
|
|
571
|
+
})), 5)) : y("", !0)
|
|
572
|
+
]),
|
|
573
|
+
_: 2
|
|
574
|
+
}, 1032, ["disabled", "type", "onClick"])) : y("", !0)
|
|
575
|
+
], 64))
|
|
576
|
+
], 64);
|
|
577
|
+
}), 128))
|
|
578
|
+
])
|
|
579
|
+
]),
|
|
580
|
+
_: 1
|
|
581
|
+
}, 8, ["label", "width"])) : y("", !0)
|
|
582
|
+
]),
|
|
583
|
+
_: 1
|
|
584
|
+
}, 8, ["data", "row-key", "stripe", "height"])
|
|
585
|
+
], 512), [
|
|
586
|
+
[ve, x.value === "table"]
|
|
587
|
+
]),
|
|
588
|
+
pe(m(dt, rt({ data: p.value }, a, { getColText: R }), null, 16, ["data"]), [
|
|
589
|
+
[ve, x.value === "card"]
|
|
590
|
+
]),
|
|
591
|
+
e.paginationPosition !== "top" ? (r(), d("div", {
|
|
592
|
+
key: 1,
|
|
593
|
+
class: $(["pagination-wrapper", {
|
|
594
|
+
hidePagination: (e.hiddenPagination || p.value.length === 0) && !e.height,
|
|
595
|
+
transparentPagination: (e.hiddenPagination || p.value.length === 0) && e.height,
|
|
596
|
+
cardlistPadding: x.value === "card"
|
|
597
|
+
}])
|
|
598
|
+
}, [
|
|
599
|
+
m(C, {
|
|
600
|
+
layout: e.paginationLayout || "total,sizes, prev, pager, next,jumper",
|
|
601
|
+
total: K.value,
|
|
602
|
+
"page-sizes": e.pageSizes || [5, 6, 10, 20, 30, 40],
|
|
603
|
+
"default-page-size": e.defaultPageSize,
|
|
604
|
+
"current-page": i.value.pageNum,
|
|
605
|
+
"onUpdate:currentPage": t[4] || (t[4] = (n) => i.value.pageNum = n),
|
|
606
|
+
"page-size": i.value.pageSize,
|
|
607
|
+
"onUpdate:pageSize": t[5] || (t[5] = (n) => i.value.pageSize = n),
|
|
608
|
+
"pager-count": Number(e.pagerCount) || 5,
|
|
609
|
+
onSizeChange: Z,
|
|
610
|
+
onCurrentChange: ee
|
|
611
|
+
}, null, 8, ["layout", "total", "page-sizes", "default-page-size", "current-page", "page-size", "pager-count"])
|
|
612
|
+
], 2)) : y("", !0)
|
|
613
|
+
], 10, mt));
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
}), Mt = /* @__PURE__ */ gt(Nt, [["__scopeId", "data-v-74e44775"]]);
|
|
617
|
+
export {
|
|
618
|
+
Mt as default
|
|
619
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as w, ref as V, computed as I, watch as p, onMounted as L, resolveComponent as g, openBlock as t, createBlock as m, mergeProps as C, withCtx as i, createElementVNode as s, createElementBlock as o, Fragment as d, renderList as f, createVNode as y, createCommentVNode as c, toDisplayString as M, normalizeClass as E, unref as F } from "vue";
|
|
2
|
-
import { c as $, I as h, b as z, _ as A } from "./index-
|
|
2
|
+
import { c as $, I as h, b as z, _ as A } from "./index-CShYNljc.js";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
const D = { class: "right-icon-wrapper" }, P = { class: "dynamic-icon-wrapper" }, R = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, mergeModels as i, useModel as _, computed as v, resolveComponent as f, openBlock as a, createElementBlock as m, createElementVNode as y, toDisplayString as r, createBlock as V, mergeProps as k } from "vue";
|
|
2
|
-
import { u as B, _ as h } from "./index-
|
|
2
|
+
import { u as B, _ as h } from "./index-CShYNljc.js";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
const x = {
|
|
5
5
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as w, ref as f, resolveComponent as v, openBlock as a, createElementBlock as l, normalizeStyle as s, createVNode as r, withCtx as C, withDirectives as _, createElementVNode as g, normalizeClass as i, unref as x, createCommentVNode as c, vShow as B } from "vue";
|
|
2
|
-
import { c as S, b, I as d, _ as k } from "./index-
|
|
2
|
+
import { c as S, b, I as d, _ as k } from "./index-CShYNljc.js";
|
|
3
3
|
import "element-plus";
|
|
4
4
|
const E = {
|
|
5
5
|
key: 0,
|