vxe-table 3.10.0-beta.2 → 3.10.0-beta.4
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/locale/lang/en-US.js +1 -0
- package/es/locale/lang/es-ES.js +1 -0
- package/es/locale/lang/hu-HU.js +1 -0
- package/es/locale/lang/ja-JP.js +1 -0
- package/es/locale/lang/ko-KR.js +1 -0
- package/es/locale/lang/pt-BR.js +1 -0
- package/es/locale/lang/ru-RU.js +1 -0
- package/es/locale/lang/uk-UA.js +1 -0
- package/es/locale/lang/vi-VN.js +1 -0
- package/es/locale/lang/zh-CHT.js +1 -0
- package/es/locale/lang/zh-CN.js +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/export-panel.js +325 -258
- package/es/table/module/export/import-panel.js +138 -81
- package/es/table/module/export/mixin.js +14 -0
- package/es/table/src/body.js +1 -1
- package/es/table/src/methods.js +10 -3
- package/es/table/style.css +48 -47
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +48 -47
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.umd.js +368 -243
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +1 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +1 -0
- package/lib/locale/lang/es-ES.js +1 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +1 -0
- package/lib/locale/lang/hu-HU.js +1 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +1 -0
- package/lib/locale/lang/ja-JP.js +1 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +1 -0
- package/lib/locale/lang/ko-KR.js +1 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +1 -0
- package/lib/locale/lang/pt-BR.js +1 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +1 -0
- package/lib/locale/lang/ru-RU.js +1 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +1 -0
- package/lib/locale/lang/uk-UA.js +1 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +1 -0
- package/lib/locale/lang/vi-VN.js +1 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.js +1 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +1 -0
- package/lib/locale/lang/zh-CN.js +1 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/export-panel.js +239 -185
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +99 -52
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +14 -0
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +12 -3
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/style/style.css +48 -47
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +48 -47
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +1 -0
- package/packages/locale/lang/es-ES.ts +1 -0
- package/packages/locale/lang/hu-HU.ts +1 -0
- package/packages/locale/lang/ja-JP.ts +1 -0
- package/packages/locale/lang/ko-KR.ts +1 -0
- package/packages/locale/lang/pt-BR.ts +1 -0
- package/packages/locale/lang/ru-RU.ts +1 -0
- package/packages/locale/lang/uk-UA.ts +1 -0
- package/packages/locale/lang/vi-VN.ts +1 -0
- package/packages/locale/lang/zh-CHT.ts +1 -0
- package/packages/locale/lang/zh-CN.ts +1 -0
- package/packages/table/module/export/export-panel.ts +323 -253
- package/packages/table/module/export/import-panel.ts +141 -79
- package/packages/table/module/export/mixin.ts +15 -0
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/methods.ts +11 -3
- package/styles/components/table-module/export.scss +17 -14
- /package/es/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
- /package/es/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
- /package/es/{iconfont.1730365807487.woff2 → iconfont.1730454529299.woff2} +0 -0
- /package/lib/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
- /package/lib/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
- /package/lib/{iconfont.1730365807487.woff2 → iconfont.1730454529299.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import { VxeUI } from '../../../ui';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { formatText } from '../../../ui/src/utils';
|
|
4
4
|
import { errLog } from '../../../ui/src/log';
|
|
5
|
-
const { getI18n, getIcon, globalMixins } = VxeUI;
|
|
5
|
+
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI;
|
|
6
6
|
export default {
|
|
7
7
|
name: 'VxeTableExportPanel',
|
|
8
8
|
mixins: [
|
|
@@ -19,6 +19,11 @@ export default {
|
|
|
19
19
|
// VxeSelect,
|
|
20
20
|
// VxeOption
|
|
21
21
|
},
|
|
22
|
+
inject: {
|
|
23
|
+
$xeTable: {
|
|
24
|
+
default: null
|
|
25
|
+
}
|
|
26
|
+
},
|
|
22
27
|
data() {
|
|
23
28
|
return {
|
|
24
29
|
isAll: false,
|
|
@@ -70,18 +75,26 @@ export default {
|
|
|
70
75
|
}
|
|
71
76
|
},
|
|
72
77
|
render(h) {
|
|
78
|
+
const $xeTable = this.$xeTable;
|
|
79
|
+
const exportOpts = $xeTable.exportOpts;
|
|
73
80
|
const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this;
|
|
74
|
-
const { hasTree, hasMerge, isPrint, hasColgroup } = storeData;
|
|
81
|
+
const { hasTree, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
75
82
|
const { isHeader } = defaultOptions;
|
|
83
|
+
const slots = exportOpts.slots || {};
|
|
84
|
+
const topSlot = slots.top;
|
|
85
|
+
const bottomSlot = slots.bottom;
|
|
86
|
+
const defaultSlot = slots.default;
|
|
87
|
+
const footerSlot = slots.footer;
|
|
88
|
+
const parameterSlot = slots.parameter;
|
|
76
89
|
const cols = [];
|
|
77
|
-
XEUtils.eachTree(
|
|
90
|
+
XEUtils.eachTree(columns, column => {
|
|
78
91
|
const colTitle = formatText(column.getTitle(), 1);
|
|
79
92
|
const isColGroup = column.children && column.children.length;
|
|
80
93
|
const isChecked = column.checked;
|
|
81
94
|
const indeterminate = column.halfChecked;
|
|
82
95
|
const isHtml = column.type === 'html';
|
|
83
96
|
cols.push(h('li', {
|
|
84
|
-
class: ['vxe-export--panel-column-option', `level--${column.level}`, {
|
|
97
|
+
class: ['vxe-table-export--panel-column-option', `level--${column.level}`, {
|
|
85
98
|
'is--group': isColGroup,
|
|
86
99
|
'is--checked': isChecked,
|
|
87
100
|
'is--indeterminate': indeterminate,
|
|
@@ -118,14 +131,19 @@ export default {
|
|
|
118
131
|
return h('vxe-modal', {
|
|
119
132
|
ref: 'modal',
|
|
120
133
|
props: {
|
|
134
|
+
id: 'VXE_EXPORT_MODAL',
|
|
121
135
|
value: storeData.visible,
|
|
122
136
|
title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
123
137
|
width: 660,
|
|
138
|
+
minWidth: 500,
|
|
139
|
+
minHeight: 400,
|
|
124
140
|
mask: true,
|
|
125
141
|
lockView: true,
|
|
126
|
-
showFooter:
|
|
142
|
+
showFooter: true,
|
|
127
143
|
escClosable: true,
|
|
128
144
|
maskClosable: true,
|
|
145
|
+
showMaximize: true,
|
|
146
|
+
resize: true,
|
|
129
147
|
loading: this.loading
|
|
130
148
|
},
|
|
131
149
|
on: {
|
|
@@ -133,262 +151,310 @@ export default {
|
|
|
133
151
|
storeData.visible = value;
|
|
134
152
|
},
|
|
135
153
|
show: this.showEvent
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
h('
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
154
|
+
},
|
|
155
|
+
scopedSlots: {
|
|
156
|
+
default: () => {
|
|
157
|
+
const params = {
|
|
158
|
+
$table: $xeTable,
|
|
159
|
+
$grid: $xeTable.xegrid,
|
|
160
|
+
options: exportOpts,
|
|
161
|
+
columns,
|
|
162
|
+
params: exportOpts.params
|
|
163
|
+
};
|
|
164
|
+
return h('div', {
|
|
165
|
+
class: 'vxe-table-export--panel'
|
|
166
|
+
}, [
|
|
167
|
+
topSlot
|
|
168
|
+
? h('div', {
|
|
169
|
+
class: 'vxe-table-export--panel-top'
|
|
170
|
+
}, $xeTable.callSlot(topSlot, params, h))
|
|
171
|
+
: renderEmptyElement(this),
|
|
172
|
+
h('div', {
|
|
173
|
+
class: 'vxe-table-export--panel-body'
|
|
174
|
+
}, defaultSlot
|
|
175
|
+
? $xeTable.callSlot(defaultSlot, params, h)
|
|
176
|
+
: [
|
|
177
|
+
h('table', {
|
|
178
|
+
attrs: {
|
|
179
|
+
class: 'vxe-table-export--panel-table',
|
|
180
|
+
cellspacing: 0,
|
|
181
|
+
cellpadding: 0,
|
|
182
|
+
border: 0
|
|
183
|
+
}
|
|
184
|
+
}, [
|
|
185
|
+
h('tbody', [
|
|
186
|
+
[
|
|
187
|
+
isPrint
|
|
188
|
+
? _e()
|
|
189
|
+
: h('tr', [
|
|
190
|
+
h('td', getI18n('vxe.export.expName')),
|
|
191
|
+
h('td', [
|
|
192
|
+
h('vxe-input', {
|
|
193
|
+
ref: 'filename',
|
|
194
|
+
props: {
|
|
195
|
+
value: defaultOptions.filename,
|
|
196
|
+
type: 'text',
|
|
197
|
+
clearable: true,
|
|
198
|
+
placeholder: getI18n('vxe.export.expNamePlaceholder')
|
|
199
|
+
},
|
|
200
|
+
on: {
|
|
201
|
+
modelValue(value) {
|
|
202
|
+
defaultOptions.filename = value;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
})
|
|
206
|
+
])
|
|
207
|
+
]),
|
|
208
|
+
isPrint
|
|
209
|
+
? _e()
|
|
210
|
+
: h('tr', [
|
|
211
|
+
h('td', getI18n('vxe.export.expType')),
|
|
212
|
+
h('td', [
|
|
213
|
+
h('vxe-select', {
|
|
214
|
+
props: {
|
|
215
|
+
value: defaultOptions.type,
|
|
216
|
+
options: storeData.typeList
|
|
217
|
+
},
|
|
218
|
+
on: {
|
|
219
|
+
input(value) {
|
|
220
|
+
defaultOptions.type = value;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
])
|
|
225
|
+
]),
|
|
226
|
+
isPrint || showSheet
|
|
227
|
+
? h('tr', [
|
|
228
|
+
h('td', getI18n('vxe.export.expSheetName')),
|
|
229
|
+
h('td', [
|
|
230
|
+
h('vxe-input', {
|
|
231
|
+
ref: 'sheetname',
|
|
232
|
+
props: {
|
|
233
|
+
value: defaultOptions.sheetName,
|
|
234
|
+
type: 'text',
|
|
235
|
+
clearable: true,
|
|
236
|
+
placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
|
|
237
|
+
},
|
|
238
|
+
on: {
|
|
239
|
+
modelValue(value) {
|
|
240
|
+
defaultOptions.sheetName = value;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
})
|
|
244
|
+
])
|
|
245
|
+
])
|
|
246
|
+
: _e(),
|
|
247
|
+
h('tr', [
|
|
248
|
+
h('td', getI18n('vxe.export.expMode')),
|
|
249
|
+
h('td', [
|
|
250
|
+
h('vxe-select', {
|
|
251
|
+
props: {
|
|
252
|
+
value: defaultOptions.mode,
|
|
253
|
+
options: storeData.modeList
|
|
254
|
+
},
|
|
255
|
+
on: {
|
|
256
|
+
input(value) {
|
|
257
|
+
defaultOptions.mode = value;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
})
|
|
261
|
+
])
|
|
262
|
+
]),
|
|
263
|
+
h('tr', [
|
|
264
|
+
h('td', [getI18n('vxe.export.expColumn')]),
|
|
265
|
+
h('td', [
|
|
266
|
+
h('div', {
|
|
267
|
+
class: 'vxe-table-export--panel-column'
|
|
268
|
+
}, [
|
|
269
|
+
h('ul', {
|
|
270
|
+
class: 'vxe-table-export--panel-column-header'
|
|
271
|
+
}, [
|
|
272
|
+
h('li', {
|
|
273
|
+
class: ['vxe-table-export--panel-column-option', {
|
|
274
|
+
'is--checked': isAllChecked,
|
|
275
|
+
'is--indeterminate': isAllIndeterminate
|
|
276
|
+
}],
|
|
277
|
+
attrs: {
|
|
278
|
+
title: getI18n('vxe.table.allTitle')
|
|
279
|
+
},
|
|
280
|
+
on: {
|
|
281
|
+
click: this.allColumnEvent
|
|
282
|
+
}
|
|
283
|
+
}, [
|
|
284
|
+
h('span', {
|
|
285
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
286
|
+
}),
|
|
287
|
+
h('span', {
|
|
288
|
+
class: 'vxe-checkbox--label'
|
|
289
|
+
}, getI18n('vxe.export.expCurrentColumn'))
|
|
290
|
+
])
|
|
291
|
+
]),
|
|
292
|
+
h('ul', {
|
|
293
|
+
class: 'vxe-table-export--panel-column-body'
|
|
294
|
+
}, cols)
|
|
295
|
+
])
|
|
296
|
+
])
|
|
297
|
+
]),
|
|
298
|
+
h('tr', [
|
|
299
|
+
h('td', getI18n('vxe.export.expOpts')),
|
|
300
|
+
parameterSlot
|
|
301
|
+
? h('td', [
|
|
302
|
+
h('div', {
|
|
303
|
+
class: 'vxe-table-export--panel-option-row'
|
|
304
|
+
}, $xeTable.callSlot(parameterSlot, params))
|
|
305
|
+
])
|
|
306
|
+
: h('td', [
|
|
307
|
+
h('div', {
|
|
308
|
+
class: 'vxe-table-export--panel-option-row'
|
|
309
|
+
}, [
|
|
310
|
+
h('vxe-checkbox', {
|
|
311
|
+
props: {
|
|
312
|
+
value: isHeader,
|
|
313
|
+
title: getI18n('vxe.export.expHeaderTitle'),
|
|
314
|
+
content: getI18n('vxe.export.expOptHeader')
|
|
315
|
+
},
|
|
316
|
+
on: {
|
|
317
|
+
input(value) {
|
|
318
|
+
defaultOptions.isHeader = value;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}),
|
|
322
|
+
h('vxe-checkbox', {
|
|
323
|
+
props: {
|
|
324
|
+
value: defaultOptions.isFooter,
|
|
325
|
+
disabled: !storeData.hasFooter,
|
|
326
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
327
|
+
content: getI18n('vxe.export.expOptFooter')
|
|
328
|
+
},
|
|
329
|
+
on: {
|
|
330
|
+
input(value) {
|
|
331
|
+
defaultOptions.isFooter = value;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}),
|
|
335
|
+
h('vxe-checkbox', {
|
|
336
|
+
props: {
|
|
337
|
+
value: defaultOptions.original,
|
|
338
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
339
|
+
content: getI18n('vxe.export.expOptOriginal')
|
|
340
|
+
},
|
|
341
|
+
on: {
|
|
342
|
+
input(value) {
|
|
343
|
+
defaultOptions.original = value;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
})
|
|
347
|
+
]),
|
|
348
|
+
h('div', {
|
|
349
|
+
class: 'vxe-table-export--panel-option-row'
|
|
350
|
+
}, [
|
|
351
|
+
h('vxe-checkbox', {
|
|
352
|
+
props: {
|
|
353
|
+
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
354
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
355
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
356
|
+
content: getI18n('vxe.export.expOptColgroup')
|
|
357
|
+
},
|
|
358
|
+
on: {
|
|
359
|
+
input(value) {
|
|
360
|
+
defaultOptions.isColgroup = value;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}),
|
|
364
|
+
h('vxe-checkbox', {
|
|
365
|
+
props: {
|
|
366
|
+
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
367
|
+
disabled: !hasMerge || !supportMerge || !checkedAll,
|
|
368
|
+
title: getI18n('vxe.export.expMergeTitle'),
|
|
369
|
+
content: getI18n('vxe.export.expOptMerge')
|
|
370
|
+
},
|
|
371
|
+
on: {
|
|
372
|
+
input(value) {
|
|
373
|
+
defaultOptions.isMerge = value;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}),
|
|
377
|
+
isPrint
|
|
378
|
+
? _e()
|
|
379
|
+
: h('vxe-checkbox', {
|
|
380
|
+
props: {
|
|
381
|
+
value: supportStyle ? defaultOptions.useStyle : false,
|
|
382
|
+
disabled: !supportStyle,
|
|
383
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
384
|
+
content: getI18n('vxe.export.expOptUseStyle')
|
|
385
|
+
},
|
|
386
|
+
on: {
|
|
387
|
+
input(value) {
|
|
388
|
+
defaultOptions.useStyle = value;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}),
|
|
392
|
+
h('vxe-checkbox', {
|
|
393
|
+
props: {
|
|
394
|
+
value: hasTree ? defaultOptions.isAllExpand : false,
|
|
395
|
+
disabled: !hasTree,
|
|
396
|
+
title: getI18n('vxe.export.expAllExpandTitle'),
|
|
397
|
+
content: getI18n('vxe.export.expOptAllExpand')
|
|
398
|
+
},
|
|
399
|
+
on: {
|
|
400
|
+
input(value) {
|
|
401
|
+
defaultOptions.isAllExpand = value;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
})
|
|
405
|
+
])
|
|
406
|
+
])
|
|
253
407
|
])
|
|
254
|
-
]
|
|
255
|
-
h('ul', {
|
|
256
|
-
class: 'vxe-export--panel-column-body'
|
|
257
|
-
}, cols)
|
|
408
|
+
]
|
|
258
409
|
])
|
|
259
410
|
])
|
|
260
411
|
]),
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
})
|
|
304
|
-
]),
|
|
305
|
-
h('div', {
|
|
306
|
-
class: 'vxe-export--panel-option-row'
|
|
307
|
-
}, [
|
|
308
|
-
h('vxe-checkbox', {
|
|
309
|
-
props: {
|
|
310
|
-
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
311
|
-
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
312
|
-
title: getI18n('vxe.export.expColgroupTitle'),
|
|
313
|
-
content: getI18n('vxe.export.expOptColgroup')
|
|
314
|
-
},
|
|
315
|
-
on: {
|
|
316
|
-
input(value) {
|
|
317
|
-
defaultOptions.isColgroup = value;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}),
|
|
321
|
-
h('vxe-checkbox', {
|
|
322
|
-
props: {
|
|
323
|
-
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
324
|
-
disabled: !hasMerge || !supportMerge || !checkedAll,
|
|
325
|
-
title: getI18n('vxe.export.expMergeTitle'),
|
|
326
|
-
content: getI18n('vxe.export.expOptMerge')
|
|
327
|
-
},
|
|
328
|
-
on: {
|
|
329
|
-
input(value) {
|
|
330
|
-
defaultOptions.isMerge = value;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
}),
|
|
334
|
-
isPrint
|
|
335
|
-
? _e()
|
|
336
|
-
: h('vxe-checkbox', {
|
|
337
|
-
props: {
|
|
338
|
-
value: supportStyle ? defaultOptions.useStyle : false,
|
|
339
|
-
disabled: !supportStyle,
|
|
340
|
-
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
341
|
-
content: getI18n('vxe.export.expOptUseStyle')
|
|
342
|
-
},
|
|
343
|
-
on: {
|
|
344
|
-
input(value) {
|
|
345
|
-
defaultOptions.useStyle = value;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}),
|
|
349
|
-
h('vxe-checkbox', {
|
|
350
|
-
props: {
|
|
351
|
-
value: hasTree ? defaultOptions.isAllExpand : false,
|
|
352
|
-
disabled: !hasTree,
|
|
353
|
-
title: getI18n('vxe.export.expAllExpandTitle'),
|
|
354
|
-
content: getI18n('vxe.export.expOptAllExpand')
|
|
355
|
-
},
|
|
356
|
-
on: {
|
|
357
|
-
input(value) {
|
|
358
|
-
defaultOptions.isAllExpand = value;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
})
|
|
362
|
-
])
|
|
363
|
-
])
|
|
412
|
+
bottomSlot
|
|
413
|
+
? h('div', {
|
|
414
|
+
class: 'vxe-table-export--panel-bottom'
|
|
415
|
+
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
416
|
+
: renderEmptyElement(this)
|
|
417
|
+
]);
|
|
418
|
+
},
|
|
419
|
+
footer: () => {
|
|
420
|
+
const params = {
|
|
421
|
+
$table: $xeTable,
|
|
422
|
+
$grid: $xeTable.xegrid,
|
|
423
|
+
options: exportOpts,
|
|
424
|
+
columns,
|
|
425
|
+
params: exportOpts.params
|
|
426
|
+
};
|
|
427
|
+
return h('div', {
|
|
428
|
+
class: 'vxe-table-export--panel-footer'
|
|
429
|
+
}, footerSlot
|
|
430
|
+
? $xeTable.callSlot(footerSlot, params)
|
|
431
|
+
: [
|
|
432
|
+
h('div', {
|
|
433
|
+
class: 'vxe-table-export--panel-btns'
|
|
434
|
+
}, [
|
|
435
|
+
h('vxe-button', {
|
|
436
|
+
props: {
|
|
437
|
+
content: getI18n('vxe.export.expCancel')
|
|
438
|
+
},
|
|
439
|
+
on: {
|
|
440
|
+
click: this.cancelEvent
|
|
441
|
+
}
|
|
442
|
+
}),
|
|
443
|
+
h('vxe-button', {
|
|
444
|
+
ref: 'confirmBtn',
|
|
445
|
+
props: {
|
|
446
|
+
status: 'primary',
|
|
447
|
+
content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
|
|
448
|
+
},
|
|
449
|
+
on: {
|
|
450
|
+
click: this.confirmEvent
|
|
451
|
+
}
|
|
452
|
+
})
|
|
364
453
|
])
|
|
365
|
-
]
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
class: 'vxe-export--panel-btns'
|
|
370
|
-
}, [
|
|
371
|
-
h('vxe-button', {
|
|
372
|
-
props: {
|
|
373
|
-
content: getI18n('vxe.export.expCancel')
|
|
374
|
-
},
|
|
375
|
-
on: {
|
|
376
|
-
click: this.cancelEvent
|
|
377
|
-
}
|
|
378
|
-
}),
|
|
379
|
-
h('vxe-button', {
|
|
380
|
-
ref: 'confirmBtn',
|
|
381
|
-
props: {
|
|
382
|
-
status: 'primary',
|
|
383
|
-
content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
|
|
384
|
-
},
|
|
385
|
-
on: {
|
|
386
|
-
click: this.confirmEvent
|
|
387
|
-
}
|
|
388
|
-
})
|
|
389
|
-
])
|
|
390
|
-
])
|
|
391
|
-
]);
|
|
454
|
+
]);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
392
458
|
},
|
|
393
459
|
methods: {
|
|
394
460
|
changeOption(column) {
|
|
@@ -463,9 +529,10 @@ export default {
|
|
|
463
529
|
$xetable.print(Object.assign({}, $xetable.printOpts, this.getExportOption()));
|
|
464
530
|
},
|
|
465
531
|
exportEvent() {
|
|
466
|
-
const $
|
|
532
|
+
const $xeTable = this.$xeTable;
|
|
533
|
+
const exportOpts = $xeTable.exportOpts;
|
|
467
534
|
this.loading = true;
|
|
468
|
-
$
|
|
535
|
+
$xeTable.exportData(Object.assign({}, exportOpts, this.getExportOption())).then(() => {
|
|
469
536
|
this.loading = false;
|
|
470
537
|
this.storeData.visible = false;
|
|
471
538
|
}).catch(() => {
|