ele-admin-plus 1.4.1-beta.1 → 1.4.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-components.d.ts +2 -0
- package/es/core-components.js +104 -100
- package/es/ele-app/plus.d.ts +9 -1
- package/es/ele-app/plusx.d.ts +26 -13
- package/es/ele-backtop/index.js +7 -1
- package/es/ele-basic-select/components/select-view.d.ts +53 -22
- package/es/ele-basic-select/components/select-view.js +57 -20
- package/es/ele-basic-select/index.d.ts +39 -19
- package/es/ele-basic-select/index.js +62 -13
- package/es/ele-basic-select/props.d.ts +33 -21
- package/es/ele-basic-select/props.js +33 -21
- package/es/ele-basic-select/style/index.js +2 -0
- package/es/ele-basic-select/types.d.ts +1 -1
- package/es/ele-config-provider/components/receiver-view.d.ts +2 -0
- package/es/ele-config-provider/components/receiver-view.js +74 -72
- package/es/ele-config-provider/receiver.d.ts +2 -2
- package/es/ele-config-provider/receiver.js +5 -1
- package/es/ele-config-provider/types.d.ts +10 -1
- package/es/ele-copyable/index.d.ts +2 -4
- package/es/ele-cron-builder/index.d.ts +24 -0
- package/es/ele-cron-builder/index.js +81 -0
- package/es/ele-cron-builder/props.d.ts +31 -0
- package/es/ele-cron-builder/props.js +24 -0
- package/es/ele-cron-builder/style/index.d.ts +1 -0
- package/es/ele-cron-builder/style/index.js +4 -0
- package/es/ele-cron-builder/style/index.scss +6 -0
- package/es/ele-cron-builder/types.d.ts +8 -0
- package/es/ele-cron-panel/components/cron-day.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-day.js +232 -0
- package/es/ele-cron-panel/components/cron-hour.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-hour.js +174 -0
- package/es/ele-cron-panel/components/cron-minute.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-minute.js +174 -0
- package/es/ele-cron-panel/components/cron-month.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-month.js +174 -0
- package/es/ele-cron-panel/components/cron-second.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-second.js +174 -0
- package/es/ele-cron-panel/components/cron-week.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-week.js +229 -0
- package/es/ele-cron-panel/components/cron-year.d.ts +25 -0
- package/es/ele-cron-panel/components/cron-year.js +186 -0
- package/es/ele-cron-panel/index.d.ts +14 -0
- package/es/ele-cron-panel/index.js +348 -0
- package/es/ele-cron-panel/props.d.ts +20 -0
- package/es/ele-cron-panel/props.js +14 -0
- package/es/ele-cron-panel/style/index.d.ts +1 -0
- package/es/ele-cron-panel/style/index.js +7 -0
- package/es/ele-cron-panel/style/index.scss +282 -0
- package/es/ele-cron-panel/types.d.ts +118 -0
- package/es/ele-cron-panel/util.d.ts +23 -0
- package/es/ele-cron-panel/util.js +542 -0
- package/es/ele-cropper/components/cropper-tools.d.ts +2 -2
- package/es/ele-cropper-modal/index.d.ts +2 -4
- package/es/ele-crud/index.d.ts +3 -3
- package/es/ele-drawer/index.d.ts +9 -0
- package/es/ele-drawer/index.js +5 -1
- package/es/ele-drawer/props.d.ts +5 -0
- package/es/ele-drawer/props.js +6 -1
- package/es/ele-drawer/style/index.scss +11 -0
- package/es/ele-file-list/index.d.ts +3 -3
- package/es/ele-icon-select/components/icon-grid.d.ts +8 -3
- package/es/ele-icon-select/components/icon-grid.js +20 -12
- package/es/ele-icon-select/index.d.ts +58 -59
- package/es/ele-icon-select/index.js +92 -86
- package/es/ele-icon-select/props.d.ts +35 -35
- package/es/ele-icon-select/props.js +34 -34
- package/es/ele-icon-select/style/css-var.scss +1 -1
- package/es/ele-icon-select/style/index.scss +50 -18
- package/es/ele-icon-select/types.d.ts +13 -0
- package/es/ele-map-picker/index.d.ts +3 -3
- package/es/ele-modal/index.d.ts +4 -2
- package/es/ele-modal/index.js +9 -3
- package/es/ele-modal/props.d.ts +2 -0
- package/es/ele-modal/props.js +2 -0
- package/es/ele-modal/style/index.scss +16 -0
- package/es/ele-pro-form/components/item-type-data.js +39 -64
- package/es/ele-pro-form/index.d.ts +3 -3
- package/es/ele-pro-table/components/table-tools.d.ts +12 -97
- package/es/ele-pro-table/components/table-tools.js +118 -248
- package/es/ele-pro-table/components/tool-export.d.ts +5 -1
- package/es/ele-pro-table/components/tool-export.js +32 -20
- package/es/ele-pro-table/components/tool-print.d.ts +5 -1
- package/es/ele-pro-table/components/tool-print.js +37 -25
- package/es/ele-pro-table/exceljs-plugin.d.ts +12 -0
- package/es/ele-pro-table/exceljs-plugin.js +81 -0
- package/es/ele-pro-table/index.d.ts +6 -7
- package/es/ele-pro-table/index.js +117 -46
- package/es/ele-pro-table/types.d.ts +11 -0
- package/es/ele-split-panel/style/index.scss +1 -1
- package/es/ele-table-select/index.d.ts +2 -0
- package/es/ele-table-select/props.d.ts +2 -0
- package/es/ele-table-select/props.js +3 -1
- package/es/ele-tour/index.d.ts +3 -3
- package/es/ele-tree-select/index.d.ts +2 -0
- package/es/ele-upload-list/index.d.ts +3 -3
- package/es/ele-upload-list/index.js +25 -8
- package/es/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/es/ele-watermark/index.d.ts +20 -7
- package/es/ele-watermark/index.js +253 -94
- package/es/ele-watermark/props.d.ts +10 -3
- package/es/ele-watermark/props.js +10 -3
- package/es/ele-watermark/types.d.ts +12 -0
- package/es/ele-watermark/util.d.ts +2 -9
- package/es/ele-watermark/util.js +10 -19
- package/es/lang/en_US.js +116 -0
- package/es/lang/zh_CN.js +116 -0
- package/es/lang/zh_TW.js +116 -0
- package/es/style/plus.scss +3 -1
- package/es/style/themes/default.scss +12 -3
- package/es/style/themes/rounded.scss +2 -1
- package/es/utils/theme-util.d.ts +1 -1
- package/lib/core-components.cjs +104 -100
- package/lib/core-components.d.ts +2 -0
- package/lib/ele-app/plus.d.ts +9 -1
- package/lib/ele-app/plusx.d.ts +26 -13
- package/lib/ele-backtop/index.cjs +6 -0
- package/lib/ele-basic-select/components/select-view.cjs +56 -19
- package/lib/ele-basic-select/components/select-view.d.ts +53 -22
- package/lib/ele-basic-select/index.cjs +61 -12
- package/lib/ele-basic-select/index.d.ts +39 -19
- package/lib/ele-basic-select/props.cjs +33 -21
- package/lib/ele-basic-select/props.d.ts +33 -21
- package/lib/ele-basic-select/style/index.cjs +2 -0
- package/lib/ele-basic-select/types.d.ts +1 -1
- package/lib/ele-config-provider/components/receiver-view.cjs +2 -2
- package/lib/ele-config-provider/components/receiver-view.d.ts +2 -0
- package/lib/ele-config-provider/receiver.cjs +5 -1
- package/lib/ele-config-provider/receiver.d.ts +2 -2
- package/lib/ele-config-provider/types.d.ts +10 -1
- package/lib/ele-copyable/index.d.ts +2 -4
- package/lib/ele-cron-builder/index.cjs +80 -0
- package/lib/ele-cron-builder/index.d.ts +24 -0
- package/lib/ele-cron-builder/props.cjs +24 -0
- package/lib/ele-cron-builder/props.d.ts +31 -0
- package/lib/ele-cron-builder/style/index.cjs +5 -0
- package/lib/ele-cron-builder/style/index.d.ts +1 -0
- package/lib/ele-cron-builder/style/index.scss +6 -0
- package/lib/ele-cron-builder/types.d.ts +8 -0
- package/lib/ele-cron-panel/components/cron-day.cjs +231 -0
- package/lib/ele-cron-panel/components/cron-day.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-hour.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-hour.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-minute.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-minute.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-month.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-month.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-second.cjs +173 -0
- package/lib/ele-cron-panel/components/cron-second.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-week.cjs +228 -0
- package/lib/ele-cron-panel/components/cron-week.d.ts +25 -0
- package/lib/ele-cron-panel/components/cron-year.cjs +185 -0
- package/lib/ele-cron-panel/components/cron-year.d.ts +25 -0
- package/lib/ele-cron-panel/index.cjs +347 -0
- package/lib/ele-cron-panel/index.d.ts +14 -0
- package/lib/ele-cron-panel/props.cjs +14 -0
- package/lib/ele-cron-panel/props.d.ts +20 -0
- package/lib/ele-cron-panel/style/index.cjs +8 -0
- package/lib/ele-cron-panel/style/index.d.ts +1 -0
- package/lib/ele-cron-panel/style/index.scss +282 -0
- package/lib/ele-cron-panel/types.d.ts +118 -0
- package/lib/ele-cron-panel/util.cjs +542 -0
- package/lib/ele-cron-panel/util.d.ts +23 -0
- package/lib/ele-cropper/components/cropper-tools.d.ts +2 -2
- package/lib/ele-cropper-modal/index.d.ts +2 -4
- package/lib/ele-crud/index.d.ts +3 -3
- package/lib/ele-drawer/index.cjs +4 -0
- package/lib/ele-drawer/index.d.ts +9 -0
- package/lib/ele-drawer/props.cjs +6 -1
- package/lib/ele-drawer/props.d.ts +5 -0
- package/lib/ele-drawer/style/index.scss +11 -0
- package/lib/ele-file-list/index.d.ts +3 -3
- package/lib/ele-icon-select/components/icon-grid.cjs +19 -11
- package/lib/ele-icon-select/components/icon-grid.d.ts +8 -3
- package/lib/ele-icon-select/index.cjs +91 -85
- package/lib/ele-icon-select/index.d.ts +58 -59
- package/lib/ele-icon-select/props.cjs +34 -34
- package/lib/ele-icon-select/props.d.ts +35 -35
- package/lib/ele-icon-select/style/css-var.scss +1 -1
- package/lib/ele-icon-select/style/index.scss +50 -18
- package/lib/ele-icon-select/types.d.ts +13 -0
- package/lib/ele-map-picker/index.d.ts +3 -3
- package/lib/ele-modal/index.cjs +9 -3
- package/lib/ele-modal/index.d.ts +4 -2
- package/lib/ele-modal/props.cjs +2 -0
- package/lib/ele-modal/props.d.ts +2 -0
- package/lib/ele-modal/style/index.scss +16 -0
- package/lib/ele-pro-form/components/item-type-data.cjs +39 -64
- package/lib/ele-pro-form/index.d.ts +3 -3
- package/lib/ele-pro-table/components/table-tools.cjs +117 -247
- package/lib/ele-pro-table/components/table-tools.d.ts +12 -97
- package/lib/ele-pro-table/components/tool-export.cjs +32 -20
- package/lib/ele-pro-table/components/tool-export.d.ts +5 -1
- package/lib/ele-pro-table/components/tool-print.cjs +37 -25
- package/lib/ele-pro-table/components/tool-print.d.ts +5 -1
- package/lib/ele-pro-table/exceljs-plugin.cjs +81 -0
- package/lib/ele-pro-table/exceljs-plugin.d.ts +12 -0
- package/lib/ele-pro-table/index.cjs +143 -72
- package/lib/ele-pro-table/index.d.ts +6 -7
- package/lib/ele-pro-table/types.d.ts +11 -0
- package/lib/ele-split-panel/style/index.scss +1 -1
- package/lib/ele-table-select/index.d.ts +2 -0
- package/lib/ele-table-select/props.cjs +3 -1
- package/lib/ele-table-select/props.d.ts +2 -0
- package/lib/ele-tour/index.d.ts +3 -3
- package/lib/ele-tree-select/index.d.ts +2 -0
- package/lib/ele-upload-list/index.cjs +25 -8
- package/lib/ele-upload-list/index.d.ts +3 -3
- package/lib/ele-virtual-table/components/body-cell.d.ts +1 -1
- package/lib/ele-watermark/index.cjs +251 -92
- package/lib/ele-watermark/index.d.ts +20 -7
- package/lib/ele-watermark/props.cjs +10 -3
- package/lib/ele-watermark/props.d.ts +10 -3
- package/lib/ele-watermark/types.d.ts +12 -0
- package/lib/ele-watermark/util.cjs +10 -19
- package/lib/ele-watermark/util.d.ts +2 -9
- package/lib/lang/en_US.cjs +116 -0
- package/lib/lang/zh_CN.cjs +116 -0
- package/lib/lang/zh_TW.cjs +116 -0
- package/lib/style/plus.scss +3 -1
- package/lib/style/themes/default.scss +12 -3
- package/lib/style/themes/rounded.scss +2 -1
- package/lib/utils/theme-util.d.ts +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +2 -0
|
@@ -85,7 +85,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
85
85
|
/** 默认是否勾选层级序号 */
|
|
86
86
|
defaultShowTreeIndex: Boolean,
|
|
87
87
|
/** 打印前的钩子函数 */
|
|
88
|
-
beforePrint: Function
|
|
88
|
+
beforePrint: Function,
|
|
89
|
+
/** 打印插件 */
|
|
90
|
+
printPlugin: Function
|
|
89
91
|
},
|
|
90
92
|
setup(__props, { expose: __expose }) {
|
|
91
93
|
const ownSlots = ["printTop", "printBottom"];
|
|
@@ -164,35 +166,45 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
164
166
|
isShowTreeIndex,
|
|
165
167
|
isShowHeader
|
|
166
168
|
);
|
|
169
|
+
const printParams = {
|
|
170
|
+
data: printDataValue,
|
|
171
|
+
columns: printColumns,
|
|
172
|
+
headerData,
|
|
173
|
+
bodyData,
|
|
174
|
+
footerData,
|
|
175
|
+
bodyCols,
|
|
176
|
+
dataType: printDataType,
|
|
177
|
+
hideLoading,
|
|
178
|
+
closeModal,
|
|
179
|
+
showHeader: isShowHeader,
|
|
180
|
+
showFooter: isShowFooter,
|
|
181
|
+
showTreeIndex: isShowTreeIndex,
|
|
182
|
+
tableColumns
|
|
183
|
+
};
|
|
167
184
|
if (typeof props.beforePrint === "function") {
|
|
168
|
-
const flag = props.beforePrint(
|
|
169
|
-
data: printDataValue,
|
|
170
|
-
columns: printColumns,
|
|
171
|
-
headerData,
|
|
172
|
-
bodyData,
|
|
173
|
-
footerData,
|
|
174
|
-
bodyCols,
|
|
175
|
-
dataType: printDataType,
|
|
176
|
-
hideLoading,
|
|
177
|
-
closeModal,
|
|
178
|
-
showHeader: isShowHeader,
|
|
179
|
-
showFooter: isShowFooter,
|
|
180
|
-
showTreeIndex: isShowTreeIndex,
|
|
181
|
-
tableColumns
|
|
182
|
-
});
|
|
185
|
+
const flag = props.beforePrint(printParams);
|
|
183
186
|
if (flag === false) {
|
|
184
187
|
return;
|
|
185
188
|
}
|
|
186
189
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
if (props.printPlugin == null) {
|
|
191
|
+
printOptions.data = printDataValue;
|
|
192
|
+
printOptions.headerData = headerData;
|
|
193
|
+
printOptions.bodyData = bodyData;
|
|
194
|
+
printOptions.footerData = footerData;
|
|
195
|
+
printOptions.hasHeader = !!printOptions.headerData.length;
|
|
196
|
+
printOptions.hasFooter = !!printOptions.footerData.length;
|
|
197
|
+
printOptions.bodyCols = bodyCols;
|
|
198
|
+
vue.nextTick(() => {
|
|
199
|
+
printOptions.printing = true;
|
|
200
|
+
});
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
props.printPlugin(printParams).then(() => {
|
|
204
|
+
hideLoading();
|
|
205
|
+
closeModal();
|
|
206
|
+
}).catch(() => {
|
|
207
|
+
hideLoading();
|
|
196
208
|
});
|
|
197
209
|
};
|
|
198
210
|
const handlePrint = () => {
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { StyleValue } from '../../ele-app/types';
|
|
3
3
|
import { EleModalProps, ElePrinterProps, EleTableProps } from '../../ele-app/plus';
|
|
4
4
|
import { Columns, DataItem, SpanMethod, SummaryMethod, CellStyle, CellClass, HeaderCellStyle, HeaderCellClass, TreeProps } from '../../ele-data-table/types';
|
|
5
|
-
import { TableLocale, ExportDataType, BeforeExport, Datasource, FetchFunction, TableExportParams } from '../types';
|
|
5
|
+
import { TableLocale, ExportDataType, BeforeExport, ExportPlugin, Datasource, FetchFunction, TableExportParams } from '../types';
|
|
6
6
|
|
|
7
7
|
declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
|
|
8
8
|
row: DataItem | undefined;
|
|
@@ -78,6 +78,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
78
78
|
defaultShowTreeIndex: BooleanConstructor;
|
|
79
79
|
/** 打印前的钩子函数 */
|
|
80
80
|
beforePrint: PropType<BeforeExport>;
|
|
81
|
+
/** 打印插件 */
|
|
82
|
+
printPlugin: PropType<ExportPlugin>;
|
|
81
83
|
}>, {
|
|
82
84
|
openModal: () => void;
|
|
83
85
|
closeModal: () => void;
|
|
@@ -144,6 +146,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
144
146
|
defaultShowTreeIndex: BooleanConstructor;
|
|
145
147
|
/** 打印前的钩子函数 */
|
|
146
148
|
beforePrint: PropType<BeforeExport>;
|
|
149
|
+
/** 打印插件 */
|
|
150
|
+
printPlugin: PropType<ExportPlugin>;
|
|
147
151
|
}>> & Readonly<{}>, {
|
|
148
152
|
showSummary: boolean;
|
|
149
153
|
tableHeader: boolean;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ExcelJS = require("exceljs");
|
|
4
|
+
const common = require("../utils/common");
|
|
5
|
+
function getExportWorkbook(params) {
|
|
6
|
+
const { headerData, bodyData, footerData, bodyCols } = params;
|
|
7
|
+
const workbook = new ExcelJS.Workbook();
|
|
8
|
+
const sheet = workbook.addWorksheet("Sheet1");
|
|
9
|
+
const sheetRows = [];
|
|
10
|
+
const sheetStyles = [];
|
|
11
|
+
const sheetMerges = [];
|
|
12
|
+
const sheetRowHeight = [];
|
|
13
|
+
[...headerData, ...bodyData, ...footerData].forEach((item, index) => {
|
|
14
|
+
const sheetCols = [];
|
|
15
|
+
const rowStyles = [];
|
|
16
|
+
item.forEach((d, colIndex) => {
|
|
17
|
+
var _a;
|
|
18
|
+
if (!d.isTreeCell || !d.indent) {
|
|
19
|
+
sheetCols.push(d.text ?? "");
|
|
20
|
+
} else {
|
|
21
|
+
const gap = Array.from({ length: d.indent }).fill(" ").join("");
|
|
22
|
+
sheetCols.push(gap + (d.text ?? ""));
|
|
23
|
+
}
|
|
24
|
+
rowStyles.push({
|
|
25
|
+
font: { size: 12, bold: index < headerData.length },
|
|
26
|
+
alignment: {
|
|
27
|
+
vertical: d.isTreeIndex && d.rowspan !== 1 ? "top" : "middle",
|
|
28
|
+
horizontal: d.isExpandCell ? "left" : ((_a = d.column) == null ? void 0 : _a.align) || "left",
|
|
29
|
+
wrapText: d.isExpandCell ? true : false,
|
|
30
|
+
indent: d.isExpandCell ? 1 : 0
|
|
31
|
+
},
|
|
32
|
+
border: {
|
|
33
|
+
top: { style: "thin" },
|
|
34
|
+
left: d.hideLeftBorder ? {} : { style: "thin" },
|
|
35
|
+
bottom: { style: "thin" },
|
|
36
|
+
right: d.hideRightBorder ? {} : { style: "thin" }
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
if (d.rowspan && d.rowspan > 1 || d.colspan && d.colspan > 1) {
|
|
40
|
+
sheetMerges.push([
|
|
41
|
+
index + 1,
|
|
42
|
+
colIndex + 1,
|
|
43
|
+
index + (d.rowspan || 1),
|
|
44
|
+
colIndex + (d.colspan || 1)
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
sheetRows.push(sheetCols);
|
|
49
|
+
sheetStyles.push(rowStyles);
|
|
50
|
+
const expandCell = item.find((d) => d.isExpandCell && d.colspan);
|
|
51
|
+
const lines = String((expandCell == null ? void 0 : expandCell.text) ?? "").split("\n").length || 1;
|
|
52
|
+
sheetRowHeight.push(lines * 20);
|
|
53
|
+
});
|
|
54
|
+
sheet.addRows(sheetRows).forEach((row, index) => {
|
|
55
|
+
row.eachCell({ includeEmpty: true }, (cell, colIndex) => {
|
|
56
|
+
Object.assign(cell, sheetStyles[index][colIndex - 1]);
|
|
57
|
+
});
|
|
58
|
+
row.height = sheetRowHeight[index];
|
|
59
|
+
});
|
|
60
|
+
sheetMerges.forEach((merges) => {
|
|
61
|
+
sheet.mergeCells(merges);
|
|
62
|
+
});
|
|
63
|
+
bodyCols.forEach((col, colIndex) => {
|
|
64
|
+
const w = col.width ?? col.minWidth;
|
|
65
|
+
sheet.getColumn(colIndex + 1).width = w == null ? void 0 : w / 8;
|
|
66
|
+
});
|
|
67
|
+
return workbook;
|
|
68
|
+
}
|
|
69
|
+
const exceljsPlugin = function(params) {
|
|
70
|
+
return new Promise((resolve, reject) => {
|
|
71
|
+
getExportWorkbook(params).xlsx.writeBuffer().then((data) => {
|
|
72
|
+
common.download(data, `${params.fileName}.xlsx`);
|
|
73
|
+
resolve();
|
|
74
|
+
}).catch((e) => {
|
|
75
|
+
console.error(e);
|
|
76
|
+
reject(e);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
exports.exceljsPlugin = exceljsPlugin;
|
|
81
|
+
exports.getExportWorkbook = getExportWorkbook;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as ExcelJS } from 'exceljs';
|
|
2
|
+
import { ExportPlugin, BeforeExportParams } from './types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 导出生成 ExcelJS Workbook
|
|
6
|
+
* @param params 参数
|
|
7
|
+
*/
|
|
8
|
+
export declare function getExportWorkbook(params: BeforeExportParams): ExcelJS.Workbook;
|
|
9
|
+
/**
|
|
10
|
+
* 使用 ExcelJS 进行导出的插件
|
|
11
|
+
*/
|
|
12
|
+
export declare const exceljsPlugin: ExportPlugin;
|
|
@@ -5,12 +5,14 @@ const receiver = require("../ele-config-provider/receiver");
|
|
|
5
5
|
const EleLoading = require("../ele-loading/index");
|
|
6
6
|
const ElePagination = require("../ele-pagination/index");
|
|
7
7
|
const props$1 = require("../ele-data-table/props");
|
|
8
|
-
const util = require("../ele-data-table/util");
|
|
8
|
+
const util$1 = require("../ele-data-table/util");
|
|
9
9
|
const EleDataTable = require("../ele-data-table/index");
|
|
10
10
|
const EleVirtualTable = require("../ele-virtual-table/index");
|
|
11
11
|
const EleToolbar = require("../ele-toolbar/index");
|
|
12
12
|
const TableTools = require("./components/table-tools");
|
|
13
|
-
const
|
|
13
|
+
const ToolExport = require("./components/tool-export");
|
|
14
|
+
const ToolPrint = require("./components/tool-print");
|
|
15
|
+
const util = require("./util");
|
|
14
16
|
const props = require("./props");
|
|
15
17
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
16
18
|
...{ name: "EleProTable" },
|
|
@@ -31,9 +33,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
33
|
const pageSlotExcludes = [...toolsSlotExcludes, "printTop", "printBottom"];
|
|
32
34
|
const props2 = __props;
|
|
33
35
|
const emit = __emit;
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
+
const tableState = {
|
|
37
|
+
sorter: props2.defaultSort ?? {},
|
|
38
|
+
filter: util.getDefaultFilter(props2.columns),
|
|
39
|
+
where: props2.where ?? {},
|
|
40
|
+
reloadId: null
|
|
41
|
+
};
|
|
36
42
|
const globalProps = receiver.useGlobalProps("table");
|
|
43
|
+
const { lang } = receiver.useLocale("table", props2);
|
|
44
|
+
const tableViewRef = vue.ref(null);
|
|
45
|
+
const getTableRef = () => {
|
|
46
|
+
return tableViewRef.value;
|
|
47
|
+
};
|
|
48
|
+
const events = util$1.useEmits(emit);
|
|
49
|
+
const methods = util$1.useMethods(() => getTableRef());
|
|
37
50
|
const virtualTableEvents = {
|
|
38
51
|
onEndEeached: (params) => {
|
|
39
52
|
emit("endEeached", params);
|
|
@@ -45,36 +58,31 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
58
|
emit("rowsRendered", params);
|
|
46
59
|
}
|
|
47
60
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
filter: util$1.getDefaultFilter(props2.columns),
|
|
51
|
-
where: props2.where ?? {}
|
|
52
|
-
};
|
|
53
|
-
const tableToolsRef = vue.ref(null);
|
|
54
|
-
const tableViewRef = vue.ref(null);
|
|
61
|
+
const toolExportRef = vue.ref(null);
|
|
62
|
+
const toolPrintRef = vue.ref(null);
|
|
55
63
|
const tableData = vue.ref([]);
|
|
56
64
|
const tablePage = vue.ref(
|
|
57
|
-
util
|
|
65
|
+
util.getTablePage(props2.pagination, globalProps.value.pagination)
|
|
58
66
|
);
|
|
59
67
|
const tableLimit = vue.ref(
|
|
60
|
-
util
|
|
68
|
+
util.getTableLimit(props2.pagination, globalProps.value.pagination)
|
|
61
69
|
);
|
|
62
70
|
const tableTotal = vue.ref(0);
|
|
63
71
|
const tableLoading = vue.ref(props2.loading);
|
|
64
72
|
const tableCols = vue.ref([]);
|
|
65
73
|
const tableSize = vue.ref(
|
|
66
|
-
util
|
|
74
|
+
util.getTableSize(props2.cacheKey, props2.size, globalProps.value.size)
|
|
67
75
|
);
|
|
68
76
|
const tableMaximized = vue.ref(false);
|
|
69
77
|
const errorText = vue.ref("");
|
|
70
78
|
const cacheData = vue.ref();
|
|
71
|
-
const tableRowKey = vue.shallowRef(util
|
|
79
|
+
const tableRowKey = vue.shallowRef(util.getRowKey(props2.rowKey));
|
|
72
80
|
const tableIndex = vue.computed(() => {
|
|
73
81
|
return ((tablePage.value ?? 1) - 1) * (tableLimit.value ?? 0) + 1;
|
|
74
82
|
});
|
|
75
83
|
const tableCurrentIndex = vue.ref(tableIndex.value);
|
|
76
84
|
const paginationProps = vue.computed(() => {
|
|
77
|
-
return util
|
|
85
|
+
return util.getPaginationProps(
|
|
78
86
|
tableSize.value,
|
|
79
87
|
props2.pagination,
|
|
80
88
|
globalProps.value.pagination,
|
|
@@ -87,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
95
|
);
|
|
88
96
|
});
|
|
89
97
|
const tableEmptyProps = vue.computed(() => {
|
|
90
|
-
return util
|
|
98
|
+
return util.mergeProps(
|
|
91
99
|
props2.emptyProps,
|
|
92
100
|
globalProps.value.emptyProps
|
|
93
101
|
);
|
|
@@ -134,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
134
142
|
return tools || [];
|
|
135
143
|
});
|
|
136
144
|
const tableToolbarProps = vue.computed(() => {
|
|
137
|
-
return util
|
|
145
|
+
return util.mergeProps(
|
|
138
146
|
props2.toolbar,
|
|
139
147
|
globalProps.value.toolbar
|
|
140
148
|
);
|
|
@@ -192,7 +200,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
192
200
|
errorText.value = "";
|
|
193
201
|
const sorter = tableState.sorter;
|
|
194
202
|
if (!isFunctionSource.value) {
|
|
195
|
-
const { data, page, total } = util
|
|
203
|
+
const { data, page, total } = util.reloadData(
|
|
196
204
|
props2.datasource,
|
|
197
205
|
sorter,
|
|
198
206
|
paginationProps.value ? tablePage.value : void 0,
|
|
@@ -205,11 +213,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
205
213
|
handleDone({ data, page, total, response: props2.datasource });
|
|
206
214
|
return;
|
|
207
215
|
}
|
|
216
|
+
const tempId = common.uuid(8);
|
|
217
|
+
tableState.reloadId = tempId;
|
|
208
218
|
if (!parent) {
|
|
209
219
|
tableLoading.value = true;
|
|
210
220
|
}
|
|
211
221
|
const filter = tableState.filter;
|
|
212
|
-
const orders = util
|
|
222
|
+
const orders = util.getRequestOrders(
|
|
213
223
|
sorter,
|
|
214
224
|
props2.request,
|
|
215
225
|
globalProps.value.request
|
|
@@ -217,7 +227,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
217
227
|
props2.datasource({
|
|
218
228
|
page: tablePage.value,
|
|
219
229
|
limit: tableLimit.value,
|
|
220
|
-
pages: util
|
|
230
|
+
pages: util.getRequestPages(
|
|
221
231
|
tablePage.value,
|
|
222
232
|
tableLimit.value,
|
|
223
233
|
props2.request,
|
|
@@ -225,14 +235,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
225
235
|
),
|
|
226
236
|
where: Object.assign({}, tableState.where),
|
|
227
237
|
orders,
|
|
228
|
-
filters: util
|
|
238
|
+
filters: util.getRequestFilters(filter),
|
|
229
239
|
sorter,
|
|
230
240
|
filter,
|
|
231
241
|
parent
|
|
232
242
|
}).then((response) => {
|
|
243
|
+
if (tableState.reloadId !== tempId) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
233
246
|
const parseData = props2.parseData ?? globalProps.value.parseData;
|
|
234
247
|
const result = parseData ? parseData(response) : response;
|
|
235
|
-
const { data, total } = util
|
|
248
|
+
const { data, total } = util.getResponseResult(
|
|
236
249
|
result,
|
|
237
250
|
props2.response,
|
|
238
251
|
globalProps.value.response,
|
|
@@ -241,6 +254,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
241
254
|
);
|
|
242
255
|
requestCallback(data, total, parent, result, resolve);
|
|
243
256
|
}).catch((e) => {
|
|
257
|
+
if (tableState.reloadId !== tempId) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
244
260
|
const errorMsg = e == null ? void 0 : e.message;
|
|
245
261
|
requestCallback(
|
|
246
262
|
errorMsg == null ? errorMsg : String(errorMsg),
|
|
@@ -273,7 +289,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
273
289
|
"返回的数据格式与配置的不一致, 返回的数据:",
|
|
274
290
|
response,
|
|
275
291
|
"需要的格式:",
|
|
276
|
-
util
|
|
292
|
+
util.getResponseName(globalProps.value.response, props2.response)
|
|
277
293
|
);
|
|
278
294
|
return;
|
|
279
295
|
}
|
|
@@ -283,7 +299,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
283
299
|
}
|
|
284
300
|
resolve(data);
|
|
285
301
|
} else {
|
|
286
|
-
if (util
|
|
302
|
+
if (util.isAutoAmend(props2.pagination, globalProps.value.pagination) && !data.length && total && "*" !== total && tablePage.value && tableLimit.value) {
|
|
287
303
|
const maxPage = Math.ceil(total / tableLimit.value);
|
|
288
304
|
if (maxPage && tablePage.value > maxPage) {
|
|
289
305
|
tablePage.value = maxPage;
|
|
@@ -318,7 +334,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
318
334
|
}
|
|
319
335
|
if (props2.selections != null && props2.selections.length) {
|
|
320
336
|
methods.setSelectedRowKeys(
|
|
321
|
-
util.getRowKeys(props2.selections, tableRowKey.value)
|
|
337
|
+
util$1.getRowKeys(props2.selections, tableRowKey.value)
|
|
322
338
|
);
|
|
323
339
|
}
|
|
324
340
|
});
|
|
@@ -376,7 +392,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
376
392
|
events.onFilterChange(filter);
|
|
377
393
|
};
|
|
378
394
|
const handleHeaderDragend = (newWidth, oldWidth, column, event) => {
|
|
379
|
-
util
|
|
395
|
+
util.cacheColWidth(newWidth, column, props2.cacheKey);
|
|
380
396
|
events.onHeaderDragend(newWidth, oldWidth, column, event);
|
|
381
397
|
};
|
|
382
398
|
const handleCurrentChange = (currentRow, oldCurrentRow) => {
|
|
@@ -393,7 +409,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
393
409
|
}
|
|
394
410
|
};
|
|
395
411
|
const updateSelections = (selection) => {
|
|
396
|
-
if (util.arrayIsChanged(selection, props2.selections)) {
|
|
412
|
+
if (util$1.arrayIsChanged(selection, props2.selections)) {
|
|
397
413
|
emit("update:selections", selection);
|
|
398
414
|
}
|
|
399
415
|
};
|
|
@@ -405,9 +421,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
405
421
|
const reloadTable = () => {
|
|
406
422
|
methods.doLayout();
|
|
407
423
|
};
|
|
408
|
-
const getTableRef = () => {
|
|
409
|
-
return tableViewRef.value;
|
|
410
|
-
};
|
|
411
424
|
const getData = () => {
|
|
412
425
|
return tableData.value;
|
|
413
426
|
};
|
|
@@ -420,7 +433,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
420
433
|
return;
|
|
421
434
|
}
|
|
422
435
|
const rowKey = tableRowKey.value;
|
|
423
|
-
const data = util
|
|
436
|
+
const data = util.sortData(props2.datasource, tableState.sorter);
|
|
424
437
|
const index = data.findIndex((d) => common.getValue(d, rowKey) === key);
|
|
425
438
|
const page = Math.floor(index / tableLimit.value) + 1;
|
|
426
439
|
if (tablePage.value !== page) {
|
|
@@ -429,7 +442,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
429
442
|
};
|
|
430
443
|
const fetch = (callback) => {
|
|
431
444
|
const { sorter, filter } = tableState;
|
|
432
|
-
const orders = util
|
|
445
|
+
const orders = util.getRequestOrders(
|
|
433
446
|
sorter,
|
|
434
447
|
props2.request,
|
|
435
448
|
globalProps.value.request
|
|
@@ -437,7 +450,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
437
450
|
callback({
|
|
438
451
|
page: tablePage.value,
|
|
439
452
|
limit: tableLimit.value,
|
|
440
|
-
pages: util
|
|
453
|
+
pages: util.getRequestPages(
|
|
441
454
|
tablePage.value,
|
|
442
455
|
tableLimit.value,
|
|
443
456
|
props2.request,
|
|
@@ -445,36 +458,36 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
445
458
|
),
|
|
446
459
|
where: Object.assign({}, tableState.where),
|
|
447
460
|
orders,
|
|
448
|
-
filters: util
|
|
461
|
+
filters: util.getRequestFilters(filter),
|
|
449
462
|
sorter,
|
|
450
463
|
filter
|
|
451
464
|
});
|
|
452
465
|
};
|
|
453
466
|
const openPrintModal = () => {
|
|
454
|
-
if (
|
|
455
|
-
|
|
467
|
+
if (toolPrintRef.value) {
|
|
468
|
+
toolPrintRef.value.openModal();
|
|
456
469
|
}
|
|
457
470
|
};
|
|
458
471
|
const printData = (params) => {
|
|
459
|
-
if (
|
|
460
|
-
|
|
472
|
+
if (toolPrintRef.value) {
|
|
473
|
+
toolPrintRef.value.printData(params);
|
|
461
474
|
}
|
|
462
475
|
};
|
|
463
476
|
const openExportModal = () => {
|
|
464
|
-
if (
|
|
465
|
-
|
|
477
|
+
if (toolExportRef.value) {
|
|
478
|
+
toolExportRef.value.openModal();
|
|
466
479
|
}
|
|
467
480
|
};
|
|
468
481
|
const exportData = (params) => {
|
|
469
|
-
if (
|
|
470
|
-
|
|
482
|
+
if (toolExportRef.value) {
|
|
483
|
+
toolExportRef.value.exportData(params);
|
|
471
484
|
}
|
|
472
485
|
};
|
|
473
486
|
vue.watch(
|
|
474
487
|
() => props2.columns,
|
|
475
488
|
(columns) => {
|
|
476
489
|
if (columns) {
|
|
477
|
-
tableCols.value = util
|
|
490
|
+
tableCols.value = util.getInitCacheColumns(
|
|
478
491
|
columns,
|
|
479
492
|
props2.cacheKey,
|
|
480
493
|
props2.columnSortable
|
|
@@ -501,7 +514,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
501
514
|
vue.watch(
|
|
502
515
|
() => props2.size,
|
|
503
516
|
(size) => {
|
|
504
|
-
tableSize.value = util
|
|
517
|
+
tableSize.value = util.getTableSize(void 0, size, globalProps.value.size);
|
|
505
518
|
}
|
|
506
519
|
);
|
|
507
520
|
vue.watch(
|
|
@@ -513,30 +526,38 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
513
526
|
vue.watch(
|
|
514
527
|
() => props2.selections,
|
|
515
528
|
(selections) => {
|
|
516
|
-
methods.setSelectedRowKeys(util.getRowKeys(selections, tableRowKey.value));
|
|
529
|
+
methods.setSelectedRowKeys(util$1.getRowKeys(selections, tableRowKey.value));
|
|
517
530
|
}
|
|
518
531
|
);
|
|
519
532
|
vue.watch(
|
|
520
533
|
() => props2.rowKey,
|
|
521
534
|
() => {
|
|
522
|
-
tableRowKey.value = util
|
|
535
|
+
tableRowKey.value = util.getRowKey(props2.rowKey);
|
|
523
536
|
}
|
|
524
537
|
);
|
|
525
538
|
vue.watch(
|
|
526
539
|
globalProps,
|
|
527
540
|
(config) => {
|
|
528
|
-
tableSize.value = util
|
|
541
|
+
tableSize.value = util.getTableSize(props2.cacheKey, props2.size, config.size);
|
|
529
542
|
},
|
|
530
543
|
{ deep: true }
|
|
531
544
|
);
|
|
532
545
|
vue.onMounted(() => {
|
|
546
|
+
var _a;
|
|
547
|
+
if (props2.current != null) {
|
|
548
|
+
methods.setCurrentRowKey(common.getValue(props2.current, tableRowKey.value));
|
|
549
|
+
}
|
|
550
|
+
if ((_a = props2.selections) == null ? void 0 : _a.length) {
|
|
551
|
+
methods.setSelectedRowKeys(
|
|
552
|
+
util$1.getRowKeys(props2.selections, tableRowKey.value)
|
|
553
|
+
);
|
|
554
|
+
}
|
|
533
555
|
if (props2.loadOnCreated) {
|
|
534
556
|
reload();
|
|
535
557
|
}
|
|
536
558
|
});
|
|
537
559
|
__expose({
|
|
538
560
|
...methods,
|
|
539
|
-
tableToolsRef,
|
|
540
561
|
tableViewRef,
|
|
541
562
|
tableData,
|
|
542
563
|
tableLoading,
|
|
@@ -570,8 +591,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
570
591
|
vue.renderSlot(_ctx.$slots, "tools"),
|
|
571
592
|
toolNames.value && toolNames.value.length ? (vue.openBlock(), vue.createBlock(TableTools, {
|
|
572
593
|
key: 0,
|
|
573
|
-
ref_key: "tableToolsRef",
|
|
574
|
-
ref: tableToolsRef,
|
|
575
594
|
tools: toolNames.value,
|
|
576
595
|
size: tableSize.value,
|
|
577
596
|
columns: _ctx.columns,
|
|
@@ -579,28 +598,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
579
598
|
columnFixed: _ctx.columnFixed,
|
|
580
599
|
maximized: tableMaximized.value,
|
|
581
600
|
cacheKey: _ctx.cacheKey,
|
|
582
|
-
|
|
583
|
-
selections: _ctx.selections,
|
|
584
|
-
pageData: tableData.value,
|
|
585
|
-
spanMethod: _ctx.spanMethod,
|
|
586
|
-
tableHeader: _ctx.showHeader,
|
|
587
|
-
showSummary: _ctx.showSummary,
|
|
588
|
-
sumText: _ctx.sumText,
|
|
589
|
-
summaryMethod: _ctx.summaryMethod,
|
|
590
|
-
tableStyle: _ctx.tableStyle,
|
|
591
|
-
cellStyle: _ctx.cellStyle,
|
|
592
|
-
cellClassName: _ctx.cellClassName,
|
|
593
|
-
headerCellStyle: _ctx.headerCellStyle,
|
|
594
|
-
headerCellClassName: _ctx.headerCellClassName,
|
|
595
|
-
pageIndex: tableIndex.value,
|
|
596
|
-
treeProps: _ctx.treeProps,
|
|
597
|
-
fetch,
|
|
598
|
-
exportConfig: toolExportConfig.value,
|
|
599
|
-
printConfig: toolPrintConfig.value,
|
|
601
|
+
lang: vue.unref(lang),
|
|
600
602
|
onReload: handleRefresh,
|
|
601
603
|
"onUpdate:size": handleSizeChange,
|
|
602
604
|
"onUpdate:columns": handleColumnsChange,
|
|
603
|
-
"onUpdate:maximized": handleMaximizedChange
|
|
605
|
+
"onUpdate:maximized": handleMaximizedChange,
|
|
606
|
+
onOpenExportModal: openExportModal,
|
|
607
|
+
onOpenPrintModal: openPrintModal
|
|
604
608
|
}, vue.createSlots({ _: 2 }, [
|
|
605
609
|
vue.renderList(Object.keys(_ctx.$slots).filter(
|
|
606
610
|
(k) => !toolsSlotExcludes.includes(k)
|
|
@@ -612,7 +616,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
612
616
|
])
|
|
613
617
|
};
|
|
614
618
|
})
|
|
615
|
-
]), 1032, ["tools", "size", "columns", "columnSortable", "columnFixed", "maximized", "cacheKey", "
|
|
619
|
+
]), 1032, ["tools", "size", "columns", "columnSortable", "columnFixed", "maximized", "cacheKey", "lang"])) : vue.createCommentVNode("", true)
|
|
616
620
|
]),
|
|
617
621
|
default: vue.withCtx(() => [
|
|
618
622
|
vue.renderSlot(_ctx.$slots, "toolbar")
|
|
@@ -671,7 +675,74 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
671
675
|
})
|
|
672
676
|
]), 1040)) : vue.createCommentVNode("", true)
|
|
673
677
|
], 4)) : vue.createCommentVNode("", true),
|
|
674
|
-
vue.renderSlot(_ctx.$slots, "bottomExtra")
|
|
678
|
+
vue.renderSlot(_ctx.$slots, "bottomExtra"),
|
|
679
|
+
vue.createVNode(ToolExport, {
|
|
680
|
+
ref_key: "toolExportRef",
|
|
681
|
+
ref: toolExportRef,
|
|
682
|
+
locale: vue.unref(lang),
|
|
683
|
+
cacheKey: _ctx.cacheKey,
|
|
684
|
+
modalProps: toolExportConfig.value.modalProps,
|
|
685
|
+
columns: toolExportConfig.value.columns || _ctx.columns,
|
|
686
|
+
selections: _ctx.selections,
|
|
687
|
+
pageData: tableData.value,
|
|
688
|
+
datasource: toolExportConfig.value.datasource,
|
|
689
|
+
spanMethod: _ctx.spanMethod,
|
|
690
|
+
tableHeader: toolExportConfig.value.showHeader ?? _ctx.showHeader,
|
|
691
|
+
showSummary: _ctx.showSummary,
|
|
692
|
+
sumText: _ctx.sumText,
|
|
693
|
+
summaryMethod: _ctx.summaryMethod,
|
|
694
|
+
pageIndex: tableIndex.value,
|
|
695
|
+
treeProps: _ctx.treeProps,
|
|
696
|
+
fetch,
|
|
697
|
+
defaultFileName: toolExportConfig.value.fileName,
|
|
698
|
+
defaultDataType: toolExportConfig.value.dataType,
|
|
699
|
+
defaultShowFooter: toolExportConfig.value.showFooter,
|
|
700
|
+
defaultShowTreeIndex: toolExportConfig.value.showTreeIndex,
|
|
701
|
+
beforeExport: toolExportConfig.value.beforeExport,
|
|
702
|
+
exportPlugin: toolExportConfig.value.exportPlugin
|
|
703
|
+
}, null, 8, ["locale", "cacheKey", "modalProps", "columns", "selections", "pageData", "datasource", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "pageIndex", "treeProps", "defaultFileName", "defaultDataType", "defaultShowFooter", "defaultShowTreeIndex", "beforeExport", "exportPlugin"]),
|
|
704
|
+
vue.createVNode(ToolPrint, {
|
|
705
|
+
ref_key: "toolPrintRef",
|
|
706
|
+
ref: toolPrintRef,
|
|
707
|
+
locale: vue.unref(lang),
|
|
708
|
+
cacheKey: _ctx.cacheKey,
|
|
709
|
+
modalProps: toolPrintConfig.value.modalProps,
|
|
710
|
+
printerProps: toolPrintConfig.value.printerProps,
|
|
711
|
+
tableProps: toolPrintConfig.value.tableProps,
|
|
712
|
+
columns: toolPrintConfig.value.columns || _ctx.columns,
|
|
713
|
+
selections: _ctx.selections,
|
|
714
|
+
pageData: tableData.value,
|
|
715
|
+
datasource: toolPrintConfig.value.datasource,
|
|
716
|
+
spanMethod: _ctx.spanMethod,
|
|
717
|
+
tableHeader: toolPrintConfig.value.showHeader ?? _ctx.showHeader,
|
|
718
|
+
showSummary: _ctx.showSummary,
|
|
719
|
+
sumText: _ctx.sumText,
|
|
720
|
+
summaryMethod: _ctx.summaryMethod,
|
|
721
|
+
tableStyle: _ctx.tableStyle,
|
|
722
|
+
cellStyle: _ctx.cellStyle,
|
|
723
|
+
cellClassName: _ctx.cellClassName,
|
|
724
|
+
headerCellStyle: _ctx.headerCellStyle,
|
|
725
|
+
headerCellClassName: _ctx.headerCellClassName,
|
|
726
|
+
pageIndex: tableIndex.value,
|
|
727
|
+
treeProps: _ctx.treeProps,
|
|
728
|
+
fetch,
|
|
729
|
+
defaultDataType: toolPrintConfig.value.dataType,
|
|
730
|
+
defaultShowFooter: toolPrintConfig.value.showFooter,
|
|
731
|
+
defaultShowTreeIndex: toolPrintConfig.value.showTreeIndex,
|
|
732
|
+
beforePrint: toolPrintConfig.value.beforePrint,
|
|
733
|
+
printPlugin: toolPrintConfig.value.printPlugin
|
|
734
|
+
}, vue.createSlots({ _: 2 }, [
|
|
735
|
+
vue.renderList(Object.keys(_ctx.$slots).filter(
|
|
736
|
+
(k) => !toolsSlotExcludes.includes(k)
|
|
737
|
+
), (name) => {
|
|
738
|
+
return {
|
|
739
|
+
name,
|
|
740
|
+
fn: vue.withCtx((slotProps) => [
|
|
741
|
+
vue.renderSlot(_ctx.$slots, name, vue.normalizeProps(vue.guardReactiveProps(slotProps || {})))
|
|
742
|
+
])
|
|
743
|
+
};
|
|
744
|
+
})
|
|
745
|
+
]), 1032, ["locale", "cacheKey", "modalProps", "printerProps", "tableProps", "columns", "selections", "pageData", "datasource", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "tableStyle", "cellStyle", "cellClassName", "headerCellStyle", "headerCellClassName", "pageIndex", "treeProps", "defaultDataType", "defaultShowFooter", "defaultShowTreeIndex", "beforePrint", "printPlugin"])
|
|
675
746
|
]),
|
|
676
747
|
_: 3
|
|
677
748
|
}, 16, ["loading", "class", "style"]);
|