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.
Files changed (102) hide show
  1. package/es/locale/lang/en-US.js +1 -0
  2. package/es/locale/lang/es-ES.js +1 -0
  3. package/es/locale/lang/hu-HU.js +1 -0
  4. package/es/locale/lang/ja-JP.js +1 -0
  5. package/es/locale/lang/ko-KR.js +1 -0
  6. package/es/locale/lang/pt-BR.js +1 -0
  7. package/es/locale/lang/ru-RU.js +1 -0
  8. package/es/locale/lang/uk-UA.js +1 -0
  9. package/es/locale/lang/vi-VN.js +1 -0
  10. package/es/locale/lang/zh-CHT.js +1 -0
  11. package/es/locale/lang/zh-CN.js +1 -0
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/table/module/export/export-panel.js +325 -258
  15. package/es/table/module/export/import-panel.js +138 -81
  16. package/es/table/module/export/mixin.js +14 -0
  17. package/es/table/src/body.js +1 -1
  18. package/es/table/src/methods.js +10 -3
  19. package/es/table/style.css +48 -47
  20. package/es/table/style.min.css +1 -1
  21. package/es/ui/index.js +1 -1
  22. package/es/ui/src/log.js +1 -1
  23. package/es/vxe-table/style.css +48 -47
  24. package/es/vxe-table/style.min.css +1 -1
  25. package/lib/index.umd.js +368 -243
  26. package/lib/index.umd.min.js +1 -1
  27. package/lib/locale/lang/en-US.js +1 -0
  28. package/lib/locale/lang/en-US.min.js +1 -1
  29. package/lib/locale/lang/en-US.umd.js +1 -0
  30. package/lib/locale/lang/es-ES.js +1 -0
  31. package/lib/locale/lang/es-ES.min.js +1 -1
  32. package/lib/locale/lang/es-ES.umd.js +1 -0
  33. package/lib/locale/lang/hu-HU.js +1 -0
  34. package/lib/locale/lang/hu-HU.min.js +1 -1
  35. package/lib/locale/lang/hu-HU.umd.js +1 -0
  36. package/lib/locale/lang/ja-JP.js +1 -0
  37. package/lib/locale/lang/ja-JP.min.js +1 -1
  38. package/lib/locale/lang/ja-JP.umd.js +1 -0
  39. package/lib/locale/lang/ko-KR.js +1 -0
  40. package/lib/locale/lang/ko-KR.min.js +1 -1
  41. package/lib/locale/lang/ko-KR.umd.js +1 -0
  42. package/lib/locale/lang/pt-BR.js +1 -0
  43. package/lib/locale/lang/pt-BR.min.js +1 -1
  44. package/lib/locale/lang/pt-BR.umd.js +1 -0
  45. package/lib/locale/lang/ru-RU.js +1 -0
  46. package/lib/locale/lang/ru-RU.min.js +1 -1
  47. package/lib/locale/lang/ru-RU.umd.js +1 -0
  48. package/lib/locale/lang/uk-UA.js +1 -0
  49. package/lib/locale/lang/uk-UA.min.js +1 -1
  50. package/lib/locale/lang/uk-UA.umd.js +1 -0
  51. package/lib/locale/lang/vi-VN.js +1 -0
  52. package/lib/locale/lang/vi-VN.min.js +1 -1
  53. package/lib/locale/lang/zh-CHT.js +1 -0
  54. package/lib/locale/lang/zh-CHT.min.js +1 -1
  55. package/lib/locale/lang/zh-CHT.umd.js +1 -0
  56. package/lib/locale/lang/zh-CN.js +1 -0
  57. package/lib/locale/lang/zh-CN.min.js +1 -1
  58. package/lib/locale/lang/zh-CN.umd.js +1 -0
  59. package/lib/style.css +1 -1
  60. package/lib/style.min.css +1 -1
  61. package/lib/table/module/export/export-panel.js +239 -185
  62. package/lib/table/module/export/export-panel.min.js +1 -1
  63. package/lib/table/module/export/import-panel.js +99 -52
  64. package/lib/table/module/export/import-panel.min.js +1 -1
  65. package/lib/table/module/export/mixin.js +14 -0
  66. package/lib/table/module/export/mixin.min.js +1 -1
  67. package/lib/table/src/body.js +1 -1
  68. package/lib/table/src/body.min.js +1 -1
  69. package/lib/table/src/methods.js +12 -3
  70. package/lib/table/src/methods.min.js +1 -1
  71. package/lib/table/style/style.css +48 -47
  72. package/lib/table/style/style.min.css +1 -1
  73. package/lib/ui/index.js +1 -1
  74. package/lib/ui/index.min.js +1 -1
  75. package/lib/ui/src/log.js +1 -1
  76. package/lib/ui/src/log.min.js +1 -1
  77. package/lib/vxe-table/style/style.css +48 -47
  78. package/lib/vxe-table/style/style.min.css +1 -1
  79. package/package.json +2 -2
  80. package/packages/locale/lang/en-US.ts +1 -0
  81. package/packages/locale/lang/es-ES.ts +1 -0
  82. package/packages/locale/lang/hu-HU.ts +1 -0
  83. package/packages/locale/lang/ja-JP.ts +1 -0
  84. package/packages/locale/lang/ko-KR.ts +1 -0
  85. package/packages/locale/lang/pt-BR.ts +1 -0
  86. package/packages/locale/lang/ru-RU.ts +1 -0
  87. package/packages/locale/lang/uk-UA.ts +1 -0
  88. package/packages/locale/lang/vi-VN.ts +1 -0
  89. package/packages/locale/lang/zh-CHT.ts +1 -0
  90. package/packages/locale/lang/zh-CN.ts +1 -0
  91. package/packages/table/module/export/export-panel.ts +323 -253
  92. package/packages/table/module/export/import-panel.ts +141 -79
  93. package/packages/table/module/export/mixin.ts +15 -0
  94. package/packages/table/src/body.ts +1 -1
  95. package/packages/table/src/methods.ts +11 -3
  96. package/styles/components/table-module/export.scss +17 -14
  97. /package/es/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
  98. /package/es/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
  99. /package/es/{iconfont.1730365807487.woff2 → iconfont.1730454529299.woff2} +0 -0
  100. /package/lib/{iconfont.1730365807487.ttf → iconfont.1730454529299.ttf} +0 -0
  101. /package/lib/{iconfont.1730365807487.woff → iconfont.1730454529299.woff} +0 -0
  102. /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(storeData.columns, column => {
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: false,
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
- h('div', {
139
- class: 'vxe-export--panel'
140
- }, [
141
- h('table', {
142
- attrs: {
143
- cellspacing: 0,
144
- cellpadding: 0,
145
- border: 0
146
- }
147
- }, [
148
- h('tbody', [
149
- [
150
- isPrint
151
- ? _e()
152
- : h('tr', [
153
- h('td', getI18n('vxe.export.expName')),
154
- h('td', [
155
- h('vxe-input', {
156
- ref: 'filename',
157
- props: {
158
- value: defaultOptions.filename,
159
- type: 'text',
160
- clearable: true,
161
- placeholder: getI18n('vxe.export.expNamePlaceholder')
162
- },
163
- on: {
164
- modelValue(value) {
165
- defaultOptions.filename = value;
166
- }
167
- }
168
- })
169
- ])
170
- ]),
171
- isPrint
172
- ? _e()
173
- : h('tr', [
174
- h('td', getI18n('vxe.export.expType')),
175
- h('td', [
176
- h('vxe-select', {
177
- props: {
178
- value: defaultOptions.type,
179
- options: storeData.typeList
180
- },
181
- on: {
182
- input(value) {
183
- defaultOptions.type = value;
184
- }
185
- }
186
- })
187
- ])
188
- ]),
189
- isPrint || showSheet
190
- ? h('tr', [
191
- h('td', getI18n('vxe.export.expSheetName')),
192
- h('td', [
193
- h('vxe-input', {
194
- ref: 'sheetname',
195
- props: {
196
- value: defaultOptions.sheetName,
197
- type: 'text',
198
- clearable: true,
199
- placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
200
- },
201
- on: {
202
- modelValue(value) {
203
- defaultOptions.sheetName = value;
204
- }
205
- }
206
- })
207
- ])
208
- ])
209
- : _e(),
210
- h('tr', [
211
- h('td', getI18n('vxe.export.expMode')),
212
- h('td', [
213
- h('vxe-select', {
214
- props: {
215
- value: defaultOptions.mode,
216
- options: storeData.modeList
217
- },
218
- on: {
219
- input(value) {
220
- defaultOptions.mode = value;
221
- }
222
- }
223
- })
224
- ])
225
- ]),
226
- h('tr', [
227
- h('td', [getI18n('vxe.export.expColumn')]),
228
- h('td', [
229
- h('div', {
230
- class: 'vxe-export--panel-column'
231
- }, [
232
- h('ul', {
233
- class: 'vxe-export--panel-column-header'
234
- }, [
235
- h('li', {
236
- class: ['vxe-export--panel-column-option', {
237
- 'is--checked': isAllChecked,
238
- 'is--indeterminate': isAllIndeterminate
239
- }],
240
- attrs: {
241
- title: getI18n('vxe.table.allTitle')
242
- },
243
- on: {
244
- click: this.allColumnEvent
245
- }
246
- }, [
247
- h('span', {
248
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
249
- }),
250
- h('span', {
251
- class: 'vxe-checkbox--label'
252
- }, getI18n('vxe.export.expCurrentColumn'))
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
- h('tr', [
262
- h('td', getI18n('vxe.export.expOpts')),
263
- h('td', [
264
- h('div', {
265
- class: 'vxe-export--panel-option-row'
266
- }, [
267
- h('vxe-checkbox', {
268
- props: {
269
- value: isHeader,
270
- title: getI18n('vxe.export.expHeaderTitle'),
271
- content: getI18n('vxe.export.expOptHeader')
272
- },
273
- on: {
274
- input(value) {
275
- defaultOptions.isHeader = value;
276
- }
277
- }
278
- }),
279
- h('vxe-checkbox', {
280
- props: {
281
- value: defaultOptions.isFooter,
282
- disabled: !storeData.hasFooter,
283
- title: getI18n('vxe.export.expFooterTitle'),
284
- content: getI18n('vxe.export.expOptFooter')
285
- },
286
- on: {
287
- input(value) {
288
- defaultOptions.isFooter = value;
289
- }
290
- }
291
- }),
292
- h('vxe-checkbox', {
293
- props: {
294
- value: defaultOptions.original,
295
- title: getI18n('vxe.export.expOriginalTitle'),
296
- content: getI18n('vxe.export.expOptOriginal')
297
- },
298
- on: {
299
- input(value) {
300
- defaultOptions.original = value;
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
- h('div', {
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 $xetable = this.$parent;
532
+ const $xeTable = this.$xeTable;
533
+ const exportOpts = $xeTable.exportOpts;
467
534
  this.loading = true;
468
- $xetable.exportData(Object.assign({}, $xetable.exportOpts, this.getExportOption())).then(() => {
535
+ $xeTable.exportData(Object.assign({}, exportOpts, this.getExportOption())).then(() => {
469
536
  this.loading = false;
470
537
  this.storeData.visible = false;
471
538
  }).catch(() => {