ele-admin-plus 1.1.9 → 1.2.0-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/es/core-export.d.ts +1 -0
- package/es/core-export.js +1 -0
- package/es/ele-alert/index.d.ts +2 -2
- package/es/ele-alert/props.d.ts +1 -1
- package/es/ele-app/components/message-body.d.ts +39 -0
- package/es/ele-app/components/message-body.js +92 -0
- package/es/ele-app/el.d.ts +2 -0
- package/es/ele-app/style/message/css-var.scss +0 -4
- package/es/ele-app/style/message/index.scss +199 -77
- package/es/ele-app/style/overwrite/input/index.scss +2 -0
- package/es/ele-app/style/overwrite/message-box/index.scss +31 -0
- package/es/ele-app/style/overwrite/tag/css-var.scss +0 -16
- package/es/ele-app/style/overwrite/tag/index.scss +57 -14
- package/es/ele-app/types.d.ts +6 -1
- package/es/ele-config-provider/components/receiver-view.js +3 -3
- package/es/ele-config-provider/index.d.ts +8 -4
- package/es/ele-config-provider/index.js +19 -5
- package/es/ele-config-provider/props.d.ts +9 -4
- package/es/ele-config-provider/props.js +9 -5
- package/es/ele-config-provider/receiver.js +2 -2
- package/es/ele-config-provider/types.d.ts +22 -1
- package/es/ele-data-table/types.d.ts +2 -0
- package/es/ele-drawer/index.d.ts +2 -2
- package/es/ele-edit-tag/index.d.ts +9 -4
- package/es/ele-edit-tag/index.js +4 -2
- package/es/ele-edit-tag/props.d.ts +3 -1
- package/es/ele-edit-tag/props.js +2 -0
- package/es/ele-edit-tag/style/index.scss +11 -4
- package/es/ele-icon-select/index.d.ts +10 -12
- package/es/ele-icon-select/props.d.ts +1 -1
- package/es/ele-map-picker/index.d.ts +1 -1
- package/es/ele-menus/index.d.ts +2 -2
- package/es/ele-menus/index.js +11 -0
- package/es/ele-modal/index.d.ts +3 -3
- package/es/ele-modal/style/index.scss +2 -0
- package/es/ele-modal/util.d.ts +1 -1
- package/es/ele-modal/util.js +2 -4
- package/es/ele-popconfirm/index.d.ts +3 -3
- package/es/ele-popconfirm/props.d.ts +1 -1
- package/es/ele-popover/index.d.ts +2 -2
- package/es/ele-pro-layout/components/pro-header.d.ts +1 -1
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +1 -1
- package/es/ele-pro-layout/index.js +1 -1
- package/es/ele-pro-layout/types.d.ts +4 -4
- package/es/ele-pro-table/components/table-tools.d.ts +11 -2
- package/es/ele-pro-table/components/table-tools.js +14 -26
- package/es/ele-pro-table/components/tool-column.d.ts +1 -0
- package/es/ele-pro-table/components/tool-export.d.ts +29 -56
- package/es/ele-pro-table/components/tool-export.js +100 -52
- package/es/ele-pro-table/components/tool-print-body-cell.js +50 -6
- package/es/ele-pro-table/components/tool-print-header-cell.js +4 -1
- package/es/ele-pro-table/components/tool-print.d.ts +29 -50
- package/es/ele-pro-table/components/tool-print.js +174 -69
- package/es/ele-pro-table/index.js +59 -50
- package/es/ele-pro-table/style/index.scss +9 -0
- package/es/ele-pro-table/types.d.ts +32 -0
- package/es/ele-pro-table/util.d.ts +18 -3
- package/es/ele-pro-table/util.js +160 -28
- package/es/ele-table/style/index.scss +16 -0
- package/es/ele-tooltip/index.d.ts +3 -3
- package/es/ele-virtual-table/util.d.ts +3 -1
- package/es/ele-virtual-table/util.js +7 -2
- package/es/icons/LoadingOutlined.js +1 -1
- package/es/lang/en_US.js +7 -1
- package/es/lang/zh_CN.js +7 -1
- package/es/lang/zh_TW.js +7 -1
- package/es/style/themes/default.scss +82 -85
- package/es/style/themes/rounded.scss +11 -15
- package/es/utils/core.d.ts +7 -0
- package/es/utils/core.js +16 -2
- package/es/utils/message-box.d.ts +25 -0
- package/es/utils/message-box.js +71 -0
- package/es/utils/message.d.ts +44 -20
- package/es/utils/message.js +220 -37
- package/lib/core-export.cjs +8 -0
- package/lib/core-export.d.ts +1 -0
- package/lib/ele-alert/index.d.ts +2 -2
- package/lib/ele-alert/props.d.ts +1 -1
- package/lib/ele-app/components/message-body.cjs +91 -0
- package/lib/ele-app/components/message-body.d.ts +39 -0
- package/lib/ele-app/el.d.ts +2 -0
- package/lib/ele-app/style/message/css-var.scss +0 -4
- package/lib/ele-app/style/message/index.scss +199 -77
- package/lib/ele-app/style/overwrite/input/index.scss +2 -0
- package/lib/ele-app/style/overwrite/message-box/index.scss +31 -0
- package/lib/ele-app/style/overwrite/tag/css-var.scss +0 -16
- package/lib/ele-app/style/overwrite/tag/index.scss +57 -14
- package/lib/ele-app/types.d.ts +6 -1
- package/lib/ele-config-provider/components/receiver-view.cjs +1 -1
- package/lib/ele-config-provider/index.cjs +18 -4
- package/lib/ele-config-provider/index.d.ts +8 -4
- package/lib/ele-config-provider/props.cjs +9 -5
- package/lib/ele-config-provider/props.d.ts +9 -4
- package/lib/ele-config-provider/receiver.cjs +1 -1
- package/lib/ele-config-provider/types.d.ts +22 -1
- package/lib/ele-data-table/types.d.ts +2 -0
- package/lib/ele-drawer/index.d.ts +2 -2
- package/lib/ele-edit-tag/index.cjs +4 -2
- package/lib/ele-edit-tag/index.d.ts +9 -4
- package/lib/ele-edit-tag/props.cjs +2 -0
- package/lib/ele-edit-tag/props.d.ts +3 -1
- package/lib/ele-edit-tag/style/index.scss +11 -4
- package/lib/ele-icon-select/index.d.ts +10 -12
- package/lib/ele-icon-select/props.d.ts +1 -1
- package/lib/ele-map-picker/index.d.ts +1 -1
- package/lib/ele-menus/index.cjs +11 -0
- package/lib/ele-menus/index.d.ts +2 -2
- package/lib/ele-modal/index.d.ts +3 -3
- package/lib/ele-modal/style/index.scss +2 -0
- package/lib/ele-modal/util.cjs +1 -3
- package/lib/ele-modal/util.d.ts +1 -1
- package/lib/ele-popconfirm/index.d.ts +3 -3
- package/lib/ele-popconfirm/props.d.ts +1 -1
- package/lib/ele-popover/index.d.ts +2 -2
- package/lib/ele-pro-layout/components/pro-header.d.ts +1 -1
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +1 -1
- package/lib/ele-pro-layout/index.cjs +1 -1
- package/lib/ele-pro-layout/types.d.ts +4 -4
- package/lib/ele-pro-table/components/table-tools.cjs +14 -26
- package/lib/ele-pro-table/components/table-tools.d.ts +11 -2
- package/lib/ele-pro-table/components/tool-column.d.ts +1 -0
- package/lib/ele-pro-table/components/tool-export.cjs +99 -51
- package/lib/ele-pro-table/components/tool-export.d.ts +29 -56
- package/lib/ele-pro-table/components/tool-print-body-cell.cjs +49 -5
- package/lib/ele-pro-table/components/tool-print-header-cell.cjs +4 -1
- package/lib/ele-pro-table/components/tool-print.cjs +172 -67
- package/lib/ele-pro-table/components/tool-print.d.ts +29 -50
- package/lib/ele-pro-table/index.cjs +59 -50
- package/lib/ele-pro-table/style/index.scss +9 -0
- package/lib/ele-pro-table/types.d.ts +32 -0
- package/lib/ele-pro-table/util.cjs +160 -28
- package/lib/ele-pro-table/util.d.ts +18 -3
- package/lib/ele-table/style/index.scss +16 -0
- package/lib/ele-tooltip/index.d.ts +3 -3
- package/lib/ele-virtual-table/util.cjs +7 -2
- package/lib/ele-virtual-table/util.d.ts +3 -1
- package/lib/icons/LoadingOutlined.cjs +1 -1
- package/lib/lang/en_US.cjs +7 -1
- package/lib/lang/zh_CN.cjs +7 -1
- package/lib/lang/zh_TW.cjs +7 -1
- package/lib/style/themes/default.scss +82 -85
- package/lib/style/themes/rounded.scss +11 -15
- package/lib/utils/core.cjs +16 -2
- package/lib/utils/core.d.ts +7 -0
- package/lib/utils/message-box.cjs +71 -0
- package/lib/utils/message-box.d.ts +25 -0
- package/lib/utils/message.cjs +216 -33
- package/lib/utils/message.d.ts +44 -20
- package/package.json +14 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, watch, nextTick, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, createTextVNode, toDisplayString, withModifiers, createCommentVNode, createElementVNode, renderSlot, createElementBlock, Fragment, renderList, createSlots, normalizeProps, guardReactiveProps } from "vue";
|
|
1
|
+
import { defineComponent, ref, reactive, watch, nextTick, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, createTextVNode, toDisplayString, withModifiers, createCommentVNode, createElementVNode, renderSlot, createElementBlock, Fragment, renderList, createSlots, normalizeProps, guardReactiveProps, normalizeStyle, normalizeClass } from "vue";
|
|
2
2
|
import { ElForm, ElFormItem, ElSelect, ElOption, ElCheckbox, ElButton, ElIcon } from "element-plus";
|
|
3
3
|
import { PrinterOutlined } from "../../icons";
|
|
4
|
-
import { eachTree } from "../../utils/core";
|
|
4
|
+
import { findTree, eachTree } from "../../utils/core";
|
|
5
5
|
import EleTool from "../../ele-tool/index";
|
|
6
6
|
import EleModal from "../../ele-modal/index";
|
|
7
7
|
import ElePrinter from "../../ele-printer/index";
|
|
@@ -32,30 +32,13 @@ const _sfc_main = defineComponent({
|
|
|
32
32
|
ToolPrintHeaderCell
|
|
33
33
|
},
|
|
34
34
|
props: {
|
|
35
|
-
/** 提示文字 */
|
|
36
|
-
title: String,
|
|
37
35
|
/** 提示位置 */
|
|
38
36
|
placement: String,
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
untitledText: String,
|
|
45
|
-
/** 选择数据文字 */
|
|
46
|
-
selectDataText: String,
|
|
47
|
-
/** 选择字段文字 */
|
|
48
|
-
selectColumnText: String,
|
|
49
|
-
/** 当前页数据文字 */
|
|
50
|
-
dataTypePageText: String,
|
|
51
|
-
/** 选中数据文字 */
|
|
52
|
-
dataTypeSelectedText: String,
|
|
53
|
-
/** 全部数据文字 */
|
|
54
|
-
dataTypeAllText: String,
|
|
55
|
-
/** 取消文字 */
|
|
56
|
-
cancelText: String,
|
|
57
|
-
/** 确定文字 */
|
|
58
|
-
okText: String,
|
|
37
|
+
/** 表格国际化 */
|
|
38
|
+
locale: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
59
42
|
/** 弹窗参数 */
|
|
60
43
|
modalProps: Object,
|
|
61
44
|
/** 打印组件参数 */
|
|
@@ -72,6 +55,8 @@ const _sfc_main = defineComponent({
|
|
|
72
55
|
datasource: [Array, Function],
|
|
73
56
|
/** 单元格合并行列方法 */
|
|
74
57
|
spanMethod: Function,
|
|
58
|
+
/** 表格是否有表头 */
|
|
59
|
+
tableHeader: Boolean,
|
|
75
60
|
/** 是否显示合计行 */
|
|
76
61
|
showSummary: Boolean,
|
|
77
62
|
/** 合计行文本 */
|
|
@@ -88,6 +73,8 @@ const _sfc_main = defineComponent({
|
|
|
88
73
|
headerCellClassName: [String, Function],
|
|
89
74
|
/** 序号列起始索引 */
|
|
90
75
|
pageIndex: Number,
|
|
76
|
+
/** 子级字段名 */
|
|
77
|
+
childrenField: String,
|
|
91
78
|
/** 表格请求数据方法 */
|
|
92
79
|
fetch: Function,
|
|
93
80
|
/** 默认数据类型 */
|
|
@@ -105,6 +92,10 @@ const _sfc_main = defineComponent({
|
|
|
105
92
|
const colItems = ref([]);
|
|
106
93
|
const isCheckAll = ref(false);
|
|
107
94
|
const isIndeterminate = ref(false);
|
|
95
|
+
const showHeader = ref(true);
|
|
96
|
+
const showFooter = ref(false);
|
|
97
|
+
const showTreeIndex = ref(false);
|
|
98
|
+
const treeIndexDisabled = ref(true);
|
|
108
99
|
const printOptions = reactive({
|
|
109
100
|
printing: false,
|
|
110
101
|
headerData: [],
|
|
@@ -143,9 +134,12 @@ const _sfc_main = defineComponent({
|
|
|
143
134
|
columns,
|
|
144
135
|
props.spanMethod,
|
|
145
136
|
props.pageIndex,
|
|
146
|
-
|
|
137
|
+
showFooter.value,
|
|
147
138
|
props.sumText,
|
|
148
|
-
props.summaryMethod
|
|
139
|
+
props.summaryMethod,
|
|
140
|
+
props.childrenField,
|
|
141
|
+
showTreeIndex.value,
|
|
142
|
+
showHeader.value
|
|
149
143
|
);
|
|
150
144
|
if (typeof props.beforePrint === "function") {
|
|
151
145
|
const flag = props.beforePrint({
|
|
@@ -201,7 +195,9 @@ const _sfc_main = defineComponent({
|
|
|
201
195
|
const initColItems = () => {
|
|
202
196
|
colItems.value = getColItems(
|
|
203
197
|
props.columns,
|
|
204
|
-
props.
|
|
198
|
+
props.locale.columnUntitled,
|
|
199
|
+
props.locale.columnIndex,
|
|
200
|
+
props.locale.columnExpand,
|
|
205
201
|
columnsPrintFilter,
|
|
206
202
|
true,
|
|
207
203
|
true
|
|
@@ -222,11 +218,12 @@ const _sfc_main = defineComponent({
|
|
|
222
218
|
isCheckAll.value = colItems.value.length > 0 && checkAll;
|
|
223
219
|
isIndeterminate.value = !checkAll && indeterminate;
|
|
224
220
|
};
|
|
225
|
-
const onCheckedChange = (item, checked) => {
|
|
221
|
+
const onCheckedChange = (item, checked, type) => {
|
|
226
222
|
let checkAll = true;
|
|
227
223
|
let indeterminate = false;
|
|
228
224
|
eachTree(colItems.value, (d) => {
|
|
229
|
-
|
|
225
|
+
const flag = item == null ? type === d.type : d.uid === item.uid;
|
|
226
|
+
if (flag) {
|
|
230
227
|
d.checked = checked;
|
|
231
228
|
}
|
|
232
229
|
if (!d.checked && checkAll) {
|
|
@@ -235,7 +232,7 @@ const _sfc_main = defineComponent({
|
|
|
235
232
|
if (d.checked && !indeterminate) {
|
|
236
233
|
indeterminate = true;
|
|
237
234
|
}
|
|
238
|
-
if (
|
|
235
|
+
if (flag && !checkAll && indeterminate) {
|
|
239
236
|
return false;
|
|
240
237
|
}
|
|
241
238
|
});
|
|
@@ -266,10 +263,27 @@ const _sfc_main = defineComponent({
|
|
|
266
263
|
const onReset = () => {
|
|
267
264
|
initColItems();
|
|
268
265
|
};
|
|
266
|
+
const handleTreeIndexChange = (checked) => {
|
|
267
|
+
if (checked) {
|
|
268
|
+
onCheckedChange(void 0, false, "index");
|
|
269
|
+
}
|
|
270
|
+
};
|
|
269
271
|
watch(visible, (visible2) => {
|
|
270
272
|
if (visible2) {
|
|
271
273
|
dataType.value = props.defaultDataType;
|
|
272
274
|
initColItems();
|
|
275
|
+
showHeader.value = props.tableHeader;
|
|
276
|
+
showFooter.value = props.showSummary;
|
|
277
|
+
treeIndexDisabled.value = !(props.pageData && props.pageData.some(
|
|
278
|
+
(d) => {
|
|
279
|
+
var _a;
|
|
280
|
+
return props.childrenField && ((_a = d[props.childrenField]) == null ? void 0 : _a.length);
|
|
281
|
+
}
|
|
282
|
+
)) && findTree(colItems.value, (c) => c.type === "expand") == null;
|
|
283
|
+
if (treeIndexDisabled.value) {
|
|
284
|
+
showTreeIndex.value = false;
|
|
285
|
+
}
|
|
286
|
+
handleTreeIndexChange(showTreeIndex.value);
|
|
273
287
|
return;
|
|
274
288
|
}
|
|
275
289
|
printOptions.data = [];
|
|
@@ -289,6 +303,10 @@ const _sfc_main = defineComponent({
|
|
|
289
303
|
colItems,
|
|
290
304
|
isCheckAll,
|
|
291
305
|
isIndeterminate,
|
|
306
|
+
showHeader,
|
|
307
|
+
showFooter,
|
|
308
|
+
showTreeIndex,
|
|
309
|
+
treeIndexDisabled,
|
|
292
310
|
printOptions,
|
|
293
311
|
openModal,
|
|
294
312
|
closeModal,
|
|
@@ -297,7 +315,8 @@ const _sfc_main = defineComponent({
|
|
|
297
315
|
onCheckedChange,
|
|
298
316
|
onSortChange,
|
|
299
317
|
onCheckAllChange,
|
|
300
|
-
onReset
|
|
318
|
+
onReset,
|
|
319
|
+
handleTreeIndexChange
|
|
301
320
|
};
|
|
302
321
|
}
|
|
303
322
|
});
|
|
@@ -311,9 +330,14 @@ const _export_sfc = (sfc, props) => {
|
|
|
311
330
|
const _hoisted_1 = { class: "ele-tool-column is-sortable" };
|
|
312
331
|
const _hoisted_2 = { class: "ele-tool-column-header" };
|
|
313
332
|
const _hoisted_3 = { class: "ele-tool-column-label" };
|
|
314
|
-
const _hoisted_4 =
|
|
315
|
-
const _hoisted_5 =
|
|
316
|
-
const _hoisted_6 = { key:
|
|
333
|
+
const _hoisted_4 = { class: "ele-tool-form-options" };
|
|
334
|
+
const _hoisted_5 = ["width"];
|
|
335
|
+
const _hoisted_6 = { key: 0 };
|
|
336
|
+
const _hoisted_7 = ["colspan", "rowspan"];
|
|
337
|
+
const _hoisted_8 = ["rowspan", "colspan"];
|
|
338
|
+
const _hoisted_9 = ["colspan", "rowspan"];
|
|
339
|
+
const _hoisted_10 = { key: 1 };
|
|
340
|
+
const _hoisted_11 = ["colspan", "rowspan"];
|
|
317
341
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
318
342
|
const _component_PrinterOutlined = resolveComponent("PrinterOutlined");
|
|
319
343
|
const _component_ElIcon = resolveComponent("ElIcon");
|
|
@@ -332,7 +356,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
332
356
|
const _component_ElePrinter = resolveComponent("ElePrinter");
|
|
333
357
|
const _component_EleTool = resolveComponent("EleTool");
|
|
334
358
|
return openBlock(), createBlock(_component_EleTool, {
|
|
335
|
-
title: _ctx.
|
|
359
|
+
title: _ctx.locale.print,
|
|
336
360
|
placement: _ctx.placement,
|
|
337
361
|
onClick: _ctx.openModal
|
|
338
362
|
}, {
|
|
@@ -346,16 +370,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
346
370
|
createVNode(_component_EleModal, mergeProps({
|
|
347
371
|
form: true,
|
|
348
372
|
width: "460px",
|
|
349
|
-
title: _ctx.
|
|
373
|
+
title: _ctx.locale.print,
|
|
350
374
|
position: "center"
|
|
351
375
|
}, _ctx.modalProps || {}, {
|
|
352
376
|
modelValue: _ctx.visible,
|
|
353
|
-
"onUpdate:modelValue": _cache[
|
|
377
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.visible = $event)
|
|
354
378
|
}), {
|
|
355
379
|
footer: withCtx(() => [
|
|
356
380
|
createVNode(_component_ElButton, { onClick: _ctx.closeModal }, {
|
|
357
381
|
default: withCtx(() => [
|
|
358
|
-
createTextVNode(toDisplayString(_ctx.
|
|
382
|
+
createTextVNode(toDisplayString(_ctx.locale.exportCancel), 1)
|
|
359
383
|
]),
|
|
360
384
|
_: 1
|
|
361
385
|
}, 8, ["onClick"]),
|
|
@@ -365,7 +389,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
365
389
|
onClick: _ctx.handlePrint
|
|
366
390
|
}, {
|
|
367
391
|
default: withCtx(() => [
|
|
368
|
-
createTextVNode(toDisplayString(_ctx.
|
|
392
|
+
createTextVNode(toDisplayString(_ctx.locale.exportOk), 1)
|
|
369
393
|
]),
|
|
370
394
|
_: 1
|
|
371
395
|
}, 8, ["loading", "onClick"])
|
|
@@ -373,33 +397,35 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
373
397
|
default: withCtx(() => [
|
|
374
398
|
createVNode(_component_ElForm, {
|
|
375
399
|
labelWidth: "80px",
|
|
376
|
-
onSubmit: _cache[
|
|
400
|
+
onSubmit: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
377
401
|
}, ["prevent"])),
|
|
378
402
|
class: "ele-tool-print-form"
|
|
379
403
|
}, {
|
|
380
404
|
default: withCtx(() => [
|
|
381
|
-
createVNode(_component_ElFormItem, {
|
|
405
|
+
createVNode(_component_ElFormItem, {
|
|
406
|
+
label: _ctx.locale.exportSelectData
|
|
407
|
+
}, {
|
|
382
408
|
default: withCtx(() => [
|
|
383
409
|
createVNode(_component_ElSelect, {
|
|
384
410
|
modelValue: _ctx.dataType,
|
|
385
411
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.dataType = $event),
|
|
386
|
-
placeholder: _ctx.
|
|
412
|
+
placeholder: _ctx.locale.exportSelectData
|
|
387
413
|
}, {
|
|
388
414
|
default: withCtx(() => [
|
|
389
415
|
_ctx.pageData != null ? (openBlock(), createBlock(_component_ElOption, {
|
|
390
416
|
key: 0,
|
|
391
417
|
value: "pageData",
|
|
392
|
-
label: _ctx.
|
|
418
|
+
label: _ctx.locale.exportDataTypePage
|
|
393
419
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
394
420
|
_ctx.selections != null ? (openBlock(), createBlock(_component_ElOption, {
|
|
395
421
|
key: 1,
|
|
396
422
|
value: "selections",
|
|
397
|
-
label: _ctx.
|
|
423
|
+
label: _ctx.locale.exportDataTypeSelected
|
|
398
424
|
}, null, 8, ["label"])) : createCommentVNode("", true),
|
|
399
425
|
_ctx.datasource != null ? (openBlock(), createBlock(_component_ElOption, {
|
|
400
426
|
key: 2,
|
|
401
427
|
value: "data",
|
|
402
|
-
label: _ctx.
|
|
428
|
+
label: _ctx.locale.exportDataTypeAll
|
|
403
429
|
}, null, 8, ["label"])) : createCommentVNode("", true)
|
|
404
430
|
]),
|
|
405
431
|
_: 1
|
|
@@ -407,13 +433,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
407
433
|
]),
|
|
408
434
|
_: 1
|
|
409
435
|
}, 8, ["label"]),
|
|
410
|
-
createVNode(_component_ElFormItem, {
|
|
436
|
+
createVNode(_component_ElFormItem, {
|
|
437
|
+
label: _ctx.locale.exportSelectColumn
|
|
438
|
+
}, {
|
|
411
439
|
default: withCtx(() => [
|
|
412
440
|
createElementVNode("div", _hoisted_1, [
|
|
413
441
|
createElementVNode("div", _hoisted_2, [
|
|
414
442
|
createElementVNode("div", _hoisted_3, [
|
|
415
443
|
createVNode(_component_ElCheckbox, {
|
|
416
|
-
label: _ctx.
|
|
444
|
+
label: _ctx.locale.columnTitle,
|
|
417
445
|
modelValue: _ctx.isCheckAll,
|
|
418
446
|
indeterminate: _ctx.isIndeterminate,
|
|
419
447
|
"onUpdate:modelValue": _ctx.onCheckAllChange
|
|
@@ -422,7 +450,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
422
450
|
createElementVNode("div", {
|
|
423
451
|
class: "ele-tool-column-link",
|
|
424
452
|
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onReset && _ctx.onReset(...args))
|
|
425
|
-
}, toDisplayString(_ctx.
|
|
453
|
+
}, toDisplayString(_ctx.locale.columnReset), 1)
|
|
426
454
|
]),
|
|
427
455
|
createVNode(_component_ToolColumnList, {
|
|
428
456
|
data: _ctx.colItems,
|
|
@@ -433,6 +461,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
433
461
|
])
|
|
434
462
|
]),
|
|
435
463
|
_: 1
|
|
464
|
+
}, 8, ["label"]),
|
|
465
|
+
createVNode(_component_ElFormItem, {
|
|
466
|
+
label: _ctx.locale.exportOther
|
|
467
|
+
}, {
|
|
468
|
+
default: withCtx(() => [
|
|
469
|
+
createElementVNode("div", _hoisted_4, [
|
|
470
|
+
createVNode(_component_ElCheckbox, {
|
|
471
|
+
label: _ctx.locale.exportOtherHeader,
|
|
472
|
+
modelValue: _ctx.showHeader,
|
|
473
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.showHeader = $event),
|
|
474
|
+
disabled: !_ctx.tableHeader
|
|
475
|
+
}, null, 8, ["label", "modelValue", "disabled"]),
|
|
476
|
+
createVNode(_component_ElCheckbox, {
|
|
477
|
+
label: _ctx.locale.exportOtherFooter,
|
|
478
|
+
modelValue: _ctx.showFooter,
|
|
479
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.showFooter = $event),
|
|
480
|
+
disabled: !_ctx.showSummary
|
|
481
|
+
}, null, 8, ["label", "modelValue", "disabled"]),
|
|
482
|
+
createVNode(_component_ElCheckbox, {
|
|
483
|
+
label: _ctx.locale.exportOtherTreeIndex,
|
|
484
|
+
modelValue: _ctx.showTreeIndex,
|
|
485
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.showTreeIndex = $event),
|
|
486
|
+
disabled: _ctx.treeIndexDisabled,
|
|
487
|
+
onChange: _ctx.handleTreeIndexChange
|
|
488
|
+
}, null, 8, ["label", "modelValue", "disabled", "onChange"])
|
|
489
|
+
])
|
|
490
|
+
]),
|
|
491
|
+
_: 1
|
|
436
492
|
}, 8, ["label"])
|
|
437
493
|
]),
|
|
438
494
|
_: 1
|
|
@@ -442,7 +498,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
442
498
|
}, 16, ["title", "modelValue"]),
|
|
443
499
|
createVNode(_component_ElePrinter, mergeProps({ target: "_iframe" }, _ctx.printerProps || {}, {
|
|
444
500
|
modelValue: _ctx.printOptions.printing,
|
|
445
|
-
"onUpdate:modelValue": _cache[
|
|
501
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => _ctx.printOptions.printing = $event),
|
|
446
502
|
onDone: _ctx.onPrintDone
|
|
447
503
|
}), {
|
|
448
504
|
default: withCtx(() => [
|
|
@@ -461,16 +517,25 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
461
517
|
return openBlock(), createElementBlock("col", {
|
|
462
518
|
key: col.key,
|
|
463
519
|
width: col.width
|
|
464
|
-
}, null, 8,
|
|
520
|
+
}, null, 8, _hoisted_5);
|
|
465
521
|
}), 128))
|
|
466
522
|
]),
|
|
467
|
-
_ctx.printOptions.hasHeader ? (openBlock(), createElementBlock("thead",
|
|
523
|
+
_ctx.printOptions.hasHeader ? (openBlock(), createElementBlock("thead", _hoisted_6, [
|
|
468
524
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.printOptions.headerData, (item, index) => {
|
|
469
525
|
return openBlock(), createElementBlock("tr", { key: index }, [
|
|
470
526
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item, (col, columnIndex) => {
|
|
471
|
-
return openBlock(), createElementBlock(Fragment,
|
|
472
|
-
|
|
473
|
-
|
|
527
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
528
|
+
key: col.key
|
|
529
|
+
}, [
|
|
530
|
+
col.isTreeIndex ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
531
|
+
col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createElementBlock("th", {
|
|
532
|
+
key: 0,
|
|
533
|
+
colspan: col.colspan,
|
|
534
|
+
rowspan: col.rowspan,
|
|
535
|
+
class: "ele-print-tree-index"
|
|
536
|
+
}, null, 8, _hoisted_7)) : createCommentVNode("", true)
|
|
537
|
+
], 64)) : col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createBlock(_component_ToolPrintHeaderCell, {
|
|
538
|
+
key: 1,
|
|
474
539
|
col,
|
|
475
540
|
columnIndex,
|
|
476
541
|
headerCellStyle: _ctx.headerCellStyle,
|
|
@@ -488,7 +553,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
488
553
|
})
|
|
489
554
|
]), 1032, ["col", "columnIndex", "headerCellStyle", "headerCellClass"])) : createCommentVNode("", true)
|
|
490
555
|
], 64);
|
|
491
|
-
}),
|
|
556
|
+
}), 128))
|
|
492
557
|
]);
|
|
493
558
|
}), 128))
|
|
494
559
|
])) : createCommentVNode("", true),
|
|
@@ -496,9 +561,44 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
496
561
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.printOptions.bodyData, (item, index) => {
|
|
497
562
|
return openBlock(), createElementBlock("tr", { key: index }, [
|
|
498
563
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item, (col, columnIndex) => {
|
|
499
|
-
return openBlock(), createElementBlock(Fragment,
|
|
500
|
-
|
|
501
|
-
|
|
564
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
565
|
+
key: col.key
|
|
566
|
+
}, [
|
|
567
|
+
col.isExpandCell ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
568
|
+
col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createElementBlock("td", {
|
|
569
|
+
key: 0,
|
|
570
|
+
rowspan: col.rowspan,
|
|
571
|
+
colspan: col.colspan,
|
|
572
|
+
style: { "padding-left": "0", "padding-right": "0" },
|
|
573
|
+
class: "ele-print-expand-td"
|
|
574
|
+
}, [
|
|
575
|
+
col.column && (col.column.printSlot || col.column.slot) && !["printTop", "printBottom"].includes(
|
|
576
|
+
col.column.printSlot || col.column.slot
|
|
577
|
+
) ? renderSlot(_ctx.$slots, col.column.printSlot || col.column.slot, normalizeProps(mergeProps({ key: 0 }, {
|
|
578
|
+
row: col.row,
|
|
579
|
+
column: col.column,
|
|
580
|
+
$index: col.index
|
|
581
|
+
}))) : createCommentVNode("", true)
|
|
582
|
+
], 8, _hoisted_8)) : createCommentVNode("", true)
|
|
583
|
+
], 64)) : col.isTreeIndex ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
584
|
+
col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createElementBlock("td", {
|
|
585
|
+
key: 0,
|
|
586
|
+
colspan: col.colspan,
|
|
587
|
+
rowspan: col.rowspan,
|
|
588
|
+
style: normalizeStyle({
|
|
589
|
+
paddingLeft: 0,
|
|
590
|
+
paddingRight: 0,
|
|
591
|
+
textAlign: "center",
|
|
592
|
+
verticalAlign: "top",
|
|
593
|
+
borderLeftColor: col.text ? void 0 : "transparent"
|
|
594
|
+
}),
|
|
595
|
+
class: normalizeClass([
|
|
596
|
+
"ele-print-tree-index",
|
|
597
|
+
{ "is-placeholder": !col.text }
|
|
598
|
+
])
|
|
599
|
+
}, toDisplayString(col.text), 15, _hoisted_9)) : createCommentVNode("", true)
|
|
600
|
+
], 64)) : col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createBlock(_component_ToolPrintBodyCell, {
|
|
601
|
+
key: 2,
|
|
502
602
|
col,
|
|
503
603
|
columnIndex,
|
|
504
604
|
bodyCellStyle: _ctx.cellStyle,
|
|
@@ -516,23 +616,28 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
516
616
|
})
|
|
517
617
|
]), 1032, ["col", "columnIndex", "bodyCellStyle", "bodyCellClass"])) : createCommentVNode("", true)
|
|
518
618
|
], 64);
|
|
519
|
-
}),
|
|
619
|
+
}), 128))
|
|
520
620
|
]);
|
|
521
621
|
}), 128))
|
|
522
622
|
]),
|
|
523
|
-
_ctx.printOptions.hasFooter ? (openBlock(), createElementBlock("tfoot",
|
|
623
|
+
_ctx.printOptions.hasFooter ? (openBlock(), createElementBlock("tfoot", _hoisted_10, [
|
|
524
624
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.printOptions.footerData, (item, index) => {
|
|
525
625
|
return openBlock(), createElementBlock("tr", { key: index }, [
|
|
526
626
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item, (col) => {
|
|
527
|
-
return openBlock(), createElementBlock(
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
627
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
628
|
+
col.rowspan !== 0 && col.colspan !== 0 ? (openBlock(), createElementBlock("td", {
|
|
629
|
+
key: col.key,
|
|
630
|
+
colspan: col.colspan,
|
|
631
|
+
rowspan: col.rowspan
|
|
632
|
+
}, [
|
|
633
|
+
!col.isExpandCell ? (openBlock(), createBlock(_component_CellRender, {
|
|
634
|
+
key: 0,
|
|
635
|
+
render: () => col.text,
|
|
636
|
+
params: []
|
|
637
|
+
}, null, 8, ["render"])) : createCommentVNode("", true)
|
|
638
|
+
], 8, _hoisted_11)) : createCommentVNode("", true)
|
|
639
|
+
], 64);
|
|
640
|
+
}), 256))
|
|
536
641
|
]);
|
|
537
642
|
}), 128))
|
|
538
643
|
])) : createCommentVNode("", true)
|
|
@@ -228,6 +228,7 @@ const _sfc_main = defineComponent({
|
|
|
228
228
|
});
|
|
229
229
|
};
|
|
230
230
|
const requestCallback = (data, total, parent, response, resolve) => {
|
|
231
|
+
var _a;
|
|
231
232
|
if (!Array.isArray(data)) {
|
|
232
233
|
tableData.value = [];
|
|
233
234
|
tableLoading.value = false;
|
|
@@ -245,6 +246,9 @@ const _sfc_main = defineComponent({
|
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
248
|
if (resolve) {
|
|
249
|
+
if (parent != null) {
|
|
250
|
+
parent[((_a = props.treeProps) == null ? void 0 : _a.children) || "children"] = data;
|
|
251
|
+
}
|
|
248
252
|
resolve(data);
|
|
249
253
|
} else {
|
|
250
254
|
if (isAutoAmend(props.pagination, globalProps.value.pagination) && !data.length && total && "*" !== total && tablePage.value && tableLimit.value) {
|
|
@@ -512,56 +516,61 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
512
516
|
return openBlock(), createBlock(_component_EleLoading, normalizeProps(guardReactiveProps(_ctx.loadingProps)), {
|
|
513
517
|
default: withCtx(() => [
|
|
514
518
|
_ctx.toolbar ? (openBlock(), createBlock(_component_EleToolbar, normalizeProps(mergeProps$1({ key: 0 }, _ctx.toolbar === true ? {} : _ctx.toolbar)), {
|
|
515
|
-
tools: withCtx(() =>
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
519
|
+
tools: withCtx(() => {
|
|
520
|
+
var _a;
|
|
521
|
+
return [
|
|
522
|
+
renderSlot(_ctx.$slots, "tools"),
|
|
523
|
+
_ctx.toolNames && _ctx.toolNames.length ? (openBlock(), createBlock(_component_TableTools, {
|
|
524
|
+
key: 0,
|
|
525
|
+
tools: _ctx.toolNames,
|
|
526
|
+
size: _ctx.tableSize,
|
|
527
|
+
columns: _ctx.columns,
|
|
528
|
+
columnSortable: _ctx.columnSortable,
|
|
529
|
+
columnFixed: _ctx.columnFixed,
|
|
530
|
+
maximized: _ctx.tableMaximized,
|
|
531
|
+
cacheKey: _ctx.cacheKey,
|
|
532
|
+
locale: _ctx.locale,
|
|
533
|
+
selections: _ctx.selections,
|
|
534
|
+
pageData: _ctx.tableData,
|
|
535
|
+
spanMethod: _ctx.spanMethod,
|
|
536
|
+
tableHeader: _ctx.showHeader,
|
|
537
|
+
showSummary: _ctx.showSummary,
|
|
538
|
+
sumText: _ctx.sumText,
|
|
539
|
+
summaryMethod: _ctx.summaryMethod,
|
|
540
|
+
cellStyle: _ctx.cellStyle,
|
|
541
|
+
cellClassName: _ctx.cellClassName,
|
|
542
|
+
headerCellStyle: _ctx.headerCellStyle,
|
|
543
|
+
headerCellClassName: _ctx.headerCellClassName,
|
|
544
|
+
pageIndex: _ctx.tableIndex,
|
|
545
|
+
childrenField: (_a = _ctx.treeProps) == null ? void 0 : _a.children,
|
|
546
|
+
fetch: _ctx.fetch,
|
|
547
|
+
exportConfig: _ctx.toolExportConfig,
|
|
548
|
+
printConfig: _ctx.toolPrintConfig,
|
|
549
|
+
onReload: _ctx.onRefresh,
|
|
550
|
+
"onUpdate:size": _ctx.onSizeChange,
|
|
551
|
+
"onUpdate:columns": _ctx.onColumnsChange,
|
|
552
|
+
"onUpdate:maximized": _ctx.onMaximizedChange
|
|
553
|
+
}, createSlots({ _: 2 }, [
|
|
554
|
+
renderList(Object.keys(_ctx.$slots).filter(
|
|
555
|
+
(k) => ![
|
|
556
|
+
"default",
|
|
557
|
+
"toolbar",
|
|
558
|
+
"tools",
|
|
559
|
+
"footer",
|
|
560
|
+
"empty",
|
|
561
|
+
"append"
|
|
562
|
+
].includes(k)
|
|
563
|
+
), (name) => {
|
|
564
|
+
return {
|
|
565
|
+
name,
|
|
566
|
+
fn: withCtx((slotProps) => [
|
|
567
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
568
|
+
])
|
|
569
|
+
};
|
|
570
|
+
})
|
|
571
|
+
]), 1032, ["tools", "size", "columns", "columnSortable", "columnFixed", "maximized", "cacheKey", "locale", "selections", "pageData", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "cellStyle", "cellClassName", "headerCellStyle", "headerCellClassName", "pageIndex", "childrenField", "fetch", "exportConfig", "printConfig", "onReload", "onUpdate:size", "onUpdate:columns", "onUpdate:maximized"])) : createCommentVNode("", true)
|
|
572
|
+
];
|
|
573
|
+
}),
|
|
565
574
|
default: withCtx(() => [
|
|
566
575
|
renderSlot(_ctx.$slots, "toolbar")
|
|
567
576
|
]),
|