ele-admin-plus 1.2.1-beta.6 → 1.2.2-beta.1
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/README.md +1 -1
- package/es/ele-app/components/form-item-rest.d.ts +4 -0
- package/es/ele-app/components/form-item-rest.js +15 -0
- package/es/ele-data-table/index.d.ts +16 -326
- package/es/ele-data-table/index.js +142 -225
- package/es/ele-data-table/util.d.ts +0 -5
- package/es/ele-data-table/util.js +1 -29
- package/es/ele-dropdown/components/pro-dropdown.d.ts +9 -0
- package/es/ele-dropdown/index.d.ts +15 -389
- package/es/ele-dropdown/index.js +4 -2
- package/es/ele-dropdown/props.d.ts +18 -3
- package/es/ele-dropdown/props.js +6 -1
- package/es/ele-file-list/index.js +2 -1
- package/es/ele-menus/index.d.ts +8 -41
- package/es/ele-menus/index.js +3 -1
- package/es/ele-pro-table/components/table-tools.d.ts +3 -378
- package/es/ele-pro-table/components/table-tools.js +1 -0
- package/es/ele-pro-table/index.d.ts +7 -929
- package/es/ele-pro-table/index.js +19 -5
- package/es/ele-pro-table/props.d.ts +17 -2
- package/es/ele-segmented/index.d.ts +9 -0
- package/es/ele-segmented/index.js +3 -1
- package/es/ele-segmented/props.d.ts +5 -0
- package/es/ele-segmented/props.js +6 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +2 -1
- package/es/ele-tabs/index.js +1 -0
- package/es/ele-toolbar/index.d.ts +5 -3241
- package/es/ele-virtual-table/index.d.ts +1 -1
- package/es/icons/LoadingOutlined.js +1 -1
- package/lib/ele-app/components/form-item-rest.cjs +14 -0
- package/lib/ele-app/components/form-item-rest.d.ts +4 -0
- package/lib/ele-data-table/index.cjs +139 -222
- package/lib/ele-data-table/index.d.ts +16 -326
- package/lib/ele-data-table/util.cjs +0 -28
- package/lib/ele-data-table/util.d.ts +0 -5
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +9 -0
- package/lib/ele-dropdown/index.cjs +4 -2
- package/lib/ele-dropdown/index.d.ts +15 -389
- package/lib/ele-dropdown/props.cjs +6 -1
- package/lib/ele-dropdown/props.d.ts +18 -3
- package/lib/ele-file-list/index.cjs +2 -1
- package/lib/ele-menus/index.cjs +3 -1
- package/lib/ele-menus/index.d.ts +8 -41
- package/lib/ele-pro-table/components/table-tools.cjs +1 -0
- package/lib/ele-pro-table/components/table-tools.d.ts +3 -378
- package/lib/ele-pro-table/index.cjs +19 -5
- package/lib/ele-pro-table/index.d.ts +7 -929
- package/lib/ele-pro-table/props.d.ts +17 -2
- package/lib/ele-segmented/index.cjs +3 -1
- package/lib/ele-segmented/index.d.ts +9 -0
- package/lib/ele-segmented/props.cjs +6 -1
- package/lib/ele-segmented/props.d.ts +5 -0
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +2 -1
- package/lib/ele-tabs/index.cjs +1 -0
- package/lib/ele-toolbar/index.d.ts +5 -3241
- package/lib/ele-virtual-table/index.d.ts +1 -1
- package/lib/icons/LoadingOutlined.cjs +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +1 -1
- package/es/ele-data-table/components/table-columns.d.ts +0 -32
- package/es/ele-data-table/components/table-columns.js +0 -124
- package/lib/ele-data-table/components/table-columns.cjs +0 -123
- package/lib/ele-data-table/components/table-columns.d.ts +0 -32
|
@@ -372,8 +372,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
372
372
|
scrollbarAlwaysOn: boolean;
|
|
373
373
|
flexible: boolean;
|
|
374
374
|
sticky: boolean;
|
|
375
|
-
slotNormalize: boolean;
|
|
376
375
|
headerEllipsis: boolean;
|
|
376
|
+
slotNormalize: boolean;
|
|
377
377
|
bottomLine: boolean;
|
|
378
378
|
emptyProps: import('../ele-data-table/types').TableEmptyProps;
|
|
379
379
|
reserveCurrent: boolean;
|
|
@@ -16,7 +16,7 @@ const _hoisted_1 = {
|
|
|
16
16
|
"stroke-width": "4",
|
|
17
17
|
"stroke-linecap": "round"
|
|
18
18
|
};
|
|
19
|
-
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "
|
|
19
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M22 6C34 6 42 14 42 26" }, null, -1);
|
|
20
20
|
const _hoisted_3 = [
|
|
21
21
|
_hoisted_2
|
|
22
22
|
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const elementPlus = require("element-plus");
|
|
4
|
+
const formItemRest = vue.defineComponent({
|
|
5
|
+
name: "FormItemRest",
|
|
6
|
+
setup(_props, { slots }) {
|
|
7
|
+
vue.provide(elementPlus.formItemContextKey, null);
|
|
8
|
+
return () => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
module.exports = formItemRest;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
|
+
const icons = require("../icons");
|
|
4
5
|
const core = require("../utils/core");
|
|
5
|
-
const TableColumns = require("./components/table-columns");
|
|
6
6
|
const util = require("./util");
|
|
7
7
|
const props = require("./props");
|
|
8
8
|
const ownSlots = ["default", "append", "empty"];
|
|
9
|
-
const
|
|
9
|
+
const index = /* @__PURE__ */ vue.defineComponent({
|
|
10
10
|
name: "EleDataTable",
|
|
11
|
-
components: {
|
|
11
|
+
components: {
|
|
12
|
+
ElTable: elementPlus.ElTable,
|
|
13
|
+
ElEmpty: elementPlus.ElEmpty
|
|
14
|
+
},
|
|
12
15
|
props: props.dataTableProps,
|
|
13
16
|
emits: props.dataTableEmits,
|
|
14
|
-
setup(props$1, {
|
|
17
|
+
setup(props$1, {
|
|
18
|
+
emit,
|
|
19
|
+
slots,
|
|
20
|
+
expose
|
|
21
|
+
}) {
|
|
15
22
|
const events = util.useEmits(emit);
|
|
16
23
|
const methods = util.useMethods(() => tableRef.value);
|
|
17
|
-
const {
|
|
18
|
-
|
|
24
|
+
const {
|
|
25
|
+
isLayoutFixedHead,
|
|
26
|
+
isLayoutMaximized
|
|
27
|
+
} = util.useStickyHeader();
|
|
19
28
|
const tableState = {
|
|
20
29
|
sorter: props$1.defaultSort,
|
|
21
30
|
key: null,
|
|
@@ -26,39 +35,17 @@ const _sfc_main = vue.defineComponent({
|
|
|
26
35
|
const tableRef = vue.ref(null);
|
|
27
36
|
const tableCols = vue.ref(props$1.columns ?? []);
|
|
28
37
|
const tableOverflowTooltip = vue.computed(() => {
|
|
29
|
-
return util.getGlobalTooltipProps(
|
|
30
|
-
props$1.showOverflowTooltip,
|
|
31
|
-
props$1.tooltipEffect,
|
|
32
|
-
props$1.tooltipOptions
|
|
33
|
-
);
|
|
38
|
+
return util.getGlobalTooltipProps(props$1.showOverflowTooltip, props$1.tooltipEffect, props$1.tooltipOptions);
|
|
34
39
|
});
|
|
35
40
|
const childKey = vue.computed(() => {
|
|
36
41
|
var _a;
|
|
37
42
|
return ((_a = props$1.treeProps) == null ? void 0 : _a.children) || "children";
|
|
38
43
|
});
|
|
39
44
|
const tableProps = vue.computed(() => {
|
|
40
|
-
const propKeys = props.tablePropKeys.filter(
|
|
41
|
-
(k) => ![
|
|
42
|
-
"currentRowKey",
|
|
43
|
-
"showOverflowTooltip",
|
|
44
|
-
"tooltipOptions",
|
|
45
|
-
"tooltipEffect"
|
|
46
|
-
].includes(k)
|
|
47
|
-
);
|
|
45
|
+
const propKeys = props.tablePropKeys.filter((k) => !["currentRowKey", "showOverflowTooltip", "tooltipOptions", "tooltipEffect"].includes(k));
|
|
48
46
|
return {
|
|
49
47
|
...core.pick(props$1, propKeys),
|
|
50
|
-
...core.omit(events, [
|
|
51
|
-
"onUpdate:currentRowKey",
|
|
52
|
-
"onUpdate:selectedRowKeys",
|
|
53
|
-
"onRowClick",
|
|
54
|
-
"onHeaderClick",
|
|
55
|
-
"onSortChange",
|
|
56
|
-
"onFilterChange",
|
|
57
|
-
"onCurrentChange",
|
|
58
|
-
"onSelect",
|
|
59
|
-
"onSelectAll",
|
|
60
|
-
"onSelectionChange"
|
|
61
|
-
])
|
|
48
|
+
...core.omit(events, ["onUpdate:currentRowKey", "onUpdate:selectedRowKeys", "onRowClick", "onHeaderClick", "onSortChange", "onFilterChange", "onCurrentChange", "onSelect", "onSelectAll", "onSelectionChange"])
|
|
62
49
|
};
|
|
63
50
|
});
|
|
64
51
|
const handleRowClick = (row, column, event) => {
|
|
@@ -138,11 +125,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
138
125
|
};
|
|
139
126
|
const setSelectedRows = (rows) => {
|
|
140
127
|
if (rows) {
|
|
141
|
-
updateCheckedState(
|
|
142
|
-
util.getRowKeys(rows, props$1.rowKey),
|
|
143
|
-
rows,
|
|
144
|
-
!!rows.length
|
|
145
|
-
);
|
|
128
|
+
updateCheckedState(util.getRowKeys(rows, props$1.rowKey), rows, !!rows.length);
|
|
146
129
|
}
|
|
147
130
|
};
|
|
148
131
|
const setSelectedRowKeys = (keys) => {
|
|
@@ -151,16 +134,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
151
134
|
}
|
|
152
135
|
};
|
|
153
136
|
const toggleRowExpansionAll = (expanded) => {
|
|
154
|
-
core.eachTree(
|
|
155
|
-
|
|
156
|
-
(row)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
childKey.value
|
|
163
|
-
);
|
|
137
|
+
core.eachTree(props$1.data, (row) => {
|
|
138
|
+
var _a;
|
|
139
|
+
if ((_a = row[childKey.value]) == null ? void 0 : _a.length) {
|
|
140
|
+
methods.toggleRowExpansion(row, expanded);
|
|
141
|
+
}
|
|
142
|
+
}, childKey.value);
|
|
164
143
|
};
|
|
165
144
|
const updateSelectedState = (key, item) => {
|
|
166
145
|
if (!util.valueIsChanged(tableState.key, key)) {
|
|
@@ -174,22 +153,12 @@ const _sfc_main = vue.defineComponent({
|
|
|
174
153
|
return;
|
|
175
154
|
}
|
|
176
155
|
if (key != null) {
|
|
177
|
-
const row = util.getRowByKey(
|
|
178
|
-
key,
|
|
179
|
-
props$1.data,
|
|
180
|
-
props$1.rowKey,
|
|
181
|
-
childKey.value
|
|
182
|
-
);
|
|
156
|
+
const row = util.getRowByKey(key, props$1.data, props$1.rowKey, childKey.value);
|
|
183
157
|
if (row != null || props$1.reserveCurrent) {
|
|
184
158
|
tableState.oldRow = tableState.row;
|
|
185
159
|
tableState.row = row || item || void 0;
|
|
186
160
|
if (tableState.row == null && props$1.cacheData != null) {
|
|
187
|
-
tableState.row = util.getRowByKey(
|
|
188
|
-
key,
|
|
189
|
-
props$1.cacheData,
|
|
190
|
-
props$1.rowKey,
|
|
191
|
-
childKey.value
|
|
192
|
-
);
|
|
161
|
+
tableState.row = util.getRowByKey(key, props$1.cacheData, props$1.rowKey, childKey.value);
|
|
193
162
|
}
|
|
194
163
|
tableState.key = key;
|
|
195
164
|
methods.setCurrentRow(row);
|
|
@@ -211,20 +180,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
211
180
|
if (!force && !util.arrayIsChanged(tableState.checkedKeys, keys)) {
|
|
212
181
|
return;
|
|
213
182
|
}
|
|
214
|
-
const [dataKeys, list] = util.getKeysAndList(
|
|
215
|
-
|
|
216
|
-
props$1.rowKey,
|
|
217
|
-
childKey.value
|
|
218
|
-
);
|
|
219
|
-
const [cacheKeys, cacheList] = util.getKeysAndList(
|
|
220
|
-
props$1.cacheData,
|
|
221
|
-
props$1.rowKey,
|
|
222
|
-
childKey.value
|
|
223
|
-
);
|
|
183
|
+
const [dataKeys, list] = util.getKeysAndList(props$1.data, props$1.rowKey, childKey.value);
|
|
184
|
+
const [cacheKeys, cacheList] = util.getKeysAndList(props$1.cacheData, props$1.rowKey, childKey.value);
|
|
224
185
|
const itemKeys = items ? items.map((d) => core.getValue(d, props$1.rowKey)) : [];
|
|
225
|
-
const oldKeys = tableState.checked.map(
|
|
226
|
-
(d) => core.getValue(d, props$1.rowKey)
|
|
227
|
-
);
|
|
186
|
+
const oldKeys = tableState.checked.map((d) => core.getValue(d, props$1.rowKey));
|
|
228
187
|
const checkedKeys = [];
|
|
229
188
|
const checked = [];
|
|
230
189
|
keys.forEach((key) => {
|
|
@@ -254,7 +213,10 @@ const _sfc_main = vue.defineComponent({
|
|
|
254
213
|
return;
|
|
255
214
|
}
|
|
256
215
|
if (typeof props$1.rowKey === "string") {
|
|
257
|
-
checked.push({
|
|
216
|
+
checked.push({
|
|
217
|
+
[props$1.rowKey]: key,
|
|
218
|
+
_isMock: true
|
|
219
|
+
});
|
|
258
220
|
}
|
|
259
221
|
}
|
|
260
222
|
});
|
|
@@ -275,23 +237,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
275
237
|
const updateSelectedAndChecked = () => {
|
|
276
238
|
const key = tableState.key;
|
|
277
239
|
if (key != null) {
|
|
278
|
-
const row = util.getRowByKey(
|
|
279
|
-
key,
|
|
280
|
-
props$1.data,
|
|
281
|
-
props$1.rowKey,
|
|
282
|
-
childKey.value
|
|
283
|
-
);
|
|
240
|
+
const row = util.getRowByKey(key, props$1.data, props$1.rowKey, childKey.value);
|
|
284
241
|
if (row != null) {
|
|
285
242
|
updateSelectedState(key, row);
|
|
286
243
|
} else if (!props$1.reserveCurrent) {
|
|
287
244
|
updateSelectedState(null);
|
|
288
245
|
} else if (props$1.cacheData != null) {
|
|
289
|
-
const temp = util.getRowByKey(
|
|
290
|
-
key,
|
|
291
|
-
props$1.cacheData,
|
|
292
|
-
props$1.rowKey,
|
|
293
|
-
childKey.value
|
|
294
|
-
);
|
|
246
|
+
const temp = util.getRowByKey(key, props$1.cacheData, props$1.rowKey, childKey.value);
|
|
295
247
|
if (temp != null) {
|
|
296
248
|
updateSelectedState(key, temp);
|
|
297
249
|
}
|
|
@@ -312,51 +264,40 @@ const _sfc_main = vue.defineComponent({
|
|
|
312
264
|
events["onUpdate:selectedRowKeys"](keys);
|
|
313
265
|
}
|
|
314
266
|
};
|
|
315
|
-
vue.watch(
|
|
316
|
-
|
|
317
|
-
(columns)
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
methods.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
{ deep: true }
|
|
341
|
-
);
|
|
267
|
+
vue.watch(() => props$1.columns, (columns) => {
|
|
268
|
+
tableState.reserveChecked = util.isReserveChecked(columns);
|
|
269
|
+
if (!columns) {
|
|
270
|
+
tableCols.value = [];
|
|
271
|
+
} else {
|
|
272
|
+
const {
|
|
273
|
+
cols,
|
|
274
|
+
sorter
|
|
275
|
+
} = util.getStateCols(columns, tableState.sorter, tableState.filter);
|
|
276
|
+
tableCols.value = cols;
|
|
277
|
+
vue.nextTick(() => {
|
|
278
|
+
methods.doLayout();
|
|
279
|
+
updateScrollBar();
|
|
280
|
+
if (sorter) {
|
|
281
|
+
methods.sort(sorter.prop, sorter.order || "ascending");
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}, {
|
|
286
|
+
deep: true
|
|
287
|
+
});
|
|
342
288
|
vue.watch([() => props$1.data, () => props$1.cacheData], () => {
|
|
343
289
|
vue.nextTick(() => {
|
|
344
290
|
updateSelectedAndChecked();
|
|
345
291
|
});
|
|
346
292
|
});
|
|
347
|
-
vue.watch(
|
|
348
|
-
()
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
(selectedRowKeys) => {
|
|
356
|
-
updateCheckedState(selectedRowKeys || []);
|
|
357
|
-
},
|
|
358
|
-
{ deep: true }
|
|
359
|
-
);
|
|
293
|
+
vue.watch(() => props$1.currentRowKey, (key) => {
|
|
294
|
+
updateSelectedState(key);
|
|
295
|
+
});
|
|
296
|
+
vue.watch(() => props$1.selectedRowKeys, (selectedRowKeys) => {
|
|
297
|
+
updateCheckedState(selectedRowKeys || []);
|
|
298
|
+
}, {
|
|
299
|
+
deep: true
|
|
300
|
+
});
|
|
360
301
|
vue.onMounted(() => {
|
|
361
302
|
if (props$1.currentRowKey != null) {
|
|
362
303
|
updateSelectedState(props$1.currentRowKey);
|
|
@@ -365,24 +306,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
365
306
|
updateCheckedState(props$1.selectedRowKeys);
|
|
366
307
|
}
|
|
367
308
|
});
|
|
368
|
-
|
|
369
|
-
ownSlots,
|
|
370
|
-
getBodyRowClass: util.getBodyRowClass,
|
|
371
|
-
getHeadRowClass: util.getHeadRowClass,
|
|
309
|
+
const exposeValue = {
|
|
372
310
|
...methods,
|
|
373
|
-
isLayoutFixedHead,
|
|
374
|
-
isLayoutMaximized,
|
|
375
|
-
tableRef,
|
|
376
|
-
tableCols,
|
|
377
|
-
tableOverflowTooltip,
|
|
378
|
-
tableProps,
|
|
379
|
-
handleRowClick,
|
|
380
|
-
handleHeaderClick,
|
|
381
|
-
handleSortChange,
|
|
382
|
-
handleFilterChange,
|
|
383
|
-
handleCurrentChange,
|
|
384
|
-
handleSelect,
|
|
385
|
-
handleSelectAll,
|
|
386
311
|
clearSort,
|
|
387
312
|
clearSelection,
|
|
388
313
|
toggleRowSelection,
|
|
@@ -392,88 +317,80 @@ const _sfc_main = vue.defineComponent({
|
|
|
392
317
|
setSelectedRows,
|
|
393
318
|
setSelectedRowKeys,
|
|
394
319
|
toggleRowExpansionAll,
|
|
395
|
-
updateSelectedAndChecked
|
|
320
|
+
updateSelectedAndChecked,
|
|
321
|
+
tableRef
|
|
396
322
|
};
|
|
323
|
+
expose(exposeValue);
|
|
324
|
+
const renderTableColumn = (col) => {
|
|
325
|
+
return vue.createVNode(elementPlus.ElTableColumn, vue.mergeProps(core.omit(col, ["showOverflowTooltip", "filterClassName", "columnKey", "className", "uid", "slot", "headerSlot", "hideInTable", "hideInSetting", "hideInExport", "hideInPrint", "printSlot", "children"]), {
|
|
326
|
+
"key": col.uid ?? col.columnKey ?? col.prop,
|
|
327
|
+
"index": col.index ?? props$1.pageIndex,
|
|
328
|
+
"className": util.getCellClass(col),
|
|
329
|
+
"columnKey": col.columnKey ?? col.prop,
|
|
330
|
+
"filterClassName": util.getFilterPopperClass(col.filterClassName),
|
|
331
|
+
"showOverflowTooltip": util.getTooltipProps(col.showOverflowTooltip, tableOverflowTooltip.value)
|
|
332
|
+
}), {
|
|
333
|
+
header: (slotProps) => {
|
|
334
|
+
var _a, _b, _c;
|
|
335
|
+
return vue.createVNode("div", {
|
|
336
|
+
"class": "ele-cell-title",
|
|
337
|
+
"title": (_a = slotProps == null ? void 0 : slotProps.column) == null ? void 0 : _a.label
|
|
338
|
+
}, [col.headerSlot && !ownSlots.includes(col.headerSlot) && slots[col.headerSlot] ? (_b = slots[col.headerSlot]) == null ? void 0 : _b.call(slots, slotProps) : (_c = slotProps == null ? void 0 : slotProps.column) == null ? void 0 : _c.label]);
|
|
339
|
+
},
|
|
340
|
+
["filter-icon"]: (slotProps) => {
|
|
341
|
+
var _a;
|
|
342
|
+
return !col.filterIcon ? vue.createVNode(icons.FilterFilled, null, null) : typeof col.filterIcon === "string" && !ownSlots.includes(col.filterIcon) && slots[col.filterIcon] ? (_a = slots[col.filterIcon]) == null ? void 0 : _a.call(slots, slotProps) : vue.h(col.filterIcon);
|
|
343
|
+
},
|
|
344
|
+
default: (slotProps) => {
|
|
345
|
+
var _a;
|
|
346
|
+
return col.slot && !ownSlots.includes(col.slot) && slots[col.slot] && (!props$1.slotNormalize || (slotProps == null ? void 0 : slotProps.$index) != -1) ? (_a = slots[col.slot]) == null ? void 0 : _a.call(slots, slotProps) : col.children && col.children.length ? col.children.map(renderTableColumn) : void 0;
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
return () => vue.createVNode(elementPlus.ElTable, vue.mergeProps(tableProps.value, {
|
|
351
|
+
"ref": tableRef,
|
|
352
|
+
"emptyText": props$1.errorText || props$1.emptyText,
|
|
353
|
+
"rowClassName": (param) => util.getBodyRowClass(props$1.rowClassName, param),
|
|
354
|
+
"headerRowClassName": (param) => util.getHeadRowClass(props$1.headerRowClassName, param, props$1.headerEllipsis),
|
|
355
|
+
"class": ["ele-data-table", {
|
|
356
|
+
"is-sticky": props$1.sticky
|
|
357
|
+
}, {
|
|
358
|
+
"is-layout-fixed-head": props$1.sticky && isLayoutFixedHead.value
|
|
359
|
+
}, {
|
|
360
|
+
"is-layout-maximized": props$1.sticky && isLayoutMaximized.value
|
|
361
|
+
}, {
|
|
362
|
+
"is-sticky": props$1.sticky
|
|
363
|
+
}, {
|
|
364
|
+
"hide-header": !props$1.showHeader
|
|
365
|
+
}, {
|
|
366
|
+
"hide-bottom-line": !props$1.bottomLine
|
|
367
|
+
}],
|
|
368
|
+
"onRowClick": handleRowClick,
|
|
369
|
+
"onHeaderClick": handleHeaderClick,
|
|
370
|
+
"onSortChange": handleSortChange,
|
|
371
|
+
"onFilterChange": handleFilterChange,
|
|
372
|
+
"onCurrentChange": handleCurrentChange,
|
|
373
|
+
"onSelect": handleSelect,
|
|
374
|
+
"onSelectAll": handleSelectAll
|
|
375
|
+
}), {
|
|
376
|
+
append: slots.append ? (slotProps) => {
|
|
377
|
+
var _a;
|
|
378
|
+
return (_a = slots.append) == null ? void 0 : _a.call(slots, slotProps);
|
|
379
|
+
} : void 0,
|
|
380
|
+
empty: slots.empty ? () => {
|
|
381
|
+
var _a;
|
|
382
|
+
return (_a = slots.empty) == null ? void 0 : _a.call(slots, {
|
|
383
|
+
text: props$1.emptyText,
|
|
384
|
+
error: props$1.errorText
|
|
385
|
+
});
|
|
386
|
+
} : props$1.emptyProps ? () => vue.createVNode(elementPlus.ElEmpty, vue.mergeProps({
|
|
387
|
+
"imageSize": 68
|
|
388
|
+
}, !props$1.emptyProps || props$1.emptyProps === true ? {} : props$1.emptyProps, {
|
|
389
|
+
"description": props$1.errorText || props$1.emptyText,
|
|
390
|
+
"class": "ele-table-empty"
|
|
391
|
+
}), null) : void 0,
|
|
392
|
+
default: () => tableCols.value.map(renderTableColumn)
|
|
393
|
+
});
|
|
397
394
|
}
|
|
398
395
|
});
|
|
399
|
-
const _export_sfc = (sfc, props2) => {
|
|
400
|
-
const target = sfc.__vccOpts || sfc;
|
|
401
|
-
for (const [key, val] of props2) {
|
|
402
|
-
target[key] = val;
|
|
403
|
-
}
|
|
404
|
-
return target;
|
|
405
|
-
};
|
|
406
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
407
|
-
const _component_TableColumns = vue.resolveComponent("TableColumns");
|
|
408
|
-
const _component_ElEmpty = vue.resolveComponent("ElEmpty");
|
|
409
|
-
const _component_ElTable = vue.resolveComponent("ElTable");
|
|
410
|
-
return vue.openBlock(), vue.createBlock(_component_ElTable, vue.mergeProps(_ctx.tableProps, {
|
|
411
|
-
ref: "tableRef",
|
|
412
|
-
emptyText: _ctx.errorText || _ctx.emptyText,
|
|
413
|
-
rowClassName: (param) => _ctx.getBodyRowClass(_ctx.rowClassName, param),
|
|
414
|
-
headerRowClassName: (param) => _ctx.getHeadRowClass(_ctx.headerRowClassName, param, _ctx.headerEllipsis),
|
|
415
|
-
class: [
|
|
416
|
-
"ele-data-table",
|
|
417
|
-
{ "is-sticky": _ctx.sticky },
|
|
418
|
-
{ "is-layout-fixed-head": _ctx.sticky && _ctx.isLayoutFixedHead },
|
|
419
|
-
{ "is-layout-maximized": _ctx.sticky && _ctx.isLayoutMaximized },
|
|
420
|
-
{ "is-sticky": _ctx.sticky },
|
|
421
|
-
{ "hide-header": !_ctx.showHeader },
|
|
422
|
-
{ "hide-bottom-line": !_ctx.bottomLine }
|
|
423
|
-
],
|
|
424
|
-
onRowClick: _ctx.handleRowClick,
|
|
425
|
-
onHeaderClick: _ctx.handleHeaderClick,
|
|
426
|
-
onSortChange: _ctx.handleSortChange,
|
|
427
|
-
onFilterChange: _ctx.handleFilterChange,
|
|
428
|
-
onCurrentChange: _ctx.handleCurrentChange,
|
|
429
|
-
onSelect: _ctx.handleSelect,
|
|
430
|
-
onSelectAll: _ctx.handleSelectAll
|
|
431
|
-
}), vue.createSlots({
|
|
432
|
-
default: vue.withCtx(() => [
|
|
433
|
-
_ctx.tableCols && _ctx.tableCols.length ? (vue.openBlock(), vue.createBlock(_component_TableColumns, {
|
|
434
|
-
key: 0,
|
|
435
|
-
columns: _ctx.tableCols,
|
|
436
|
-
pageIndex: _ctx.pageIndex,
|
|
437
|
-
slotNormalize: _ctx.slotNormalize,
|
|
438
|
-
globalTooltip: _ctx.tableOverflowTooltip
|
|
439
|
-
}, vue.createSlots({ _: 2 }, [
|
|
440
|
-
vue.renderList(Object.keys(_ctx.$slots).filter((k) => !_ctx.ownSlots.includes(k)), (name) => {
|
|
441
|
-
return {
|
|
442
|
-
name,
|
|
443
|
-
fn: vue.withCtx((slotProps) => [
|
|
444
|
-
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
445
|
-
])
|
|
446
|
-
};
|
|
447
|
-
})
|
|
448
|
-
]), 1032, ["columns", "pageIndex", "slotNormalize", "globalTooltip"])) : vue.createCommentVNode("", true)
|
|
449
|
-
]),
|
|
450
|
-
_: 2
|
|
451
|
-
}, [
|
|
452
|
-
_ctx.$slots.append ? {
|
|
453
|
-
name: "append",
|
|
454
|
-
fn: vue.withCtx((slotProps) => [
|
|
455
|
-
vue.renderSlot(_ctx.$slots, "append", vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
456
|
-
]),
|
|
457
|
-
key: "0"
|
|
458
|
-
} : void 0,
|
|
459
|
-
_ctx.$slots.empty || _ctx.emptyProps ? {
|
|
460
|
-
name: "empty",
|
|
461
|
-
fn: vue.withCtx(() => [
|
|
462
|
-
_ctx.$slots.empty ? vue.renderSlot(_ctx.$slots, "empty", {
|
|
463
|
-
key: 0,
|
|
464
|
-
text: _ctx.emptyText,
|
|
465
|
-
error: _ctx.errorText
|
|
466
|
-
}) : _ctx.emptyProps ? (vue.openBlock(), vue.createBlock(_component_ElEmpty, vue.mergeProps({
|
|
467
|
-
key: 1,
|
|
468
|
-
imageSize: 68
|
|
469
|
-
}, !_ctx.emptyProps || _ctx.emptyProps === true ? {} : _ctx.emptyProps, {
|
|
470
|
-
description: _ctx.errorText || _ctx.emptyText,
|
|
471
|
-
class: "ele-table-empty"
|
|
472
|
-
}), null, 16, ["description"])) : vue.createCommentVNode("", true)
|
|
473
|
-
]),
|
|
474
|
-
key: "1"
|
|
475
|
-
} : void 0
|
|
476
|
-
]), 1040, ["emptyText", "rowClassName", "headerRowClassName", "class", "onRowClick", "onHeaderClick", "onSortChange", "onFilterChange", "onCurrentChange", "onSelect", "onSelectAll"]);
|
|
477
|
-
}
|
|
478
|
-
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
479
396
|
module.exports = index;
|