vxe-table 3.22.2 → 3.22.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 (164) hide show
  1. package/es/locale/lang/ar-EG.js +7 -0
  2. package/es/locale/lang/de-DE.js +7 -0
  3. package/es/locale/lang/en-US.js +7 -0
  4. package/es/locale/lang/es-ES.js +7 -0
  5. package/es/locale/lang/fr-FR.js +7 -0
  6. package/es/locale/lang/hu-HU.js +7 -0
  7. package/es/locale/lang/hy-AM.js +7 -0
  8. package/es/locale/lang/id-ID.js +7 -0
  9. package/es/locale/lang/it-IT.js +7 -0
  10. package/es/locale/lang/ja-JP.js +7 -0
  11. package/es/locale/lang/ko-KR.js +7 -0
  12. package/es/locale/lang/ms-MY.js +7 -0
  13. package/es/locale/lang/nb-NO.js +7 -0
  14. package/es/locale/lang/pt-BR.js +7 -0
  15. package/es/locale/lang/ru-RU.js +7 -0
  16. package/es/locale/lang/th-TH.js +7 -0
  17. package/es/locale/lang/ug-CN.js +7 -0
  18. package/es/locale/lang/uk-UA.js +7 -0
  19. package/es/locale/lang/uz-UZ.js +7 -0
  20. package/es/locale/lang/vi-VN.js +7 -0
  21. package/es/locale/lang/zh-CHT.js +7 -0
  22. package/es/locale/lang/zh-CN.js +7 -0
  23. package/es/style.css +1 -1
  24. package/es/table/module/export/export-panel.js +384 -335
  25. package/es/table/module/export/mixin.js +106 -28
  26. package/es/table/module/export/util.js +1 -1
  27. package/es/table/src/body.js +1 -1
  28. package/es/table/src/footer.js +1 -1
  29. package/es/table/src/header.js +5 -3
  30. package/es/table/src/methods.js +30 -12
  31. package/es/table/src/table.js +24 -24
  32. package/es/table/src/util.js +1 -0
  33. package/es/ui/index.js +2 -1
  34. package/es/ui/src/log.js +1 -1
  35. package/lib/index.umd.js +210 -87
  36. package/lib/index.umd.min.js +1 -1
  37. package/lib/locale/lang/ar-EG.js +7 -0
  38. package/lib/locale/lang/ar-EG.min.js +1 -1
  39. package/lib/locale/lang/ar-EG.umd.js +7 -0
  40. package/lib/locale/lang/de-DE.js +7 -0
  41. package/lib/locale/lang/de-DE.min.js +1 -1
  42. package/lib/locale/lang/de-DE.umd.js +7 -0
  43. package/lib/locale/lang/en-US.js +7 -0
  44. package/lib/locale/lang/en-US.min.js +1 -1
  45. package/lib/locale/lang/en-US.umd.js +7 -0
  46. package/lib/locale/lang/es-ES.js +7 -0
  47. package/lib/locale/lang/es-ES.min.js +1 -1
  48. package/lib/locale/lang/es-ES.umd.js +7 -0
  49. package/lib/locale/lang/fr-FR.js +7 -0
  50. package/lib/locale/lang/fr-FR.min.js +1 -1
  51. package/lib/locale/lang/fr-FR.umd.js +7 -0
  52. package/lib/locale/lang/hu-HU.js +7 -0
  53. package/lib/locale/lang/hu-HU.min.js +1 -1
  54. package/lib/locale/lang/hu-HU.umd.js +7 -0
  55. package/lib/locale/lang/hy-AM.js +7 -0
  56. package/lib/locale/lang/hy-AM.min.js +1 -1
  57. package/lib/locale/lang/hy-AM.umd.js +7 -0
  58. package/lib/locale/lang/id-ID.js +7 -0
  59. package/lib/locale/lang/id-ID.min.js +1 -1
  60. package/lib/locale/lang/id-ID.umd.js +7 -0
  61. package/lib/locale/lang/it-IT.js +7 -0
  62. package/lib/locale/lang/it-IT.min.js +1 -1
  63. package/lib/locale/lang/it-IT.umd.js +7 -0
  64. package/lib/locale/lang/ja-JP.js +7 -0
  65. package/lib/locale/lang/ja-JP.min.js +1 -1
  66. package/lib/locale/lang/ja-JP.umd.js +7 -0
  67. package/lib/locale/lang/ko-KR.js +7 -0
  68. package/lib/locale/lang/ko-KR.min.js +1 -1
  69. package/lib/locale/lang/ko-KR.umd.js +7 -0
  70. package/lib/locale/lang/ms-MY.js +7 -0
  71. package/lib/locale/lang/ms-MY.min.js +1 -1
  72. package/lib/locale/lang/ms-MY.umd.js +7 -0
  73. package/lib/locale/lang/nb-NO.js +7 -0
  74. package/lib/locale/lang/nb-NO.min.js +1 -1
  75. package/lib/locale/lang/nb-NO.umd.js +7 -0
  76. package/lib/locale/lang/pt-BR.js +7 -0
  77. package/lib/locale/lang/pt-BR.min.js +1 -1
  78. package/lib/locale/lang/pt-BR.umd.js +7 -0
  79. package/lib/locale/lang/ru-RU.js +7 -0
  80. package/lib/locale/lang/ru-RU.min.js +1 -1
  81. package/lib/locale/lang/ru-RU.umd.js +7 -0
  82. package/lib/locale/lang/th-TH.js +7 -0
  83. package/lib/locale/lang/th-TH.min.js +1 -1
  84. package/lib/locale/lang/th-TH.umd.js +7 -0
  85. package/lib/locale/lang/ug-CN.js +7 -0
  86. package/lib/locale/lang/ug-CN.min.js +1 -1
  87. package/lib/locale/lang/ug-CN.umd.js +7 -0
  88. package/lib/locale/lang/uk-UA.js +7 -0
  89. package/lib/locale/lang/uk-UA.min.js +1 -1
  90. package/lib/locale/lang/uk-UA.umd.js +7 -0
  91. package/lib/locale/lang/uz-UZ.js +7 -0
  92. package/lib/locale/lang/uz-UZ.min.js +1 -1
  93. package/lib/locale/lang/uz-UZ.umd.js +7 -0
  94. package/lib/locale/lang/vi-VN.js +7 -0
  95. package/lib/locale/lang/vi-VN.min.js +1 -1
  96. package/lib/locale/lang/vi-VN.umd.js +7 -0
  97. package/lib/locale/lang/zh-CHT.js +7 -0
  98. package/lib/locale/lang/zh-CHT.min.js +1 -1
  99. package/lib/locale/lang/zh-CHT.umd.js +7 -0
  100. package/lib/locale/lang/zh-CN.js +7 -0
  101. package/lib/locale/lang/zh-CN.min.js +1 -1
  102. package/lib/locale/lang/zh-CN.umd.js +7 -0
  103. package/lib/style.css +1 -1
  104. package/lib/table/module/export/export-panel.js +50 -22
  105. package/lib/table/module/export/export-panel.min.js +1 -1
  106. package/lib/table/module/export/mixin.js +106 -28
  107. package/lib/table/module/export/mixin.min.js +1 -1
  108. package/lib/table/module/export/util.js +1 -1
  109. package/lib/table/module/export/util.min.js +1 -1
  110. package/lib/table/src/body.js +1 -1
  111. package/lib/table/src/body.min.js +1 -1
  112. package/lib/table/src/footer.js +1 -1
  113. package/lib/table/src/footer.min.js +1 -1
  114. package/lib/table/src/header.js +5 -3
  115. package/lib/table/src/header.min.js +1 -1
  116. package/lib/table/src/methods.js +7 -7
  117. package/lib/table/src/methods.min.js +1 -1
  118. package/lib/table/src/table.js +28 -22
  119. package/lib/table/src/table.min.js +1 -1
  120. package/lib/table/src/util.js +1 -0
  121. package/lib/table/src/util.min.js +1 -1
  122. package/lib/ui/index.js +2 -1
  123. package/lib/ui/index.min.js +1 -1
  124. package/lib/ui/src/log.js +1 -1
  125. package/lib/ui/src/log.min.js +1 -1
  126. package/package.json +2 -2
  127. package/packages/locale/lang/ar-EG.ts +7 -0
  128. package/packages/locale/lang/de-DE.ts +7 -0
  129. package/packages/locale/lang/en-US.ts +7 -0
  130. package/packages/locale/lang/es-ES.ts +7 -0
  131. package/packages/locale/lang/fr-FR.ts +7 -0
  132. package/packages/locale/lang/hu-HU.ts +7 -0
  133. package/packages/locale/lang/hy-AM.ts +7 -0
  134. package/packages/locale/lang/id-ID.ts +7 -0
  135. package/packages/locale/lang/it-IT.ts +7 -0
  136. package/packages/locale/lang/ja-JP.ts +7 -0
  137. package/packages/locale/lang/ko-KR.ts +7 -0
  138. package/packages/locale/lang/ms-MY.ts +7 -0
  139. package/packages/locale/lang/nb-NO.ts +7 -0
  140. package/packages/locale/lang/pt-BR.ts +7 -0
  141. package/packages/locale/lang/ru-RU.ts +7 -0
  142. package/packages/locale/lang/th-TH.ts +7 -0
  143. package/packages/locale/lang/ug-CN.ts +7 -0
  144. package/packages/locale/lang/uk-UA.ts +7 -0
  145. package/packages/locale/lang/uz-UZ.ts +7 -0
  146. package/packages/locale/lang/vi-VN.ts +7 -0
  147. package/packages/locale/lang/zh-CHT.ts +7 -0
  148. package/packages/locale/lang/zh-CN.ts +7 -0
  149. package/packages/table/module/export/export-panel.ts +383 -333
  150. package/packages/table/module/export/mixin.ts +130 -46
  151. package/packages/table/module/export/util.ts +1 -1
  152. package/packages/table/src/body.ts +1 -1
  153. package/packages/table/src/footer.ts +1 -1
  154. package/packages/table/src/header.ts +5 -3
  155. package/packages/table/src/methods.ts +38 -17
  156. package/packages/table/src/table.ts +24 -24
  157. package/packages/table/src/util.ts +3 -2
  158. package/packages/ui/index.ts +1 -0
  159. /package/es/{iconfont.1784122379007.ttf → iconfont.1784366371085.ttf} +0 -0
  160. /package/es/{iconfont.1784122379007.woff → iconfont.1784366371085.woff} +0 -0
  161. /package/es/{iconfont.1784122379007.woff2 → iconfont.1784366371085.woff2} +0 -0
  162. /package/lib/{iconfont.1784122379007.ttf → iconfont.1784366371085.ttf} +0 -0
  163. /package/lib/{iconfont.1784122379007.woff → iconfont.1784366371085.woff} +0 -0
  164. /package/lib/{iconfont.1784122379007.woff2 → iconfont.1784366371085.woff2} +0 -0
@@ -35,7 +35,14 @@ export default {
35
35
  reactData
36
36
  };
37
37
  },
38
- computed: Object.assign(Object.assign({}, {}), { computeCheckedAll() {
38
+ computed: Object.assign(Object.assign({}, {}), { computeColWidthModeOptions() {
39
+ return [
40
+ { value: '', label: getI18n('vxe.export.wdModes.default') },
41
+ { value: 'auto', label: getI18n('vxe.export.wdModes.auto') },
42
+ { value: 'scale', label: getI18n('vxe.export.wdModes.scale') }
43
+ ];
44
+ },
45
+ computeCheckedAll() {
39
46
  const $xeExportPanel = this;
40
47
  const props = $xeExportPanel;
41
48
  const { storeData } = props;
@@ -203,6 +210,11 @@ export default {
203
210
  });
204
211
  },
205
212
  renderVN(h) {
213
+ const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
214
+ const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
215
+ const VxeUISelectComponent = VxeUI.getComponent('VxeSelect');
216
+ const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
217
+ const VxeUICheckboxComponent = VxeUI.getComponent('VxeCheckbox');
206
218
  const $xeExportPanel = this;
207
219
  const props = $xeExportPanel;
208
220
  const reactData = $xeExportPanel.reactData;
@@ -218,6 +230,7 @@ export default {
218
230
  const showSheet = $xeExportPanel.computeShowSheet;
219
231
  const supportMerge = $xeExportPanel.computeSupportMerge;
220
232
  const supportStyle = $xeExportPanel.computeSupportStyle;
233
+ const colWidthModeOptions = $xeExportPanel.computeColWidthModeOptions;
221
234
  // const supportGroup = $xeExportPanel.computeSupportGroup
222
235
  const slots = defaultOptions.slots || {};
223
236
  const topSlot = slots.top;
@@ -266,368 +279,404 @@ export default {
266
279
  }, colTitle)
267
280
  ]));
268
281
  });
269
- return h('vxe-modal', {
270
- ref: 'modal',
271
- props: {
272
- id: 'VXE_EXPORT_MODAL',
273
- value: storeData.visible,
274
- title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
275
- width: 660,
276
- minWidth: 500,
277
- minHeight: 400,
278
- mask: true,
279
- lockView: true,
280
- showFooter: true,
281
- escClosable: true,
282
- maskClosable: true,
283
- showMaximize: true,
284
- resize: true,
285
- loading: reactData.loading
286
- },
287
- on: {
288
- input(value) {
289
- storeData.visible = value;
282
+ return VxeUIModalComponent
283
+ ? h(VxeUIModalComponent, {
284
+ ref: 'modal',
285
+ props: {
286
+ id: 'VXE_EXPORT_MODAL',
287
+ value: storeData.visible,
288
+ title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
289
+ width: 660,
290
+ minWidth: 500,
291
+ minHeight: 400,
292
+ mask: true,
293
+ lockView: true,
294
+ showFooter: true,
295
+ escClosable: true,
296
+ maskClosable: true,
297
+ showMaximize: true,
298
+ resize: true,
299
+ loading: reactData.loading
290
300
  },
291
- show: $xeExportPanel.showEvent
292
- },
293
- scopedSlots: {
294
- default() {
295
- const params = {
296
- $table: $xeTable,
297
- $grid: $xeGrid,
298
- $gantt: $xeGantt,
299
- options: defaultOptions,
300
- columns,
301
- params: defaultOptions.params
302
- };
303
- const hasEmptyData = defaultOptions.mode === 'empty';
304
- return h('div', {
305
- class: 'vxe-table-export--panel'
306
- }, [
307
- topSlot
308
- ? h('div', {
309
- class: 'vxe-table-export--panel-top'
310
- }, $xeTable.callSlot(topSlot, params, h))
311
- : renderEmptyElement($xeTable),
312
- h('div', {
313
- class: 'vxe-table-export--panel-body'
314
- }, defaultSlot
315
- ? $xeTable.callSlot(defaultSlot, params, h)
316
- : [
317
- h('table', {
318
- attrs: {
319
- class: 'vxe-table-export--panel-table',
320
- cellspacing: 0,
321
- cellpadding: 0,
322
- border: 0
323
- }
324
- }, [
325
- h('tbody', [
326
- [
327
- isPrint
328
- ? renderEmptyElement($xeTable)
329
- : h('tr', [
330
- h('td', getI18n('vxe.export.expName')),
331
- h('td', [
332
- h('vxe-input', {
333
- ref: 'filename',
334
- props: {
335
- value: defaultOptions.filename,
336
- type: 'text',
337
- clearable: true,
338
- placeholder: getI18n('vxe.export.expNamePlaceholder')
339
- },
340
- on: {
341
- modelValue(value) {
342
- defaultOptions.filename = value;
301
+ on: {
302
+ input(value) {
303
+ storeData.visible = value;
304
+ },
305
+ show: $xeExportPanel.showEvent
306
+ },
307
+ scopedSlots: {
308
+ default() {
309
+ const params = {
310
+ $table: $xeTable,
311
+ $grid: $xeGrid,
312
+ $gantt: $xeGantt,
313
+ options: defaultOptions,
314
+ columns,
315
+ params: defaultOptions.params
316
+ };
317
+ const hasEmptyData = defaultOptions.mode === 'empty';
318
+ return h('div', {
319
+ class: 'vxe-table-export--panel'
320
+ }, [
321
+ topSlot
322
+ ? h('div', {
323
+ class: 'vxe-table-export--panel-top'
324
+ }, $xeTable.callSlot(topSlot, params, h))
325
+ : renderEmptyElement($xeTable),
326
+ h('div', {
327
+ class: 'vxe-table-export--panel-body'
328
+ }, defaultSlot
329
+ ? $xeTable.callSlot(defaultSlot, params, h)
330
+ : [
331
+ h('table', {
332
+ attrs: {
333
+ class: 'vxe-table-export--panel-table',
334
+ cellspacing: 0,
335
+ cellpadding: 0,
336
+ border: 0
337
+ }
338
+ }, [
339
+ h('tbody', [
340
+ [
341
+ isPrint
342
+ ? renderEmptyElement($xeTable)
343
+ : h('tr', [
344
+ h('td', getI18n('vxe.export.expName')),
345
+ h('td', [
346
+ VxeUIInputComponent
347
+ ? h(VxeUIInputComponent, {
348
+ ref: 'filename',
349
+ props: {
350
+ value: defaultOptions.filename,
351
+ type: 'text',
352
+ clearable: true,
353
+ placeholder: getI18n('vxe.export.expNamePlaceholder')
354
+ },
355
+ on: {
356
+ modelValue(value) {
357
+ defaultOptions.filename = value;
358
+ }
359
+ }
360
+ })
361
+ : renderEmptyElement($xeTable)
362
+ ])
363
+ ]),
364
+ isPrint
365
+ ? renderEmptyElement($xeTable)
366
+ : h('tr', [
367
+ h('td', getI18n('vxe.export.expType')),
368
+ h('td', [
369
+ h('vxe-select', {
370
+ props: {
371
+ value: defaultOptions.type,
372
+ options: storeData.typeList
373
+ },
374
+ on: {
375
+ modelValue(value) {
376
+ defaultOptions.type = value;
377
+ }
343
378
  }
344
- }
345
- })
379
+ })
380
+ ])
381
+ ]),
382
+ isPrint || showSheet
383
+ ? h('tr', [
384
+ h('td', getI18n('vxe.export.expSheetName')),
385
+ h('td', [
386
+ VxeUIInputComponent
387
+ ? h(VxeUIInputComponent, {
388
+ ref: 'sheetname',
389
+ props: {
390
+ value: defaultOptions.sheetName,
391
+ type: 'text',
392
+ clearable: true,
393
+ placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
394
+ },
395
+ on: {
396
+ modelValue(value) {
397
+ defaultOptions.sheetName = value;
398
+ }
399
+ }
400
+ })
401
+ : renderEmptyElement($xeTable)
402
+ ])
346
403
  ])
347
- ]),
348
- isPrint
349
- ? renderEmptyElement($xeTable)
350
- : h('tr', [
351
- h('td', getI18n('vxe.export.expType')),
404
+ : renderEmptyElement($xeTable),
405
+ h('tr', [
406
+ h('td', getI18n('vxe.export.expMode')),
352
407
  h('td', [
353
- h('vxe-select', {
408
+ h(VxeUISelectComponent, {
354
409
  props: {
355
- value: defaultOptions.type,
356
- options: storeData.typeList
410
+ value: defaultOptions.mode,
411
+ options: storeData.modeList
357
412
  },
358
413
  on: {
359
414
  modelValue(value) {
360
- defaultOptions.type = value;
415
+ defaultOptions.mode = value;
361
416
  }
362
417
  }
363
418
  })
364
419
  ])
365
420
  ]),
366
- isPrint || showSheet
367
- ? h('tr', [
368
- h('td', getI18n('vxe.export.expSheetName')),
421
+ h('tr', [
422
+ h('td', [getI18n('vxe.export.expColumn')]),
369
423
  h('td', [
370
- h('vxe-input', {
371
- ref: 'sheetname',
372
- props: {
373
- value: defaultOptions.sheetName,
374
- type: 'text',
375
- clearable: true,
376
- placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
377
- },
378
- on: {
379
- modelValue(value) {
380
- defaultOptions.sheetName = value;
381
- }
382
- }
383
- })
384
- ])
385
- ])
386
- : renderEmptyElement($xeTable),
387
- h('tr', [
388
- h('td', getI18n('vxe.export.expMode')),
389
- h('td', [
390
- h('vxe-select', {
391
- props: {
392
- value: defaultOptions.mode,
393
- options: storeData.modeList
394
- },
395
- on: {
396
- modelValue(value) {
397
- defaultOptions.mode = value;
398
- }
399
- }
400
- })
401
- ])
402
- ]),
403
- h('tr', [
404
- h('td', [getI18n('vxe.export.expColumn')]),
405
- h('td', [
406
- h('div', {
407
- class: 'vxe-table-export--panel-column'
408
- }, [
409
- h('ul', {
410
- class: 'vxe-table-export--panel-column-header'
411
- }, [
412
- h('li', {
413
- class: ['vxe-table-export--panel-column-option', {
414
- 'is--checked': isAllChecked,
415
- 'is--indeterminate': isAllIndeterminate
416
- }],
417
- attrs: {
418
- title: getI18n('vxe.table.allTitle')
419
- },
420
- on: {
421
- click: $xeExportPanel.allColumnEvent
422
- }
423
- }, [
424
- h('span', {
425
- class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
426
- }),
427
- h('span', {
428
- class: 'vxe-checkbox--label'
429
- }, getI18n('vxe.export.expCurrentColumn'))
430
- ])
431
- ]),
432
- h('ul', {
433
- class: 'vxe-table-export--panel-column-body'
434
- }, colVNs)
435
- ])
436
- ])
437
- ]),
438
- h('tr', [
439
- h('td', getI18n('vxe.export.expOpts')),
440
- parameterSlot
441
- ? h('td', [
442
424
  h('div', {
443
- class: 'vxe-table-export--panel-option-row'
444
- }, $xeTable.callSlot(parameterSlot, params, h))
445
- ])
446
- : h('td', [
447
- h('div', {
448
- class: 'vxe-table-export--panel-option-row'
425
+ class: 'vxe-table-export--panel-column'
449
426
  }, [
450
- h('vxe-checkbox', {
451
- props: {
452
- value: hasEmptyData || isHeader,
453
- disabled: hasEmptyData,
454
- title: getI18n('vxe.export.expHeaderTitle'),
455
- content: getI18n('vxe.export.expOptHeader')
456
- },
457
- on: {
458
- input(value) {
459
- defaultOptions.isHeader = value;
460
- }
461
- }
462
- }),
463
- h('vxe-checkbox', {
464
- props: {
465
- value: defaultOptions.isFooter,
466
- disabled: !storeData.hasFooter,
467
- title: getI18n('vxe.export.expFooterTitle'),
468
- content: getI18n('vxe.export.expOptFooter')
469
- },
470
- on: {
471
- input(value) {
472
- defaultOptions.isFooter = value;
473
- }
474
- }
475
- }),
476
- h('vxe-checkbox', {
477
- props: {
478
- value: isHeader ? defaultOptions.isTitle : false,
479
- disabled: !isHeader,
480
- title: getI18n('vxe.export.expTitleTitle'),
481
- content: getI18n('vxe.export.expOptTitle')
482
- },
483
- on: {
484
- input(value) {
485
- defaultOptions.isTitle = value;
486
- }
487
- }
488
- }),
489
- h('vxe-checkbox', {
490
- props: {
491
- value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
492
- disabled: !isHeader || !hasColgroup || !supportMerge,
493
- title: getI18n('vxe.export.expColgroupTitle'),
494
- content: getI18n('vxe.export.expOptColgroup')
495
- },
496
- on: {
497
- input(value) {
498
- defaultOptions.isColgroup = value;
499
- }
500
- }
501
- })
502
- ]),
503
- h('div', {
504
- class: 'vxe-table-export--panel-option-row'
505
- }, [
506
- h('vxe-checkbox', {
507
- props: {
508
- value: hasEmptyData ? false : defaultOptions.original,
509
- disabled: hasEmptyData,
510
- title: getI18n('vxe.export.expOriginalTitle'),
511
- content: getI18n('vxe.export.expOptOriginal')
512
- },
513
- on: {
514
- input(value) {
515
- defaultOptions.original = value;
516
- }
517
- }
518
- }),
519
- h('vxe-checkbox', {
520
- props: {
521
- value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
522
- disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
523
- title: getI18n('vxe.export.expMergeTitle'),
524
- content: getI18n('vxe.export.expOptMerge')
525
- },
526
- on: {
527
- input(value) {
528
- defaultOptions.isMerge = value;
427
+ h('ul', {
428
+ class: 'vxe-table-export--panel-column-header'
429
+ }, [
430
+ h('li', {
431
+ class: ['vxe-table-export--panel-column-option', {
432
+ 'is--checked': isAllChecked,
433
+ 'is--indeterminate': isAllIndeterminate
434
+ }],
435
+ attrs: {
436
+ title: getI18n('vxe.table.allTitle')
437
+ },
438
+ on: {
439
+ click: $xeExportPanel.allColumnEvent
529
440
  }
530
- }
531
- }),
532
- isPrint
533
- ? renderEmptyElement($xeTable)
534
- : h('vxe-checkbox', {
441
+ }, [
442
+ h('span', {
443
+ class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
444
+ }),
445
+ h('span', {
446
+ class: 'vxe-checkbox--label'
447
+ }, getI18n('vxe.export.expCurrentColumn'))
448
+ ])
449
+ ]),
450
+ h('ul', {
451
+ class: 'vxe-table-export--panel-column-body'
452
+ }, colVNs)
453
+ ])
454
+ ])
455
+ ]),
456
+ isPrint
457
+ ? h('tr', [
458
+ h('td', getI18n('vxe.export.widthMode')),
459
+ h('td', [
460
+ VxeUISelectComponent
461
+ ? h(VxeUISelectComponent, {
535
462
  props: {
536
- value: supportStyle ? defaultOptions.useStyle : false,
537
- disabled: !supportStyle,
538
- title: getI18n('vxe.export.expUseStyleTitle'),
539
- content: getI18n('vxe.export.expOptUseStyle')
463
+ value: defaultOptions.widthMode,
464
+ options: colWidthModeOptions
540
465
  },
541
466
  on: {
542
- input(value) {
543
- defaultOptions.useStyle = value;
467
+ modelValue(value) {
468
+ defaultOptions.widthMode = value;
544
469
  }
545
470
  }
546
471
  })
547
- ]),
548
- h('div', {
549
- class: 'vxe-table-export--panel-option-row'
550
- }, [
551
- h('vxe-checkbox', {
552
- props: {
553
- value: hasTree ? defaultOptions.isTreeAllExpanded : false,
554
- disabled: hasEmptyData || !hasTree,
555
- title: getI18n('vxe.export.expTreeAllExpandTitle'),
556
- content: getI18n('vxe.export.expOptTreeAllExpand')
557
- },
558
- on: {
559
- input(value) {
560
- defaultOptions.isTreeAllExpanded = value;
561
- }
562
- }
563
- }),
564
- h('vxe-checkbox', {
565
- props: {
566
- value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
567
- disabled: hasEmptyData || !hasRowGroup,
568
- title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
569
- content: getI18n('vxe.export.expOptRowGroupAllExpand')
570
- },
571
- on: {
572
- input(value) {
573
- defaultOptions.isRowGroupAllExpanded = value;
574
- }
575
- }
576
- })
472
+ : renderEmptyElement($xeTable)
577
473
  ])
578
474
  ])
579
- ])
580
- ]
475
+ : renderEmptyElement($xeTable),
476
+ h('tr', [
477
+ h('td', getI18n('vxe.export.expOpts')),
478
+ parameterSlot
479
+ ? h('td', [
480
+ h('div', {
481
+ class: 'vxe-table-export--panel-option-row'
482
+ }, $xeTable.callSlot(parameterSlot, params, h))
483
+ ])
484
+ : h('td', [
485
+ h('div', {
486
+ class: 'vxe-table-export--panel-option-row'
487
+ }, VxeUICheckboxComponent
488
+ ? [
489
+ h(VxeUICheckboxComponent, {
490
+ props: {
491
+ value: hasEmptyData || isHeader,
492
+ disabled: hasEmptyData,
493
+ title: getI18n('vxe.export.expHeaderTitle'),
494
+ content: getI18n('vxe.export.expOptHeader')
495
+ },
496
+ on: {
497
+ input(value) {
498
+ defaultOptions.isHeader = value;
499
+ }
500
+ }
501
+ }),
502
+ h(VxeUICheckboxComponent, {
503
+ props: {
504
+ value: defaultOptions.isFooter,
505
+ disabled: !storeData.hasFooter,
506
+ title: getI18n('vxe.export.expFooterTitle'),
507
+ content: getI18n('vxe.export.expOptFooter')
508
+ },
509
+ on: {
510
+ input(value) {
511
+ defaultOptions.isFooter = value;
512
+ }
513
+ }
514
+ }),
515
+ h(VxeUICheckboxComponent, {
516
+ props: {
517
+ value: isHeader ? defaultOptions.isTitle : false,
518
+ disabled: !isHeader,
519
+ title: getI18n('vxe.export.expTitleTitle'),
520
+ content: getI18n('vxe.export.expOptTitle')
521
+ },
522
+ on: {
523
+ input(value) {
524
+ defaultOptions.isTitle = value;
525
+ }
526
+ }
527
+ }),
528
+ h(VxeUICheckboxComponent, {
529
+ props: {
530
+ value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
531
+ disabled: !isHeader || !hasColgroup || !supportMerge,
532
+ title: getI18n('vxe.export.expColgroupTitle'),
533
+ content: getI18n('vxe.export.expOptColgroup')
534
+ },
535
+ on: {
536
+ input(value) {
537
+ defaultOptions.isColgroup = value;
538
+ }
539
+ }
540
+ })
541
+ ]
542
+ : []),
543
+ h('div', {
544
+ class: 'vxe-table-export--panel-option-row'
545
+ }, VxeUICheckboxComponent
546
+ ? [
547
+ h(VxeUICheckboxComponent, {
548
+ props: {
549
+ value: hasEmptyData ? false : defaultOptions.original,
550
+ disabled: hasEmptyData,
551
+ title: getI18n('vxe.export.expOriginalTitle'),
552
+ content: getI18n('vxe.export.expOptOriginal')
553
+ },
554
+ on: {
555
+ input(value) {
556
+ defaultOptions.original = value;
557
+ }
558
+ }
559
+ }),
560
+ h(VxeUICheckboxComponent, {
561
+ props: {
562
+ value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
563
+ disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
564
+ title: getI18n('vxe.export.expMergeTitle'),
565
+ content: getI18n('vxe.export.expOptMerge')
566
+ },
567
+ on: {
568
+ input(value) {
569
+ defaultOptions.isMerge = value;
570
+ }
571
+ }
572
+ }),
573
+ isPrint
574
+ ? renderEmptyElement($xeTable)
575
+ : h(VxeUICheckboxComponent, {
576
+ props: {
577
+ value: supportStyle ? defaultOptions.useStyle : false,
578
+ disabled: !supportStyle,
579
+ title: getI18n('vxe.export.expUseStyleTitle'),
580
+ content: getI18n('vxe.export.expOptUseStyle')
581
+ },
582
+ on: {
583
+ input(value) {
584
+ defaultOptions.useStyle = value;
585
+ }
586
+ }
587
+ })
588
+ ]
589
+ : []),
590
+ h('div', {
591
+ class: 'vxe-table-export--panel-option-row'
592
+ }, VxeUICheckboxComponent
593
+ ? [
594
+ h(VxeUICheckboxComponent, {
595
+ props: {
596
+ value: hasTree ? defaultOptions.isTreeAllExpanded : false,
597
+ disabled: hasEmptyData || !hasTree,
598
+ title: getI18n('vxe.export.expTreeAllExpandTitle'),
599
+ content: getI18n('vxe.export.expOptTreeAllExpand')
600
+ },
601
+ on: {
602
+ input(value) {
603
+ defaultOptions.isTreeAllExpanded = value;
604
+ }
605
+ }
606
+ }),
607
+ h(VxeUICheckboxComponent, {
608
+ props: {
609
+ value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
610
+ disabled: hasEmptyData || !hasRowGroup,
611
+ title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
612
+ content: getI18n('vxe.export.expOptRowGroupAllExpand')
613
+ },
614
+ on: {
615
+ input(value) {
616
+ defaultOptions.isRowGroupAllExpanded = value;
617
+ }
618
+ }
619
+ })
620
+ ]
621
+ : [])
622
+ ])
623
+ ])
624
+ ]
625
+ ])
581
626
  ])
582
- ])
583
- ]),
584
- bottomSlot
585
- ? h('div', {
586
- class: 'vxe-table-export--panel-bottom'
587
- }, $xeTable.callSlot(bottomSlot, params, h))
588
- : renderEmptyElement($xeTable)
589
- ]);
590
- },
591
- footer() {
592
- const params = {
593
- $table: $xeTable,
594
- $grid: $xeGrid,
595
- $gantt: $xeGantt,
596
- options: defaultOptions,
597
- columns,
598
- params: defaultOptions.params
599
- };
600
- return h('div', {
601
- class: 'vxe-table-export--panel-footer'
602
- }, footerSlot
603
- ? $xeTable.callSlot(footerSlot, params, h)
604
- : [
605
- h('div', {
606
- class: 'vxe-table-export--panel-btns'
607
- }, [
608
- h('vxe-button', {
609
- props: {
610
- content: getI18n('vxe.export.expCancel')
611
- },
612
- on: {
613
- click: $xeExportPanel.cancelEvent
614
- }
615
- }),
616
- h('vxe-button', {
617
- ref: 'confirmBtn',
618
- props: {
619
- status: 'primary',
620
- content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
621
- },
622
- on: {
623
- click: $xeExportPanel.confirmEvent
624
- }
625
- })
626
- ])
627
+ ]),
628
+ bottomSlot
629
+ ? h('div', {
630
+ class: 'vxe-table-export--panel-bottom'
631
+ }, $xeTable.callSlot(bottomSlot, params, h))
632
+ : renderEmptyElement($xeTable)
627
633
  ]);
634
+ },
635
+ footer() {
636
+ const params = {
637
+ $table: $xeTable,
638
+ $grid: $xeGrid,
639
+ $gantt: $xeGantt,
640
+ options: defaultOptions,
641
+ columns,
642
+ params: defaultOptions.params
643
+ };
644
+ return h('div', {
645
+ class: 'vxe-table-export--panel-footer'
646
+ }, footerSlot
647
+ ? $xeTable.callSlot(footerSlot, params, h)
648
+ : [
649
+ h('div', {
650
+ class: 'vxe-table-export--panel-btns'
651
+ }, [
652
+ VxeUIButtonComponent
653
+ ? h(VxeUIButtonComponent, {
654
+ props: {
655
+ content: getI18n('vxe.export.expCancel')
656
+ },
657
+ on: {
658
+ click: $xeExportPanel.cancelEvent
659
+ }
660
+ })
661
+ : renderEmptyElement($xeTable),
662
+ VxeUIButtonComponent
663
+ ? h(VxeUIButtonComponent, {
664
+ ref: 'confirmBtn',
665
+ props: {
666
+ status: 'primary',
667
+ content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
668
+ },
669
+ on: {
670
+ click: $xeExportPanel.confirmEvent
671
+ }
672
+ })
673
+ : renderEmptyElement($xeTable)
674
+ ])
675
+ ]);
676
+ }
628
677
  }
629
- }
630
- });
678
+ })
679
+ : renderEmptyElement($xeTable);
631
680
  }
632
681
  },
633
682
  render(h) {