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
|
@@ -3,12 +3,9 @@ const vue = require("vue");
|
|
|
3
3
|
const elementPlus = require("element-plus");
|
|
4
4
|
const index = require("../../icons/index");
|
|
5
5
|
const EleDropdown = require("../../ele-dropdown/index");
|
|
6
|
-
const receiver = require("../../ele-config-provider/receiver");
|
|
7
6
|
const util = require("../util");
|
|
8
7
|
const EleTool = require("../../ele-tool/index");
|
|
9
8
|
const ToolColumn = require("./tool-column");
|
|
10
|
-
const ToolExport = require("./tool-export");
|
|
11
|
-
const ToolPrint = require("./tool-print");
|
|
12
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
13
10
|
__name: "table-tools",
|
|
14
11
|
props: {
|
|
@@ -30,44 +27,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
27
|
/** 本地缓存的名称 */
|
|
31
28
|
cacheKey: String,
|
|
32
29
|
/** 国际化 */
|
|
33
|
-
|
|
34
|
-
/** 表格选中数据 */
|
|
35
|
-
selections: Array,
|
|
36
|
-
/** 表格当前页数据 */
|
|
37
|
-
pageData: Array,
|
|
38
|
-
/** 单元格合并行列方法 */
|
|
39
|
-
spanMethod: Function,
|
|
40
|
-
/** 表格是否有表头 */
|
|
41
|
-
tableHeader: Boolean,
|
|
42
|
-
/** 是否显示合计行 */
|
|
43
|
-
showSummary: Boolean,
|
|
44
|
-
/** 合计行文本 */
|
|
45
|
-
sumText: String,
|
|
46
|
-
/** 合计行自定义方法 */
|
|
47
|
-
summaryMethod: Function,
|
|
48
|
-
/** 自定义表格样式 */
|
|
49
|
-
tableStyle: Object,
|
|
50
|
-
/** 单元格样式 */
|
|
51
|
-
cellStyle: [Object, Function],
|
|
52
|
-
/** 单元格类名自定义 */
|
|
53
|
-
cellClassName: [String, Function],
|
|
54
|
-
/** 单元格样式 */
|
|
55
|
-
headerCellStyle: [Object, Function],
|
|
56
|
-
/** 单元格类名自定义 */
|
|
57
|
-
headerCellClassName: [String, Function],
|
|
58
|
-
/** 序号列起始索引 */
|
|
59
|
-
pageIndex: Number,
|
|
60
|
-
/** 树表字段名 */
|
|
61
|
-
treeProps: Object,
|
|
62
|
-
/** 表格请求数据方法 */
|
|
63
|
-
fetch: Function,
|
|
64
|
-
/** 导出配置 */
|
|
65
|
-
exportConfig: {
|
|
66
|
-
type: Object,
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
/** 打印配置 */
|
|
70
|
-
printConfig: {
|
|
30
|
+
lang: {
|
|
71
31
|
type: Object,
|
|
72
32
|
required: true
|
|
73
33
|
}
|
|
@@ -76,30 +36,29 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
76
36
|
reload: () => true,
|
|
77
37
|
"update:size": (_size) => true,
|
|
78
38
|
"update:columns": (_columns, _tableColumns, _isReset) => true,
|
|
79
|
-
"update:maximized": (_maximized) => true
|
|
39
|
+
"update:maximized": (_maximized) => true,
|
|
40
|
+
openExportModal: () => true,
|
|
41
|
+
openPrintModal: () => true
|
|
80
42
|
},
|
|
81
|
-
setup(__props, {
|
|
43
|
+
setup(__props, { emit: __emit }) {
|
|
82
44
|
const ownSlots = ["default", "printTop", "printBottom"];
|
|
83
45
|
const props = __props;
|
|
84
46
|
const emit = __emit;
|
|
85
|
-
const { lang } = receiver.useLocale("table", props);
|
|
86
|
-
const toolExportRef = vue.ref(null);
|
|
87
|
-
const toolPrintRef = vue.ref(null);
|
|
88
47
|
const placement = vue.computed(() => props.maximized ? "bottom" : "top");
|
|
89
48
|
const sizeDropdownItems = vue.computed(() => {
|
|
90
49
|
return [
|
|
91
50
|
{
|
|
92
|
-
title: lang.
|
|
51
|
+
title: props.lang.sizeLarge,
|
|
93
52
|
command: "large",
|
|
94
53
|
icon: vue.markRaw(index.SizeSlackOutlined)
|
|
95
54
|
},
|
|
96
55
|
{
|
|
97
|
-
title: lang.
|
|
56
|
+
title: props.lang.sizeDefault,
|
|
98
57
|
command: "default",
|
|
99
58
|
icon: vue.markRaw(index.SizeMiddleOutlined)
|
|
100
59
|
},
|
|
101
60
|
{
|
|
102
|
-
title: lang.
|
|
61
|
+
title: props.lang.sizeSmall,
|
|
103
62
|
command: "small",
|
|
104
63
|
icon: vue.markRaw(index.SizeCompactOutlined)
|
|
105
64
|
}
|
|
@@ -121,208 +80,119 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
121
80
|
emit("update:maximized", !props.maximized);
|
|
122
81
|
};
|
|
123
82
|
const openExportModal = () => {
|
|
124
|
-
|
|
125
|
-
toolExportRef.value.openModal();
|
|
126
|
-
}
|
|
83
|
+
emit("openExportModal");
|
|
127
84
|
};
|
|
128
85
|
const openPrintModal = () => {
|
|
129
|
-
|
|
130
|
-
toolPrintRef.value.openModal();
|
|
131
|
-
}
|
|
86
|
+
emit("openPrintModal");
|
|
132
87
|
};
|
|
133
|
-
const printData = (params) => {
|
|
134
|
-
if (toolPrintRef.value) {
|
|
135
|
-
toolPrintRef.value.printData(params);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
const exportData = (params) => {
|
|
139
|
-
if (toolExportRef.value) {
|
|
140
|
-
toolExportRef.value.exportData(params);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
__expose({
|
|
144
|
-
openPrintModal,
|
|
145
|
-
printData,
|
|
146
|
-
openExportModal,
|
|
147
|
-
exportData
|
|
148
|
-
});
|
|
149
88
|
return (_ctx, _cache) => {
|
|
150
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null,
|
|
151
|
-
vue.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
vue.createVNode(vue.unref(index.PrinterOutlined))
|
|
258
|
-
]),
|
|
259
|
-
_: 1
|
|
260
|
-
})
|
|
261
|
-
]),
|
|
262
|
-
_: 2
|
|
263
|
-
}, 1032, ["title", "placement"])) : tool === "size" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
264
|
-
key: index$1 + "-size",
|
|
265
|
-
placement: placement.value,
|
|
266
|
-
title: vue.unref(lang).sizes
|
|
267
|
-
}, {
|
|
268
|
-
default: vue.withCtx(() => [
|
|
269
|
-
vue.createVNode(EleDropdown, {
|
|
270
|
-
trigger: "click",
|
|
271
|
-
placement: "bottom",
|
|
272
|
-
validateEvent: false,
|
|
273
|
-
popperClass: "ele-tool-size-popper",
|
|
274
|
-
modelValue: __props.size,
|
|
275
|
-
items: sizeDropdownItems.value,
|
|
276
|
-
popperOptions: {
|
|
277
|
-
modifiers: [{ name: "offset", options: { offset: [0, 10] } }]
|
|
278
|
-
},
|
|
279
|
-
onCommand: updateSize
|
|
280
|
-
}, {
|
|
281
|
-
default: vue.withCtx(() => [
|
|
282
|
-
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
283
|
-
default: vue.withCtx(() => [
|
|
284
|
-
vue.createVNode(vue.unref(index.ColumnHeightOutlined))
|
|
285
|
-
]),
|
|
286
|
-
_: 1
|
|
287
|
-
})
|
|
288
|
-
]),
|
|
289
|
-
_: 1
|
|
290
|
-
}, 8, ["modelValue", "items"])
|
|
291
|
-
]),
|
|
292
|
-
_: 2
|
|
293
|
-
}, 1032, ["placement", "title"])) : tool === "columns" ? (vue.openBlock(), vue.createBlock(ToolColumn, {
|
|
294
|
-
key: index$1 + "-columns",
|
|
295
|
-
placement: placement.value,
|
|
296
|
-
locale: vue.unref(lang),
|
|
297
|
-
columns: __props.columns,
|
|
298
|
-
sortable: __props.columnSortable,
|
|
299
|
-
allowFixed: __props.columnFixed,
|
|
300
|
-
cacheKey: __props.cacheKey,
|
|
301
|
-
"onUpdate:columns": updateColumns
|
|
302
|
-
}, null, 8, ["placement", "locale", "columns", "sortable", "allowFixed", "cacheKey"])) : tool === "maximized" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
303
|
-
key: index$1 + "-maximized",
|
|
304
|
-
placement: placement.value,
|
|
305
|
-
title: vue.unref(lang).maximized,
|
|
306
|
-
clickHideTooltip: true,
|
|
307
|
-
onClick: toggleMaximized
|
|
308
|
-
}, {
|
|
309
|
-
default: vue.withCtx(() => [
|
|
310
|
-
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
311
|
-
default: vue.withCtx(() => [
|
|
312
|
-
__props.maximized ? (vue.openBlock(), vue.createBlock(vue.unref(index.FullscreenExitOutlined), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(index.FullscreenOutlined), { key: 1 }))
|
|
313
|
-
]),
|
|
314
|
-
_: 1
|
|
315
|
-
})
|
|
316
|
-
]),
|
|
317
|
-
_: 2
|
|
318
|
-
}, 1032, ["placement", "title"])) : tool && !ownSlots.includes(tool) && _ctx.$slots[tool] ? vue.renderSlot(_ctx.$slots, tool, {
|
|
319
|
-
key: 6,
|
|
320
|
-
pageIndex: __props.pageIndex,
|
|
321
|
-
fetch: __props.fetch
|
|
322
|
-
}) : vue.createCommentVNode("", true)
|
|
323
|
-
], 64);
|
|
324
|
-
}), 256))
|
|
325
|
-
], 64);
|
|
89
|
+
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.tools, (tool, index$1) => {
|
|
90
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
91
|
+
tool === "reload" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
92
|
+
key: index$1 + "-reload",
|
|
93
|
+
placement: placement.value,
|
|
94
|
+
title: __props.lang.refresh,
|
|
95
|
+
onClick: reload
|
|
96
|
+
}, {
|
|
97
|
+
default: vue.withCtx(() => [
|
|
98
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
99
|
+
default: vue.withCtx(() => [
|
|
100
|
+
vue.createVNode(vue.unref(index.ReloadOutlined))
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
_: 2
|
|
106
|
+
}, 1032, ["placement", "title"])) : tool === "export" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
107
|
+
key: index$1 + "-export",
|
|
108
|
+
title: __props.lang.export,
|
|
109
|
+
placement: placement.value,
|
|
110
|
+
clickHideTooltip: true,
|
|
111
|
+
onClick: openExportModal
|
|
112
|
+
}, {
|
|
113
|
+
default: vue.withCtx(() => [
|
|
114
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), { style: { "transform": "scale(1.1)", "transform-origin": "bottom" } }, {
|
|
115
|
+
default: vue.withCtx(() => [
|
|
116
|
+
vue.createVNode(vue.unref(index.DownloadOutlined))
|
|
117
|
+
]),
|
|
118
|
+
_: 1
|
|
119
|
+
})
|
|
120
|
+
]),
|
|
121
|
+
_: 2
|
|
122
|
+
}, 1032, ["title", "placement"])) : tool === "print" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
123
|
+
key: index$1 + "-print",
|
|
124
|
+
title: __props.lang.print,
|
|
125
|
+
placement: placement.value,
|
|
126
|
+
clickHideTooltip: true,
|
|
127
|
+
onClick: openPrintModal
|
|
128
|
+
}, {
|
|
129
|
+
default: vue.withCtx(() => [
|
|
130
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
131
|
+
default: vue.withCtx(() => [
|
|
132
|
+
vue.createVNode(vue.unref(index.PrinterOutlined))
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
]),
|
|
137
|
+
_: 2
|
|
138
|
+
}, 1032, ["title", "placement"])) : tool === "size" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
139
|
+
key: index$1 + "-size",
|
|
140
|
+
placement: placement.value,
|
|
141
|
+
title: __props.lang.sizes
|
|
142
|
+
}, {
|
|
143
|
+
default: vue.withCtx(() => [
|
|
144
|
+
vue.createVNode(EleDropdown, {
|
|
145
|
+
trigger: "click",
|
|
146
|
+
placement: "bottom",
|
|
147
|
+
validateEvent: false,
|
|
148
|
+
popperClass: "ele-tool-size-popper",
|
|
149
|
+
modelValue: __props.size,
|
|
150
|
+
items: sizeDropdownItems.value,
|
|
151
|
+
popperOptions: {
|
|
152
|
+
modifiers: [{ name: "offset", options: { offset: [0, 10] } }]
|
|
153
|
+
},
|
|
154
|
+
onCommand: updateSize
|
|
155
|
+
}, {
|
|
156
|
+
default: vue.withCtx(() => [
|
|
157
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
158
|
+
default: vue.withCtx(() => [
|
|
159
|
+
vue.createVNode(vue.unref(index.ColumnHeightOutlined))
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
})
|
|
163
|
+
]),
|
|
164
|
+
_: 1
|
|
165
|
+
}, 8, ["modelValue", "items"])
|
|
166
|
+
]),
|
|
167
|
+
_: 2
|
|
168
|
+
}, 1032, ["placement", "title"])) : tool === "columns" ? (vue.openBlock(), vue.createBlock(ToolColumn, {
|
|
169
|
+
key: index$1 + "-columns",
|
|
170
|
+
placement: placement.value,
|
|
171
|
+
locale: __props.lang,
|
|
172
|
+
columns: __props.columns,
|
|
173
|
+
sortable: __props.columnSortable,
|
|
174
|
+
allowFixed: __props.columnFixed,
|
|
175
|
+
cacheKey: __props.cacheKey,
|
|
176
|
+
"onUpdate:columns": updateColumns
|
|
177
|
+
}, null, 8, ["placement", "locale", "columns", "sortable", "allowFixed", "cacheKey"])) : tool === "maximized" ? (vue.openBlock(), vue.createBlock(EleTool, {
|
|
178
|
+
key: index$1 + "-maximized",
|
|
179
|
+
placement: placement.value,
|
|
180
|
+
title: __props.lang.maximized,
|
|
181
|
+
clickHideTooltip: true,
|
|
182
|
+
onClick: toggleMaximized
|
|
183
|
+
}, {
|
|
184
|
+
default: vue.withCtx(() => [
|
|
185
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
186
|
+
default: vue.withCtx(() => [
|
|
187
|
+
__props.maximized ? (vue.openBlock(), vue.createBlock(vue.unref(index.FullscreenExitOutlined), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(index.FullscreenOutlined), { key: 1 }))
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
})
|
|
191
|
+
]),
|
|
192
|
+
_: 2
|
|
193
|
+
}, 1032, ["placement", "title"])) : tool && !ownSlots.includes(tool) && _ctx.$slots[tool] ? vue.renderSlot(_ctx.$slots, tool, { key: 6 }) : vue.createCommentVNode("", true)
|
|
194
|
+
], 64);
|
|
195
|
+
}), 256);
|
|
326
196
|
};
|
|
327
197
|
}
|
|
328
198
|
});
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TableTool, TableLocale, FetchFunction, ExportConfig, PrintConfig, TableExportParams } from '../types';
|
|
2
|
+
import { Columns } from '../../ele-data-table/types';
|
|
3
|
+
import { TableTool, TableLocale } from '../types';
|
|
5
4
|
|
|
6
|
-
declare function __VLS_template(): Partial<Record<string, (_: {
|
|
7
|
-
row: DataItem | undefined;
|
|
8
|
-
column: import('../types').Column;
|
|
9
|
-
$index: number;
|
|
10
|
-
}) => any>> & Partial<Record<string, (_: {
|
|
11
|
-
pageIndex: number | undefined;
|
|
12
|
-
fetch: FetchFunction | undefined;
|
|
13
|
-
}) => any>>;
|
|
5
|
+
declare function __VLS_template(): Partial<Record<string, (_: {}) => any>>;
|
|
14
6
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
15
7
|
/** 工具按钮布局 */
|
|
16
8
|
tools: {
|
|
@@ -30,57 +22,17 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
30
22
|
/** 本地缓存的名称 */
|
|
31
23
|
cacheKey: StringConstructor;
|
|
32
24
|
/** 国际化 */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
selections: PropType<DataItem[]>;
|
|
36
|
-
/** 表格当前页数据 */
|
|
37
|
-
pageData: PropType<DataItem[]>;
|
|
38
|
-
/** 单元格合并行列方法 */
|
|
39
|
-
spanMethod: PropType<SpanMethod>;
|
|
40
|
-
/** 表格是否有表头 */
|
|
41
|
-
tableHeader: BooleanConstructor;
|
|
42
|
-
/** 是否显示合计行 */
|
|
43
|
-
showSummary: BooleanConstructor;
|
|
44
|
-
/** 合计行文本 */
|
|
45
|
-
sumText: StringConstructor;
|
|
46
|
-
/** 合计行自定义方法 */
|
|
47
|
-
summaryMethod: PropType<SummaryMethod>;
|
|
48
|
-
/** 自定义表格样式 */
|
|
49
|
-
tableStyle: PropType<StyleValue>;
|
|
50
|
-
/** 单元格样式 */
|
|
51
|
-
cellStyle: PropType<CellStyle>;
|
|
52
|
-
/** 单元格类名自定义 */
|
|
53
|
-
cellClassName: PropType<CellClass>;
|
|
54
|
-
/** 单元格样式 */
|
|
55
|
-
headerCellStyle: PropType<HeaderCellStyle>;
|
|
56
|
-
/** 单元格类名自定义 */
|
|
57
|
-
headerCellClassName: PropType<HeaderCellClass>;
|
|
58
|
-
/** 序号列起始索引 */
|
|
59
|
-
pageIndex: NumberConstructor;
|
|
60
|
-
/** 树表字段名 */
|
|
61
|
-
treeProps: PropType<TreeProps>;
|
|
62
|
-
/** 表格请求数据方法 */
|
|
63
|
-
fetch: PropType<FetchFunction>;
|
|
64
|
-
/** 导出配置 */
|
|
65
|
-
exportConfig: {
|
|
66
|
-
type: PropType<ExportConfig>;
|
|
25
|
+
lang: {
|
|
26
|
+
type: PropType<TableLocale>;
|
|
67
27
|
required: true;
|
|
68
28
|
};
|
|
69
|
-
|
|
70
|
-
printConfig: {
|
|
71
|
-
type: PropType<PrintConfig>;
|
|
72
|
-
required: true;
|
|
73
|
-
};
|
|
74
|
-
}>, {
|
|
75
|
-
openPrintModal: () => void;
|
|
76
|
-
printData: (params?: TableExportParams) => void;
|
|
77
|
-
openExportModal: () => void;
|
|
78
|
-
exportData: (params?: TableExportParams) => void;
|
|
79
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
80
30
|
reload: () => void;
|
|
81
31
|
"update:size": (_size: "" | "small" | "default" | "large" | undefined) => void;
|
|
82
32
|
"update:columns": (_columns: Columns, _tableColumns: Columns, _isReset: boolean) => void;
|
|
83
33
|
"update:maximized": (_maximized: boolean) => void;
|
|
34
|
+
openExportModal: () => void;
|
|
35
|
+
openPrintModal: () => void;
|
|
84
36
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
85
37
|
/** 工具按钮布局 */
|
|
86
38
|
tools: {
|
|
@@ -100,45 +52,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
100
52
|
/** 本地缓存的名称 */
|
|
101
53
|
cacheKey: StringConstructor;
|
|
102
54
|
/** 国际化 */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
selections: PropType<DataItem[]>;
|
|
106
|
-
/** 表格当前页数据 */
|
|
107
|
-
pageData: PropType<DataItem[]>;
|
|
108
|
-
/** 单元格合并行列方法 */
|
|
109
|
-
spanMethod: PropType<SpanMethod>;
|
|
110
|
-
/** 表格是否有表头 */
|
|
111
|
-
tableHeader: BooleanConstructor;
|
|
112
|
-
/** 是否显示合计行 */
|
|
113
|
-
showSummary: BooleanConstructor;
|
|
114
|
-
/** 合计行文本 */
|
|
115
|
-
sumText: StringConstructor;
|
|
116
|
-
/** 合计行自定义方法 */
|
|
117
|
-
summaryMethod: PropType<SummaryMethod>;
|
|
118
|
-
/** 自定义表格样式 */
|
|
119
|
-
tableStyle: PropType<StyleValue>;
|
|
120
|
-
/** 单元格样式 */
|
|
121
|
-
cellStyle: PropType<CellStyle>;
|
|
122
|
-
/** 单元格类名自定义 */
|
|
123
|
-
cellClassName: PropType<CellClass>;
|
|
124
|
-
/** 单元格样式 */
|
|
125
|
-
headerCellStyle: PropType<HeaderCellStyle>;
|
|
126
|
-
/** 单元格类名自定义 */
|
|
127
|
-
headerCellClassName: PropType<HeaderCellClass>;
|
|
128
|
-
/** 序号列起始索引 */
|
|
129
|
-
pageIndex: NumberConstructor;
|
|
130
|
-
/** 树表字段名 */
|
|
131
|
-
treeProps: PropType<TreeProps>;
|
|
132
|
-
/** 表格请求数据方法 */
|
|
133
|
-
fetch: PropType<FetchFunction>;
|
|
134
|
-
/** 导出配置 */
|
|
135
|
-
exportConfig: {
|
|
136
|
-
type: PropType<ExportConfig>;
|
|
137
|
-
required: true;
|
|
138
|
-
};
|
|
139
|
-
/** 打印配置 */
|
|
140
|
-
printConfig: {
|
|
141
|
-
type: PropType<PrintConfig>;
|
|
55
|
+
lang: {
|
|
56
|
+
type: PropType<TableLocale>;
|
|
142
57
|
required: true;
|
|
143
58
|
};
|
|
144
59
|
}>> & Readonly<{
|
|
@@ -146,10 +61,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
146
61
|
"onUpdate:size"?: ((_size: "" | "small" | "default" | "large" | undefined) => any) | undefined;
|
|
147
62
|
"onUpdate:columns"?: ((_columns: Columns, _tableColumns: Columns, _isReset: boolean) => any) | undefined;
|
|
148
63
|
"onUpdate:maximized"?: ((_maximized: boolean) => any) | undefined;
|
|
64
|
+
onOpenExportModal?: (() => any) | undefined;
|
|
65
|
+
onOpenPrintModal?: (() => any) | undefined;
|
|
149
66
|
}>, {
|
|
150
|
-
showSummary: boolean;
|
|
151
67
|
maximized: boolean;
|
|
152
|
-
tableHeader: boolean;
|
|
153
68
|
columnSortable: boolean;
|
|
154
69
|
columnFixed: boolean;
|
|
155
70
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -63,7 +63,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
63
|
/** 默认是否勾选层级序号 */
|
|
64
64
|
defaultShowTreeIndex: Boolean,
|
|
65
65
|
/** 导出前的钩子函数 */
|
|
66
|
-
beforeExport: Function
|
|
66
|
+
beforeExport: Function,
|
|
67
|
+
/** 导出插件 */
|
|
68
|
+
exportPlugin: Function
|
|
67
69
|
},
|
|
68
70
|
setup(__props, { expose: __expose }) {
|
|
69
71
|
const props = __props;
|
|
@@ -140,30 +142,40 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
140
142
|
isShowTreeIndex,
|
|
141
143
|
isShowHeader
|
|
142
144
|
);
|
|
145
|
+
const exportParams = {
|
|
146
|
+
data: exportDataValue,
|
|
147
|
+
columns: exportColumns,
|
|
148
|
+
headerData,
|
|
149
|
+
bodyData,
|
|
150
|
+
footerData,
|
|
151
|
+
bodyCols,
|
|
152
|
+
fileName: exportFileName,
|
|
153
|
+
dataType: exportDataType,
|
|
154
|
+
hideLoading,
|
|
155
|
+
closeModal,
|
|
156
|
+
showHeader: isShowHeader,
|
|
157
|
+
showFooter: isShowFooter,
|
|
158
|
+
showTreeIndex: isShowTreeIndex,
|
|
159
|
+
tableColumns
|
|
160
|
+
};
|
|
143
161
|
if (typeof props.beforeExport === "function") {
|
|
144
|
-
const flag = props.beforeExport(
|
|
145
|
-
data: exportDataValue,
|
|
146
|
-
columns: exportColumns,
|
|
147
|
-
headerData,
|
|
148
|
-
bodyData,
|
|
149
|
-
footerData,
|
|
150
|
-
bodyCols,
|
|
151
|
-
fileName: exportFileName,
|
|
152
|
-
dataType: exportDataType,
|
|
153
|
-
hideLoading,
|
|
154
|
-
closeModal,
|
|
155
|
-
showHeader: isShowHeader,
|
|
156
|
-
showFooter: isShowFooter,
|
|
157
|
-
showTreeIndex: isShowTreeIndex,
|
|
158
|
-
tableColumns
|
|
159
|
-
});
|
|
162
|
+
const flag = props.beforeExport(exportParams);
|
|
160
163
|
if (flag === false) {
|
|
161
164
|
return;
|
|
162
165
|
}
|
|
163
166
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
if (props.exportPlugin == null) {
|
|
168
|
+
util.exportCSV(exportFileName, headerData, bodyData, footerData);
|
|
169
|
+
hideLoading();
|
|
170
|
+
closeModal();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
props.exportPlugin(exportParams).then(() => {
|
|
174
|
+
hideLoading();
|
|
175
|
+
closeModal();
|
|
176
|
+
}).catch(() => {
|
|
177
|
+
hideLoading();
|
|
178
|
+
});
|
|
167
179
|
};
|
|
168
180
|
const handleExport = () => {
|
|
169
181
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { EleModalProps } from '../../ele-app/plus';
|
|
3
3
|
import { Columns, DataItem, SpanMethod, SummaryMethod, TreeProps } from '../../ele-data-table/types';
|
|
4
|
-
import { TableLocale, ExportDataType, BeforeExport, Datasource, FetchFunction, TableExportParams } from '../types';
|
|
4
|
+
import { TableLocale, ExportDataType, BeforeExport, ExportPlugin, Datasource, FetchFunction, TableExportParams } from '../types';
|
|
5
5
|
|
|
6
6
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
7
7
|
/** 表格国际化 */
|
|
@@ -56,6 +56,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
56
56
|
defaultShowTreeIndex: BooleanConstructor;
|
|
57
57
|
/** 导出前的钩子函数 */
|
|
58
58
|
beforeExport: PropType<BeforeExport>;
|
|
59
|
+
/** 导出插件 */
|
|
60
|
+
exportPlugin: PropType<ExportPlugin>;
|
|
59
61
|
}>, {
|
|
60
62
|
openModal: () => void;
|
|
61
63
|
closeModal: () => void;
|
|
@@ -113,6 +115,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
113
115
|
defaultShowTreeIndex: BooleanConstructor;
|
|
114
116
|
/** 导出前的钩子函数 */
|
|
115
117
|
beforeExport: PropType<BeforeExport>;
|
|
118
|
+
/** 导出插件 */
|
|
119
|
+
exportPlugin: PropType<ExportPlugin>;
|
|
116
120
|
}>> & Readonly<{}>, {
|
|
117
121
|
showSummary: boolean;
|
|
118
122
|
tableHeader: boolean;
|