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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import ExcelJS from "exceljs";
|
|
2
|
+
import { download } from "../utils/common";
|
|
3
|
+
function getExportWorkbook(params) {
|
|
4
|
+
const { headerData, bodyData, footerData, bodyCols } = params;
|
|
5
|
+
const workbook = new ExcelJS.Workbook();
|
|
6
|
+
const sheet = workbook.addWorksheet("Sheet1");
|
|
7
|
+
const sheetRows = [];
|
|
8
|
+
const sheetStyles = [];
|
|
9
|
+
const sheetMerges = [];
|
|
10
|
+
const sheetRowHeight = [];
|
|
11
|
+
[...headerData, ...bodyData, ...footerData].forEach((item, index) => {
|
|
12
|
+
const sheetCols = [];
|
|
13
|
+
const rowStyles = [];
|
|
14
|
+
item.forEach((d, colIndex) => {
|
|
15
|
+
var _a;
|
|
16
|
+
if (!d.isTreeCell || !d.indent) {
|
|
17
|
+
sheetCols.push(d.text ?? "");
|
|
18
|
+
} else {
|
|
19
|
+
const gap = Array.from({ length: d.indent }).fill(" ").join("");
|
|
20
|
+
sheetCols.push(gap + (d.text ?? ""));
|
|
21
|
+
}
|
|
22
|
+
rowStyles.push({
|
|
23
|
+
font: { size: 12, bold: index < headerData.length },
|
|
24
|
+
alignment: {
|
|
25
|
+
vertical: d.isTreeIndex && d.rowspan !== 1 ? "top" : "middle",
|
|
26
|
+
horizontal: d.isExpandCell ? "left" : ((_a = d.column) == null ? void 0 : _a.align) || "left",
|
|
27
|
+
wrapText: d.isExpandCell ? true : false,
|
|
28
|
+
indent: d.isExpandCell ? 1 : 0
|
|
29
|
+
},
|
|
30
|
+
border: {
|
|
31
|
+
top: { style: "thin" },
|
|
32
|
+
left: d.hideLeftBorder ? {} : { style: "thin" },
|
|
33
|
+
bottom: { style: "thin" },
|
|
34
|
+
right: d.hideRightBorder ? {} : { style: "thin" }
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (d.rowspan && d.rowspan > 1 || d.colspan && d.colspan > 1) {
|
|
38
|
+
sheetMerges.push([
|
|
39
|
+
index + 1,
|
|
40
|
+
colIndex + 1,
|
|
41
|
+
index + (d.rowspan || 1),
|
|
42
|
+
colIndex + (d.colspan || 1)
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
sheetRows.push(sheetCols);
|
|
47
|
+
sheetStyles.push(rowStyles);
|
|
48
|
+
const expandCell = item.find((d) => d.isExpandCell && d.colspan);
|
|
49
|
+
const lines = String((expandCell == null ? void 0 : expandCell.text) ?? "").split("\n").length || 1;
|
|
50
|
+
sheetRowHeight.push(lines * 20);
|
|
51
|
+
});
|
|
52
|
+
sheet.addRows(sheetRows).forEach((row, index) => {
|
|
53
|
+
row.eachCell({ includeEmpty: true }, (cell, colIndex) => {
|
|
54
|
+
Object.assign(cell, sheetStyles[index][colIndex - 1]);
|
|
55
|
+
});
|
|
56
|
+
row.height = sheetRowHeight[index];
|
|
57
|
+
});
|
|
58
|
+
sheetMerges.forEach((merges) => {
|
|
59
|
+
sheet.mergeCells(merges);
|
|
60
|
+
});
|
|
61
|
+
bodyCols.forEach((col, colIndex) => {
|
|
62
|
+
const w = col.width ?? col.minWidth;
|
|
63
|
+
sheet.getColumn(colIndex + 1).width = w == null ? void 0 : w / 8;
|
|
64
|
+
});
|
|
65
|
+
return workbook;
|
|
66
|
+
}
|
|
67
|
+
const exceljsPlugin = function(params) {
|
|
68
|
+
return new Promise((resolve, reject) => {
|
|
69
|
+
getExportWorkbook(params).xlsx.writeBuffer().then((data) => {
|
|
70
|
+
download(data, `${params.fileName}.xlsx`);
|
|
71
|
+
resolve();
|
|
72
|
+
}).catch((e) => {
|
|
73
|
+
console.error(e);
|
|
74
|
+
reject(e);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export {
|
|
79
|
+
exceljsPlugin,
|
|
80
|
+
getExportWorkbook
|
|
81
|
+
};
|
|
@@ -2,16 +2,16 @@ import { Ref } from 'vue';
|
|
|
2
2
|
import { EleDataTableProps, EleToolbarProps } from '../ele-app/plus';
|
|
3
3
|
import { DataItem, Column, Columns, Sorter, Filter, RowKey } from '../ele-data-table/types';
|
|
4
4
|
import { ReloadFunction, DoneParams, TableTool, FetchFunction, TableViewInstance, ExportConfig, PrintConfig, TableExportParams } from './types';
|
|
5
|
-
import { TableToolsInstance } from './props';
|
|
6
5
|
|
|
7
|
-
declare function __VLS_template(): Partial<Record<string, (_: {
|
|
8
|
-
pageIndex: number | undefined;
|
|
9
|
-
fetch: FetchFunction | undefined;
|
|
10
|
-
}) => any>> & Partial<Record<string, (_: {
|
|
6
|
+
declare function __VLS_template(): Partial<Record<string, (_: {}) => any>> & Partial<Record<string, (_: {
|
|
11
7
|
row: DataItem | undefined;
|
|
12
8
|
column: Column;
|
|
13
9
|
$index: number | undefined;
|
|
14
|
-
}) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & {
|
|
10
|
+
}) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: {
|
|
11
|
+
row: DataItem | undefined;
|
|
12
|
+
column: Column;
|
|
13
|
+
$index: number;
|
|
14
|
+
}) => any>> & {
|
|
15
15
|
topExtra?(_: {}): any;
|
|
16
16
|
toolbar?(_: {}): any;
|
|
17
17
|
tools?(_: {}): any;
|
|
@@ -184,7 +184,6 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
184
184
|
reserveCurrent: BooleanConstructor;
|
|
185
185
|
selectedRowKeys: import('vue').PropType<import('../ele-data-table/types').DataKey[]>;
|
|
186
186
|
}>, {
|
|
187
|
-
tableToolsRef: Ref<TableToolsInstance, TableToolsInstance>;
|
|
188
187
|
tableViewRef: Ref<TableViewInstance, TableViewInstance>;
|
|
189
188
|
tableData: Ref<{
|
|
190
189
|
[x: string]: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, shallowRef, computed, watch, onMounted, createBlock, openBlock, mergeProps as mergeProps$1, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, normalizeProps, createSlots, renderList, guardReactiveProps, normalizeStyle, nextTick } from "vue";
|
|
2
|
-
import { pick, getValue } from "../utils/common";
|
|
3
|
-
import { useGlobalProps } from "../ele-config-provider/receiver";
|
|
1
|
+
import { defineComponent, ref, shallowRef, computed, watch, onMounted, createBlock, openBlock, mergeProps as mergeProps$1, unref, withCtx, renderSlot, createCommentVNode, createElementBlock, createVNode, normalizeProps, createSlots, renderList, guardReactiveProps, normalizeStyle, nextTick } from "vue";
|
|
2
|
+
import { pick, getValue, uuid } from "../utils/common";
|
|
3
|
+
import { useGlobalProps, useLocale } from "../ele-config-provider/receiver";
|
|
4
4
|
import EleLoading from "../ele-loading/index";
|
|
5
5
|
import ElePagination from "../ele-pagination/index";
|
|
6
6
|
import { dataTablePropKeys } from "../ele-data-table/props";
|
|
@@ -9,6 +9,8 @@ import EleDataTable from "../ele-data-table/index";
|
|
|
9
9
|
import EleVirtualTable from "../ele-virtual-table/index";
|
|
10
10
|
import EleToolbar from "../ele-toolbar/index";
|
|
11
11
|
import TableTools from "./components/table-tools";
|
|
12
|
+
import ToolExport from "./components/tool-export";
|
|
13
|
+
import ToolPrint from "./components/tool-print";
|
|
12
14
|
import { getDefaultFilter, getTablePage, getTableLimit, getTableSize, getRowKey, getPaginationProps, mergeProps, cacheColWidth, getInitCacheColumns, reloadData, getRequestOrders, getRequestFilters, getRequestPages, getResponseResult, getResponseName, isAutoAmend, sortData } from "./util";
|
|
13
15
|
import { proTableEmits, proTableProps } from "./props";
|
|
14
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -30,9 +32,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
32
|
const pageSlotExcludes = [...toolsSlotExcludes, "printTop", "printBottom"];
|
|
31
33
|
const props = __props;
|
|
32
34
|
const emit = __emit;
|
|
35
|
+
const tableState = {
|
|
36
|
+
sorter: props.defaultSort ?? {},
|
|
37
|
+
filter: getDefaultFilter(props.columns),
|
|
38
|
+
where: props.where ?? {},
|
|
39
|
+
reloadId: null
|
|
40
|
+
};
|
|
41
|
+
const globalProps = useGlobalProps("table");
|
|
42
|
+
const { lang } = useLocale("table", props);
|
|
43
|
+
const tableViewRef = ref(null);
|
|
44
|
+
const getTableRef = () => {
|
|
45
|
+
return tableViewRef.value;
|
|
46
|
+
};
|
|
33
47
|
const events = useEmits(emit);
|
|
34
48
|
const methods = useMethods(() => getTableRef());
|
|
35
|
-
const globalProps = useGlobalProps("table");
|
|
36
49
|
const virtualTableEvents = {
|
|
37
50
|
onEndEeached: (params) => {
|
|
38
51
|
emit("endEeached", params);
|
|
@@ -44,13 +57,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
57
|
emit("rowsRendered", params);
|
|
45
58
|
}
|
|
46
59
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
filter: getDefaultFilter(props.columns),
|
|
50
|
-
where: props.where ?? {}
|
|
51
|
-
};
|
|
52
|
-
const tableToolsRef = ref(null);
|
|
53
|
-
const tableViewRef = ref(null);
|
|
60
|
+
const toolExportRef = ref(null);
|
|
61
|
+
const toolPrintRef = ref(null);
|
|
54
62
|
const tableData = ref([]);
|
|
55
63
|
const tablePage = ref(
|
|
56
64
|
getTablePage(props.pagination, globalProps.value.pagination)
|
|
@@ -204,6 +212,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
204
212
|
handleDone({ data, page, total, response: props.datasource });
|
|
205
213
|
return;
|
|
206
214
|
}
|
|
215
|
+
const tempId = uuid(8);
|
|
216
|
+
tableState.reloadId = tempId;
|
|
207
217
|
if (!parent) {
|
|
208
218
|
tableLoading.value = true;
|
|
209
219
|
}
|
|
@@ -229,6 +239,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
229
239
|
filter,
|
|
230
240
|
parent
|
|
231
241
|
}).then((response) => {
|
|
242
|
+
if (tableState.reloadId !== tempId) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
232
245
|
const parseData = props.parseData ?? globalProps.value.parseData;
|
|
233
246
|
const result = parseData ? parseData(response) : response;
|
|
234
247
|
const { data, total } = getResponseResult(
|
|
@@ -240,6 +253,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
253
|
);
|
|
241
254
|
requestCallback(data, total, parent, result, resolve);
|
|
242
255
|
}).catch((e) => {
|
|
256
|
+
if (tableState.reloadId !== tempId) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
243
259
|
const errorMsg = e == null ? void 0 : e.message;
|
|
244
260
|
requestCallback(
|
|
245
261
|
errorMsg == null ? errorMsg : String(errorMsg),
|
|
@@ -404,9 +420,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
404
420
|
const reloadTable = () => {
|
|
405
421
|
methods.doLayout();
|
|
406
422
|
};
|
|
407
|
-
const getTableRef = () => {
|
|
408
|
-
return tableViewRef.value;
|
|
409
|
-
};
|
|
410
423
|
const getData = () => {
|
|
411
424
|
return tableData.value;
|
|
412
425
|
};
|
|
@@ -450,23 +463,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
450
463
|
});
|
|
451
464
|
};
|
|
452
465
|
const openPrintModal = () => {
|
|
453
|
-
if (
|
|
454
|
-
|
|
466
|
+
if (toolPrintRef.value) {
|
|
467
|
+
toolPrintRef.value.openModal();
|
|
455
468
|
}
|
|
456
469
|
};
|
|
457
470
|
const printData = (params) => {
|
|
458
|
-
if (
|
|
459
|
-
|
|
471
|
+
if (toolPrintRef.value) {
|
|
472
|
+
toolPrintRef.value.printData(params);
|
|
460
473
|
}
|
|
461
474
|
};
|
|
462
475
|
const openExportModal = () => {
|
|
463
|
-
if (
|
|
464
|
-
|
|
476
|
+
if (toolExportRef.value) {
|
|
477
|
+
toolExportRef.value.openModal();
|
|
465
478
|
}
|
|
466
479
|
};
|
|
467
480
|
const exportData = (params) => {
|
|
468
|
-
if (
|
|
469
|
-
|
|
481
|
+
if (toolExportRef.value) {
|
|
482
|
+
toolExportRef.value.exportData(params);
|
|
470
483
|
}
|
|
471
484
|
};
|
|
472
485
|
watch(
|
|
@@ -529,13 +542,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
529
542
|
{ deep: true }
|
|
530
543
|
);
|
|
531
544
|
onMounted(() => {
|
|
545
|
+
var _a;
|
|
546
|
+
if (props.current != null) {
|
|
547
|
+
methods.setCurrentRowKey(getValue(props.current, tableRowKey.value));
|
|
548
|
+
}
|
|
549
|
+
if ((_a = props.selections) == null ? void 0 : _a.length) {
|
|
550
|
+
methods.setSelectedRowKeys(
|
|
551
|
+
getRowKeys(props.selections, tableRowKey.value)
|
|
552
|
+
);
|
|
553
|
+
}
|
|
532
554
|
if (props.loadOnCreated) {
|
|
533
555
|
reload();
|
|
534
556
|
}
|
|
535
557
|
});
|
|
536
558
|
__expose({
|
|
537
559
|
...methods,
|
|
538
|
-
tableToolsRef,
|
|
539
560
|
tableViewRef,
|
|
540
561
|
tableData,
|
|
541
562
|
tableLoading,
|
|
@@ -569,8 +590,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
569
590
|
renderSlot(_ctx.$slots, "tools"),
|
|
570
591
|
toolNames.value && toolNames.value.length ? (openBlock(), createBlock(TableTools, {
|
|
571
592
|
key: 0,
|
|
572
|
-
ref_key: "tableToolsRef",
|
|
573
|
-
ref: tableToolsRef,
|
|
574
593
|
tools: toolNames.value,
|
|
575
594
|
size: tableSize.value,
|
|
576
595
|
columns: _ctx.columns,
|
|
@@ -578,28 +597,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
578
597
|
columnFixed: _ctx.columnFixed,
|
|
579
598
|
maximized: tableMaximized.value,
|
|
580
599
|
cacheKey: _ctx.cacheKey,
|
|
581
|
-
|
|
582
|
-
selections: _ctx.selections,
|
|
583
|
-
pageData: tableData.value,
|
|
584
|
-
spanMethod: _ctx.spanMethod,
|
|
585
|
-
tableHeader: _ctx.showHeader,
|
|
586
|
-
showSummary: _ctx.showSummary,
|
|
587
|
-
sumText: _ctx.sumText,
|
|
588
|
-
summaryMethod: _ctx.summaryMethod,
|
|
589
|
-
tableStyle: _ctx.tableStyle,
|
|
590
|
-
cellStyle: _ctx.cellStyle,
|
|
591
|
-
cellClassName: _ctx.cellClassName,
|
|
592
|
-
headerCellStyle: _ctx.headerCellStyle,
|
|
593
|
-
headerCellClassName: _ctx.headerCellClassName,
|
|
594
|
-
pageIndex: tableIndex.value,
|
|
595
|
-
treeProps: _ctx.treeProps,
|
|
596
|
-
fetch,
|
|
597
|
-
exportConfig: toolExportConfig.value,
|
|
598
|
-
printConfig: toolPrintConfig.value,
|
|
600
|
+
lang: unref(lang),
|
|
599
601
|
onReload: handleRefresh,
|
|
600
602
|
"onUpdate:size": handleSizeChange,
|
|
601
603
|
"onUpdate:columns": handleColumnsChange,
|
|
602
|
-
"onUpdate:maximized": handleMaximizedChange
|
|
604
|
+
"onUpdate:maximized": handleMaximizedChange,
|
|
605
|
+
onOpenExportModal: openExportModal,
|
|
606
|
+
onOpenPrintModal: openPrintModal
|
|
603
607
|
}, createSlots({ _: 2 }, [
|
|
604
608
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
605
609
|
(k) => !toolsSlotExcludes.includes(k)
|
|
@@ -611,7 +615,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
611
615
|
])
|
|
612
616
|
};
|
|
613
617
|
})
|
|
614
|
-
]), 1032, ["tools", "size", "columns", "columnSortable", "columnFixed", "maximized", "cacheKey", "
|
|
618
|
+
]), 1032, ["tools", "size", "columns", "columnSortable", "columnFixed", "maximized", "cacheKey", "lang"])) : createCommentVNode("", true)
|
|
615
619
|
]),
|
|
616
620
|
default: withCtx(() => [
|
|
617
621
|
renderSlot(_ctx.$slots, "toolbar")
|
|
@@ -670,7 +674,74 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
670
674
|
})
|
|
671
675
|
]), 1040)) : createCommentVNode("", true)
|
|
672
676
|
], 4)) : createCommentVNode("", true),
|
|
673
|
-
renderSlot(_ctx.$slots, "bottomExtra")
|
|
677
|
+
renderSlot(_ctx.$slots, "bottomExtra"),
|
|
678
|
+
createVNode(ToolExport, {
|
|
679
|
+
ref_key: "toolExportRef",
|
|
680
|
+
ref: toolExportRef,
|
|
681
|
+
locale: unref(lang),
|
|
682
|
+
cacheKey: _ctx.cacheKey,
|
|
683
|
+
modalProps: toolExportConfig.value.modalProps,
|
|
684
|
+
columns: toolExportConfig.value.columns || _ctx.columns,
|
|
685
|
+
selections: _ctx.selections,
|
|
686
|
+
pageData: tableData.value,
|
|
687
|
+
datasource: toolExportConfig.value.datasource,
|
|
688
|
+
spanMethod: _ctx.spanMethod,
|
|
689
|
+
tableHeader: toolExportConfig.value.showHeader ?? _ctx.showHeader,
|
|
690
|
+
showSummary: _ctx.showSummary,
|
|
691
|
+
sumText: _ctx.sumText,
|
|
692
|
+
summaryMethod: _ctx.summaryMethod,
|
|
693
|
+
pageIndex: tableIndex.value,
|
|
694
|
+
treeProps: _ctx.treeProps,
|
|
695
|
+
fetch,
|
|
696
|
+
defaultFileName: toolExportConfig.value.fileName,
|
|
697
|
+
defaultDataType: toolExportConfig.value.dataType,
|
|
698
|
+
defaultShowFooter: toolExportConfig.value.showFooter,
|
|
699
|
+
defaultShowTreeIndex: toolExportConfig.value.showTreeIndex,
|
|
700
|
+
beforeExport: toolExportConfig.value.beforeExport,
|
|
701
|
+
exportPlugin: toolExportConfig.value.exportPlugin
|
|
702
|
+
}, null, 8, ["locale", "cacheKey", "modalProps", "columns", "selections", "pageData", "datasource", "spanMethod", "tableHeader", "showSummary", "sumText", "summaryMethod", "pageIndex", "treeProps", "defaultFileName", "defaultDataType", "defaultShowFooter", "defaultShowTreeIndex", "beforeExport", "exportPlugin"]),
|
|
703
|
+
createVNode(ToolPrint, {
|
|
704
|
+
ref_key: "toolPrintRef",
|
|
705
|
+
ref: toolPrintRef,
|
|
706
|
+
locale: unref(lang),
|
|
707
|
+
cacheKey: _ctx.cacheKey,
|
|
708
|
+
modalProps: toolPrintConfig.value.modalProps,
|
|
709
|
+
printerProps: toolPrintConfig.value.printerProps,
|
|
710
|
+
tableProps: toolPrintConfig.value.tableProps,
|
|
711
|
+
columns: toolPrintConfig.value.columns || _ctx.columns,
|
|
712
|
+
selections: _ctx.selections,
|
|
713
|
+
pageData: tableData.value,
|
|
714
|
+
datasource: toolPrintConfig.value.datasource,
|
|
715
|
+
spanMethod: _ctx.spanMethod,
|
|
716
|
+
tableHeader: toolPrintConfig.value.showHeader ?? _ctx.showHeader,
|
|
717
|
+
showSummary: _ctx.showSummary,
|
|
718
|
+
sumText: _ctx.sumText,
|
|
719
|
+
summaryMethod: _ctx.summaryMethod,
|
|
720
|
+
tableStyle: _ctx.tableStyle,
|
|
721
|
+
cellStyle: _ctx.cellStyle,
|
|
722
|
+
cellClassName: _ctx.cellClassName,
|
|
723
|
+
headerCellStyle: _ctx.headerCellStyle,
|
|
724
|
+
headerCellClassName: _ctx.headerCellClassName,
|
|
725
|
+
pageIndex: tableIndex.value,
|
|
726
|
+
treeProps: _ctx.treeProps,
|
|
727
|
+
fetch,
|
|
728
|
+
defaultDataType: toolPrintConfig.value.dataType,
|
|
729
|
+
defaultShowFooter: toolPrintConfig.value.showFooter,
|
|
730
|
+
defaultShowTreeIndex: toolPrintConfig.value.showTreeIndex,
|
|
731
|
+
beforePrint: toolPrintConfig.value.beforePrint,
|
|
732
|
+
printPlugin: toolPrintConfig.value.printPlugin
|
|
733
|
+
}, createSlots({ _: 2 }, [
|
|
734
|
+
renderList(Object.keys(_ctx.$slots).filter(
|
|
735
|
+
(k) => !toolsSlotExcludes.includes(k)
|
|
736
|
+
), (name) => {
|
|
737
|
+
return {
|
|
738
|
+
name,
|
|
739
|
+
fn: withCtx((slotProps) => [
|
|
740
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
741
|
+
])
|
|
742
|
+
};
|
|
743
|
+
})
|
|
744
|
+
]), 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"])
|
|
674
745
|
]),
|
|
675
746
|
_: 3
|
|
676
747
|
}, 16, ["loading", "class", "style"]);
|
|
@@ -280,6 +280,8 @@ export interface TableState {
|
|
|
280
280
|
filter: Filter;
|
|
281
281
|
/** 当前搜索参数 */
|
|
282
282
|
where: Where;
|
|
283
|
+
/** 当前查询任务标识 */
|
|
284
|
+
reloadId: string | null;
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
/**
|
|
@@ -396,6 +398,11 @@ export interface BeforeExportParams {
|
|
|
396
398
|
*/
|
|
397
399
|
export type BeforeExport = (params: BeforeExportParams) => boolean | void;
|
|
398
400
|
|
|
401
|
+
/**
|
|
402
|
+
* 导出插件
|
|
403
|
+
*/
|
|
404
|
+
export type ExportPlugin = (params: BeforeExportParams) => Promise<void>;
|
|
405
|
+
|
|
399
406
|
/**
|
|
400
407
|
* 导出配置
|
|
401
408
|
*/
|
|
@@ -418,6 +425,8 @@ export interface ExportConfig {
|
|
|
418
425
|
showFooter?: boolean;
|
|
419
426
|
/** 默认是否展示层级序号 */
|
|
420
427
|
showTreeIndex?: boolean;
|
|
428
|
+
/** 导出插件 */
|
|
429
|
+
exportPlugin?: ExportPlugin;
|
|
421
430
|
}
|
|
422
431
|
|
|
423
432
|
/**
|
|
@@ -444,6 +453,8 @@ export interface PrintConfig {
|
|
|
444
453
|
showFooter?: boolean;
|
|
445
454
|
/** 默认是否展示层级序号 */
|
|
446
455
|
showTreeIndex?: boolean;
|
|
456
|
+
/** 打印插件 */
|
|
457
|
+
printPlugin?: ExportPlugin;
|
|
447
458
|
}
|
|
448
459
|
|
|
449
460
|
/**
|
|
@@ -12,11 +12,13 @@ declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
|
12
12
|
tableRef: import('vue').Ref<EleProTableInstance, EleProTableInstance>;
|
|
13
13
|
selectVisible: import('vue').Ref<boolean, boolean>;
|
|
14
14
|
selectedItems: import('vue').Ref<{
|
|
15
|
+
[x: string]: any;
|
|
15
16
|
label: string;
|
|
16
17
|
value: SingleValue;
|
|
17
18
|
hide?: boolean | undefined;
|
|
18
19
|
index?: number | undefined;
|
|
19
20
|
}[], SelectedItem[] | {
|
|
21
|
+
[x: string]: any;
|
|
20
22
|
label: string;
|
|
21
23
|
value: SingleValue;
|
|
22
24
|
hide?: boolean | undefined;
|
|
@@ -104,7 +104,9 @@ const tableSelectEmits = {
|
|
|
104
104
|
/** 表格行选中事件 */
|
|
105
105
|
select: (_item) => true,
|
|
106
106
|
/** 筛选输入框值改变事件 */
|
|
107
|
-
filterChange: (_value) => true
|
|
107
|
+
filterChange: (_value) => true,
|
|
108
|
+
/** 更新下拉框显示状态 */
|
|
109
|
+
"update:visible": (_visible) => true
|
|
108
110
|
};
|
|
109
111
|
export {
|
|
110
112
|
tableSelectEmits,
|
package/es/ele-tour/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { EleTooltipInstance } from '../ele-app/plus';
|
|
3
|
-
import { TourStep
|
|
3
|
+
import { TourStep } from './types';
|
|
4
4
|
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
title?(_: {
|
|
@@ -31,7 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
31
31
|
default: number;
|
|
32
32
|
};
|
|
33
33
|
zIndex: NumberConstructor;
|
|
34
|
-
locale: import('vue').PropType<Partial<TourLocale>>;
|
|
34
|
+
locale: import('vue').PropType<Partial<import('./types').TourLocale>>;
|
|
35
35
|
}>, {
|
|
36
36
|
tooltipRef: Ref<EleTooltipInstance, EleTooltipInstance>;
|
|
37
37
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -51,7 +51,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
51
51
|
default: number;
|
|
52
52
|
};
|
|
53
53
|
zIndex: NumberConstructor;
|
|
54
|
-
locale: import('vue').PropType<Partial<TourLocale>>;
|
|
54
|
+
locale: import('vue').PropType<Partial<import('./types').TourLocale>>;
|
|
55
55
|
}>> & Readonly<{
|
|
56
56
|
"onUpdate:modelValue"?: ((_value?: number | null | undefined) => any) | undefined;
|
|
57
57
|
}>, {
|
|
@@ -59,11 +59,13 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
59
59
|
selectRef: import('vue').Ref<EleBasicSelectInstance, EleBasicSelectInstance>;
|
|
60
60
|
treeRef: import('vue').Ref<ElTreeV2Instance, ElTreeV2Instance>;
|
|
61
61
|
selectedItems: import('vue').Ref<{
|
|
62
|
+
[x: string]: any;
|
|
62
63
|
label: string;
|
|
63
64
|
value: SingleValue;
|
|
64
65
|
hide?: boolean | undefined;
|
|
65
66
|
index?: number | undefined;
|
|
66
67
|
}[], SelectedItem[] | {
|
|
68
|
+
[x: string]: any;
|
|
67
69
|
label: string;
|
|
68
70
|
value: SingleValue;
|
|
69
71
|
hide?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UploadItem
|
|
1
|
+
import { UploadItem } from './types';
|
|
2
2
|
|
|
3
3
|
declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & {
|
|
4
4
|
icon?(_: {}): any;
|
|
@@ -36,7 +36,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
36
36
|
beforeUploadClick: import('vue').PropType<import('./types').BeforeUploadClick>;
|
|
37
37
|
beforeItemEdit: import('vue').PropType<import('./types').BeforeItemEdit>;
|
|
38
38
|
beforePreview: import('vue').PropType<import('./types').BeforePreview>;
|
|
39
|
-
locale: import('vue').PropType<Partial<UploadLocale>>;
|
|
39
|
+
locale: import('vue').PropType<Partial<import('./types').UploadLocale>>;
|
|
40
40
|
}>, {
|
|
41
41
|
openImagePreview: (urls: string[], index: number) => void;
|
|
42
42
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -79,7 +79,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
79
79
|
beforeUploadClick: import('vue').PropType<import('./types').BeforeUploadClick>;
|
|
80
80
|
beforeItemEdit: import('vue').PropType<import('./types').BeforeItemEdit>;
|
|
81
81
|
beforePreview: import('vue').PropType<import('./types').BeforePreview>;
|
|
82
|
-
locale: import('vue').PropType<Partial<UploadLocale>>;
|
|
82
|
+
locale: import('vue').PropType<Partial<import('./types').UploadLocale>>;
|
|
83
83
|
}>> & Readonly<{
|
|
84
84
|
"onUpdate:modelValue"?: ((_value: UploadItem[]) => any) | undefined;
|
|
85
85
|
onRemove?: ((_item: UploadItem) => any) | undefined;
|
|
@@ -128,13 +128,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
e.preventDefault();
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
+
const clearImageObjectUrls = () => {
|
|
132
|
+
const temp = imageObjectUrls.value;
|
|
133
|
+
imageObjectUrls.value = [];
|
|
134
|
+
temp.forEach((item) => {
|
|
135
|
+
URL.revokeObjectURL(item.url);
|
|
136
|
+
});
|
|
137
|
+
};
|
|
131
138
|
watch(
|
|
132
139
|
() => props.modelValue,
|
|
133
140
|
() => {
|
|
134
|
-
if (props.modelValue
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
141
|
+
if (props.modelValue == null) {
|
|
142
|
+
clearImageObjectUrls();
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const urls = [];
|
|
146
|
+
props.modelValue.forEach((item) => {
|
|
147
|
+
const url = getItemImageUrl(item);
|
|
148
|
+
if (url) {
|
|
149
|
+
urls.push(url);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
for (let i = imageObjectUrls.value.length - 1; i >= 0; i--) {
|
|
153
|
+
const url = imageObjectUrls.value[i].url;
|
|
154
|
+
if (!urls.includes(url)) {
|
|
155
|
+
imageObjectUrls.value.splice(i, 1);
|
|
156
|
+
URL.revokeObjectURL(url);
|
|
157
|
+
}
|
|
138
158
|
}
|
|
139
159
|
},
|
|
140
160
|
{
|
|
@@ -143,10 +163,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
143
163
|
}
|
|
144
164
|
);
|
|
145
165
|
onBeforeUnmount(() => {
|
|
146
|
-
|
|
147
|
-
URL.revokeObjectURL(item.url);
|
|
148
|
-
});
|
|
149
|
-
imageObjectUrls.value = [];
|
|
166
|
+
clearImageObjectUrls();
|
|
150
167
|
});
|
|
151
168
|
__expose({
|
|
152
169
|
openImagePreview
|
|
@@ -136,10 +136,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
136
136
|
onCheckedChange?: ((_checked: boolean) => any) | undefined;
|
|
137
137
|
}>, {
|
|
138
138
|
loading: boolean;
|
|
139
|
+
isDisabled: boolean;
|
|
139
140
|
fixedCellHeight: boolean;
|
|
140
141
|
autoRowHeight: boolean;
|
|
141
142
|
isChecked: boolean;
|
|
142
|
-
isDisabled: boolean;
|
|
143
143
|
hasChildren: boolean;
|
|
144
144
|
isCollapse: boolean;
|
|
145
145
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|