vxe-table 3.22.2 → 3.22.3
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/ar-EG.js +7 -0
- package/es/locale/lang/de-DE.js +7 -0
- package/es/locale/lang/en-US.js +7 -0
- package/es/locale/lang/es-ES.js +7 -0
- package/es/locale/lang/fr-FR.js +7 -0
- package/es/locale/lang/hu-HU.js +7 -0
- package/es/locale/lang/hy-AM.js +7 -0
- package/es/locale/lang/id-ID.js +7 -0
- package/es/locale/lang/it-IT.js +7 -0
- package/es/locale/lang/ja-JP.js +7 -0
- package/es/locale/lang/ko-KR.js +7 -0
- package/es/locale/lang/ms-MY.js +7 -0
- package/es/locale/lang/nb-NO.js +7 -0
- package/es/locale/lang/pt-BR.js +7 -0
- package/es/locale/lang/ru-RU.js +7 -0
- package/es/locale/lang/th-TH.js +7 -0
- package/es/locale/lang/ug-CN.js +7 -0
- package/es/locale/lang/uk-UA.js +7 -0
- package/es/locale/lang/uz-UZ.js +7 -0
- package/es/locale/lang/vi-VN.js +7 -0
- package/es/locale/lang/zh-CHT.js +7 -0
- package/es/locale/lang/zh-CN.js +7 -0
- package/es/style.css +1 -1
- package/es/table/module/export/export-panel.js +384 -335
- package/es/table/module/export/mixin.js +106 -28
- package/es/table/module/export/util.js +1 -1
- package/es/table/src/body.js +1 -1
- package/es/table/src/footer.js +1 -1
- package/es/table/src/header.js +4 -2
- package/es/table/src/table.js +24 -24
- package/es/table/src/util.js +1 -0
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +202 -79
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +7 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +7 -0
- package/lib/locale/lang/de-DE.js +7 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +7 -0
- package/lib/locale/lang/en-US.js +7 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -0
- package/lib/locale/lang/es-ES.js +7 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +7 -0
- package/lib/locale/lang/fr-FR.js +7 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +7 -0
- package/lib/locale/lang/hu-HU.js +7 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +7 -0
- package/lib/locale/lang/hy-AM.js +7 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +7 -0
- package/lib/locale/lang/id-ID.js +7 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +7 -0
- package/lib/locale/lang/it-IT.js +7 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +7 -0
- package/lib/locale/lang/ja-JP.js +7 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +7 -0
- package/lib/locale/lang/ko-KR.js +7 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +7 -0
- package/lib/locale/lang/ms-MY.js +7 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +7 -0
- package/lib/locale/lang/nb-NO.js +7 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +7 -0
- package/lib/locale/lang/pt-BR.js +7 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +7 -0
- package/lib/locale/lang/ru-RU.js +7 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +7 -0
- package/lib/locale/lang/th-TH.js +7 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +7 -0
- package/lib/locale/lang/ug-CN.js +7 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +7 -0
- package/lib/locale/lang/uk-UA.js +7 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +7 -0
- package/lib/locale/lang/uz-UZ.js +7 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +7 -0
- package/lib/locale/lang/vi-VN.js +7 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +7 -0
- package/lib/locale/lang/zh-CHT.js +7 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +7 -0
- package/lib/locale/lang/zh-CN.js +7 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +7 -0
- package/lib/style.css +1 -1
- package/lib/table/module/export/export-panel.js +50 -22
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +106 -28
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/export/util.js +1 -1
- package/lib/table/module/export/util.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/footer.js +1 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/header.js +4 -2
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/table.js +28 -22
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/ui/index.js +2 -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/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +7 -0
- package/packages/locale/lang/de-DE.ts +7 -0
- package/packages/locale/lang/en-US.ts +7 -0
- package/packages/locale/lang/es-ES.ts +7 -0
- package/packages/locale/lang/fr-FR.ts +7 -0
- package/packages/locale/lang/hu-HU.ts +7 -0
- package/packages/locale/lang/hy-AM.ts +7 -0
- package/packages/locale/lang/id-ID.ts +7 -0
- package/packages/locale/lang/it-IT.ts +7 -0
- package/packages/locale/lang/ja-JP.ts +7 -0
- package/packages/locale/lang/ko-KR.ts +7 -0
- package/packages/locale/lang/ms-MY.ts +7 -0
- package/packages/locale/lang/nb-NO.ts +7 -0
- package/packages/locale/lang/pt-BR.ts +7 -0
- package/packages/locale/lang/ru-RU.ts +7 -0
- package/packages/locale/lang/th-TH.ts +7 -0
- package/packages/locale/lang/ug-CN.ts +7 -0
- package/packages/locale/lang/uk-UA.ts +7 -0
- package/packages/locale/lang/uz-UZ.ts +7 -0
- package/packages/locale/lang/vi-VN.ts +7 -0
- package/packages/locale/lang/zh-CHT.ts +7 -0
- package/packages/locale/lang/zh-CN.ts +7 -0
- package/packages/table/module/export/export-panel.ts +383 -333
- package/packages/table/module/export/mixin.ts +130 -46
- package/packages/table/module/export/util.ts +1 -1
- package/packages/table/src/body.ts +1 -1
- package/packages/table/src/footer.ts +1 -1
- package/packages/table/src/header.ts +4 -2
- package/packages/table/src/table.ts +24 -24
- package/packages/table/src/util.ts +1 -0
- package/packages/ui/index.ts +1 -0
- /package/es/{iconfont.1784122379007.ttf → iconfont.1784251254538.ttf} +0 -0
- /package/es/{iconfont.1784122379007.woff → iconfont.1784251254538.woff} +0 -0
- /package/es/{iconfont.1784122379007.woff2 → iconfont.1784251254538.woff2} +0 -0
- /package/lib/{iconfont.1784122379007.ttf → iconfont.1784251254538.ttf} +0 -0
- /package/lib/{iconfont.1784122379007.woff → iconfont.1784251254538.woff} +0 -0
- /package/lib/{iconfont.1784122379007.woff2 → iconfont.1784251254538.woff2} +0 -0
|
@@ -48,6 +48,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
48
48
|
computeSize(): VxeComponentSizeType
|
|
49
49
|
$xeTable(): VxeTableConstructor & VxeTablePrivateMethods
|
|
50
50
|
}),
|
|
51
|
+
computeColWidthModeOptions () {
|
|
52
|
+
return [
|
|
53
|
+
{ value: '', label: getI18n('vxe.export.wdModes.default') },
|
|
54
|
+
{ value: 'auto', label: getI18n('vxe.export.wdModes.auto') },
|
|
55
|
+
{ value: 'scale', label: getI18n('vxe.export.wdModes.scale') }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
51
58
|
computeCheckedAll () {
|
|
52
59
|
const $xeExportPanel = this
|
|
53
60
|
const props = $xeExportPanel
|
|
@@ -234,6 +241,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
234
241
|
},
|
|
235
242
|
|
|
236
243
|
renderVN (h: CreateElement): VNode {
|
|
244
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal')
|
|
245
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton')
|
|
246
|
+
const VxeUISelectComponent = VxeUI.getComponent('VxeSelect')
|
|
247
|
+
const VxeUIInputComponent = VxeUI.getComponent('VxeInput')
|
|
248
|
+
const VxeUICheckboxComponent = VxeUI.getComponent('VxeCheckbox')
|
|
249
|
+
|
|
237
250
|
const $xeExportPanel = this
|
|
238
251
|
const props = $xeExportPanel
|
|
239
252
|
const reactData = $xeExportPanel.reactData
|
|
@@ -251,6 +264,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
251
264
|
const showSheet = $xeExportPanel.computeShowSheet
|
|
252
265
|
const supportMerge = $xeExportPanel.computeSupportMerge
|
|
253
266
|
const supportStyle = $xeExportPanel.computeSupportStyle
|
|
267
|
+
const colWidthModeOptions = $xeExportPanel.computeColWidthModeOptions
|
|
254
268
|
// const supportGroup = $xeExportPanel.computeSupportGroup
|
|
255
269
|
const slots = defaultOptions.slots || {}
|
|
256
270
|
const topSlot = slots.top
|
|
@@ -301,369 +315,405 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
301
315
|
])
|
|
302
316
|
)
|
|
303
317
|
})
|
|
304
|
-
return
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
on: {
|
|
323
|
-
input (value: any) {
|
|
324
|
-
storeData.visible = value
|
|
318
|
+
return VxeUIModalComponent
|
|
319
|
+
? h(VxeUIModalComponent, {
|
|
320
|
+
ref: 'modal',
|
|
321
|
+
props: {
|
|
322
|
+
id: 'VXE_EXPORT_MODAL',
|
|
323
|
+
value: storeData.visible,
|
|
324
|
+
title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
325
|
+
width: 660,
|
|
326
|
+
minWidth: 500,
|
|
327
|
+
minHeight: 400,
|
|
328
|
+
mask: true,
|
|
329
|
+
lockView: true,
|
|
330
|
+
showFooter: true,
|
|
331
|
+
escClosable: true,
|
|
332
|
+
maskClosable: true,
|
|
333
|
+
showMaximize: true,
|
|
334
|
+
resize: true,
|
|
335
|
+
loading: reactData.loading
|
|
325
336
|
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
on: {
|
|
338
|
+
input (value: any) {
|
|
339
|
+
storeData.visible = value
|
|
340
|
+
},
|
|
341
|
+
show: $xeExportPanel.showEvent
|
|
342
|
+
},
|
|
343
|
+
scopedSlots: {
|
|
344
|
+
default (): VNode {
|
|
345
|
+
const params = {
|
|
346
|
+
$table: $xeTable,
|
|
347
|
+
$grid: $xeGrid,
|
|
348
|
+
$gantt: $xeGantt,
|
|
349
|
+
options: defaultOptions,
|
|
350
|
+
columns,
|
|
351
|
+
params: defaultOptions.params as any
|
|
352
|
+
}
|
|
353
|
+
const hasEmptyData = defaultOptions.mode === 'empty'
|
|
339
354
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
355
|
+
return h('div', {
|
|
356
|
+
class: 'vxe-table-export--panel'
|
|
357
|
+
}, [
|
|
358
|
+
topSlot
|
|
359
|
+
? h('div', {
|
|
360
|
+
class: 'vxe-table-export--panel-top'
|
|
361
|
+
}, $xeTable.callSlot(topSlot, params, h))
|
|
362
|
+
: renderEmptyElement($xeTable),
|
|
363
|
+
h('div', {
|
|
364
|
+
class: 'vxe-table-export--panel-body'
|
|
365
|
+
}, defaultSlot
|
|
366
|
+
? $xeTable.callSlot(defaultSlot, params, h)
|
|
367
|
+
: [
|
|
368
|
+
h('table', {
|
|
369
|
+
attrs: {
|
|
370
|
+
class: 'vxe-table-export--panel-table',
|
|
371
|
+
cellspacing: 0,
|
|
372
|
+
cellpadding: 0,
|
|
373
|
+
border: 0
|
|
374
|
+
}
|
|
375
|
+
}, [
|
|
376
|
+
h('tbody', [
|
|
377
|
+
[
|
|
378
|
+
isPrint
|
|
379
|
+
? renderEmptyElement($xeTable)
|
|
380
|
+
: h('tr', [
|
|
381
|
+
h('td', getI18n('vxe.export.expName')),
|
|
382
|
+
h('td', [
|
|
383
|
+
VxeUIInputComponent
|
|
384
|
+
? h(VxeUIInputComponent, {
|
|
385
|
+
ref: 'filename',
|
|
386
|
+
props: {
|
|
387
|
+
value: defaultOptions.filename,
|
|
388
|
+
type: 'text',
|
|
389
|
+
clearable: true,
|
|
390
|
+
placeholder: getI18n('vxe.export.expNamePlaceholder')
|
|
391
|
+
},
|
|
392
|
+
on: {
|
|
393
|
+
modelValue (value: any) {
|
|
394
|
+
defaultOptions.filename = value
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
})
|
|
398
|
+
: renderEmptyElement($xeTable)
|
|
399
|
+
])
|
|
400
|
+
]),
|
|
401
|
+
isPrint
|
|
402
|
+
? renderEmptyElement($xeTable)
|
|
403
|
+
: h('tr', [
|
|
404
|
+
h('td', getI18n('vxe.export.expType')),
|
|
405
|
+
h('td', [
|
|
406
|
+
h('vxe-select', {
|
|
407
|
+
props: {
|
|
408
|
+
value: defaultOptions.type,
|
|
409
|
+
options: storeData.typeList
|
|
410
|
+
},
|
|
411
|
+
on: {
|
|
412
|
+
modelValue (value: any) {
|
|
413
|
+
defaultOptions.type = value
|
|
414
|
+
}
|
|
379
415
|
}
|
|
380
|
-
}
|
|
381
|
-
|
|
416
|
+
})
|
|
417
|
+
])
|
|
418
|
+
]),
|
|
419
|
+
isPrint || showSheet
|
|
420
|
+
? h('tr', [
|
|
421
|
+
h('td', getI18n('vxe.export.expSheetName')),
|
|
422
|
+
h('td', [
|
|
423
|
+
VxeUIInputComponent
|
|
424
|
+
? h(VxeUIInputComponent, {
|
|
425
|
+
ref: 'sheetname',
|
|
426
|
+
props: {
|
|
427
|
+
value: defaultOptions.sheetName,
|
|
428
|
+
type: 'text',
|
|
429
|
+
clearable: true,
|
|
430
|
+
placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
|
|
431
|
+
},
|
|
432
|
+
on: {
|
|
433
|
+
modelValue (value: any) {
|
|
434
|
+
defaultOptions.sheetName = value
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
})
|
|
438
|
+
: renderEmptyElement($xeTable)
|
|
439
|
+
])
|
|
382
440
|
])
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
: h('tr', [
|
|
387
|
-
h('td', getI18n('vxe.export.expType')),
|
|
441
|
+
: renderEmptyElement($xeTable),
|
|
442
|
+
h('tr', [
|
|
443
|
+
h('td', getI18n('vxe.export.expMode')),
|
|
388
444
|
h('td', [
|
|
389
|
-
h(
|
|
445
|
+
h(VxeUISelectComponent, {
|
|
390
446
|
props: {
|
|
391
|
-
value: defaultOptions.
|
|
392
|
-
options: storeData.
|
|
447
|
+
value: defaultOptions.mode,
|
|
448
|
+
options: storeData.modeList
|
|
393
449
|
},
|
|
394
450
|
on: {
|
|
395
451
|
modelValue (value: any) {
|
|
396
|
-
defaultOptions.
|
|
452
|
+
defaultOptions.mode = value
|
|
397
453
|
}
|
|
398
454
|
}
|
|
399
455
|
})
|
|
400
456
|
])
|
|
401
457
|
]),
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
h('td', getI18n('vxe.export.expSheetName')),
|
|
458
|
+
h('tr', [
|
|
459
|
+
h('td', [getI18n('vxe.export.expColumn')]),
|
|
405
460
|
h('td', [
|
|
406
|
-
h('vxe-input', {
|
|
407
|
-
ref: 'sheetname',
|
|
408
|
-
props: {
|
|
409
|
-
value: defaultOptions.sheetName,
|
|
410
|
-
type: 'text',
|
|
411
|
-
clearable: true,
|
|
412
|
-
placeholder: getI18n('vxe.export.expSheetNamePlaceholder')
|
|
413
|
-
},
|
|
414
|
-
on: {
|
|
415
|
-
modelValue (value: any) {
|
|
416
|
-
defaultOptions.sheetName = value
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
})
|
|
420
|
-
])
|
|
421
|
-
])
|
|
422
|
-
: renderEmptyElement($xeTable),
|
|
423
|
-
h('tr', [
|
|
424
|
-
h('td', getI18n('vxe.export.expMode')),
|
|
425
|
-
h('td', [
|
|
426
|
-
h('vxe-select', {
|
|
427
|
-
props: {
|
|
428
|
-
value: defaultOptions.mode,
|
|
429
|
-
options: storeData.modeList
|
|
430
|
-
},
|
|
431
|
-
on: {
|
|
432
|
-
modelValue (value: any) {
|
|
433
|
-
defaultOptions.mode = value
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
})
|
|
437
|
-
])
|
|
438
|
-
]),
|
|
439
|
-
h('tr', [
|
|
440
|
-
h('td', [getI18n('vxe.export.expColumn')]),
|
|
441
|
-
h('td', [
|
|
442
|
-
h('div', {
|
|
443
|
-
class: 'vxe-table-export--panel-column'
|
|
444
|
-
}, [
|
|
445
|
-
h('ul', {
|
|
446
|
-
class: 'vxe-table-export--panel-column-header'
|
|
447
|
-
}, [
|
|
448
|
-
h('li', {
|
|
449
|
-
class: ['vxe-table-export--panel-column-option', {
|
|
450
|
-
'is--checked': isAllChecked,
|
|
451
|
-
'is--indeterminate': isAllIndeterminate
|
|
452
|
-
}],
|
|
453
|
-
attrs: {
|
|
454
|
-
title: getI18n('vxe.table.allTitle')
|
|
455
|
-
},
|
|
456
|
-
on: {
|
|
457
|
-
click: $xeExportPanel.allColumnEvent
|
|
458
|
-
}
|
|
459
|
-
}, [
|
|
460
|
-
h('span', {
|
|
461
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
462
|
-
}),
|
|
463
|
-
h('span', {
|
|
464
|
-
class: 'vxe-checkbox--label'
|
|
465
|
-
}, getI18n('vxe.export.expCurrentColumn'))
|
|
466
|
-
])
|
|
467
|
-
]),
|
|
468
|
-
h('ul', {
|
|
469
|
-
class: 'vxe-table-export--panel-column-body'
|
|
470
|
-
}, colVNs)
|
|
471
|
-
])
|
|
472
|
-
])
|
|
473
|
-
]),
|
|
474
|
-
h('tr', [
|
|
475
|
-
h('td', getI18n('vxe.export.expOpts')),
|
|
476
|
-
parameterSlot
|
|
477
|
-
? h('td', [
|
|
478
|
-
h('div', {
|
|
479
|
-
class: 'vxe-table-export--panel-option-row'
|
|
480
|
-
}, $xeTable.callSlot(parameterSlot, params, h))
|
|
481
|
-
])
|
|
482
|
-
: h('td', [
|
|
483
461
|
h('div', {
|
|
484
|
-
class: 'vxe-table-export--panel-
|
|
462
|
+
class: 'vxe-table-export--panel-column'
|
|
485
463
|
}, [
|
|
486
|
-
h('
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
h('vxe-checkbox', {
|
|
500
|
-
props: {
|
|
501
|
-
value: defaultOptions.isFooter,
|
|
502
|
-
disabled: !storeData.hasFooter,
|
|
503
|
-
title: getI18n('vxe.export.expFooterTitle'),
|
|
504
|
-
content: getI18n('vxe.export.expOptFooter')
|
|
505
|
-
},
|
|
506
|
-
on: {
|
|
507
|
-
input (value: any) {
|
|
508
|
-
defaultOptions.isFooter = value
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}),
|
|
512
|
-
h('vxe-checkbox', {
|
|
513
|
-
props: {
|
|
514
|
-
value: isHeader ? defaultOptions.isTitle : false,
|
|
515
|
-
disabled: !isHeader,
|
|
516
|
-
title: getI18n('vxe.export.expTitleTitle'),
|
|
517
|
-
content: getI18n('vxe.export.expOptTitle')
|
|
518
|
-
},
|
|
519
|
-
on: {
|
|
520
|
-
input (value: any) {
|
|
521
|
-
defaultOptions.isTitle = value
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}),
|
|
525
|
-
h('vxe-checkbox', {
|
|
526
|
-
props: {
|
|
527
|
-
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
528
|
-
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
529
|
-
title: getI18n('vxe.export.expColgroupTitle'),
|
|
530
|
-
content: getI18n('vxe.export.expOptColgroup')
|
|
531
|
-
},
|
|
532
|
-
on: {
|
|
533
|
-
input (value: any) {
|
|
534
|
-
defaultOptions.isColgroup = value
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
})
|
|
538
|
-
]),
|
|
539
|
-
h('div', {
|
|
540
|
-
class: 'vxe-table-export--panel-option-row'
|
|
541
|
-
}, [
|
|
542
|
-
h('vxe-checkbox', {
|
|
543
|
-
props: {
|
|
544
|
-
value: hasEmptyData ? false : defaultOptions.original,
|
|
545
|
-
disabled: hasEmptyData,
|
|
546
|
-
title: getI18n('vxe.export.expOriginalTitle'),
|
|
547
|
-
content: getI18n('vxe.export.expOptOriginal')
|
|
548
|
-
},
|
|
549
|
-
on: {
|
|
550
|
-
input (value: any) {
|
|
551
|
-
defaultOptions.original = value
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}),
|
|
555
|
-
h('vxe-checkbox', {
|
|
556
|
-
props: {
|
|
557
|
-
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
558
|
-
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
559
|
-
title: getI18n('vxe.export.expMergeTitle'),
|
|
560
|
-
content: getI18n('vxe.export.expOptMerge')
|
|
561
|
-
},
|
|
562
|
-
on: {
|
|
563
|
-
input (value: any) {
|
|
564
|
-
defaultOptions.isMerge = value
|
|
464
|
+
h('ul', {
|
|
465
|
+
class: 'vxe-table-export--panel-column-header'
|
|
466
|
+
}, [
|
|
467
|
+
h('li', {
|
|
468
|
+
class: ['vxe-table-export--panel-column-option', {
|
|
469
|
+
'is--checked': isAllChecked,
|
|
470
|
+
'is--indeterminate': isAllIndeterminate
|
|
471
|
+
}],
|
|
472
|
+
attrs: {
|
|
473
|
+
title: getI18n('vxe.table.allTitle')
|
|
474
|
+
},
|
|
475
|
+
on: {
|
|
476
|
+
click: $xeExportPanel.allColumnEvent
|
|
565
477
|
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
478
|
+
}, [
|
|
479
|
+
h('span', {
|
|
480
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
481
|
+
}),
|
|
482
|
+
h('span', {
|
|
483
|
+
class: 'vxe-checkbox--label'
|
|
484
|
+
}, getI18n('vxe.export.expCurrentColumn'))
|
|
485
|
+
])
|
|
486
|
+
]),
|
|
487
|
+
h('ul', {
|
|
488
|
+
class: 'vxe-table-export--panel-column-body'
|
|
489
|
+
}, colVNs)
|
|
490
|
+
])
|
|
491
|
+
])
|
|
492
|
+
]),
|
|
493
|
+
isPrint
|
|
494
|
+
? h('tr', [
|
|
495
|
+
h('td', getI18n('vxe.export.widthMode')),
|
|
496
|
+
h('td', [
|
|
497
|
+
VxeUISelectComponent
|
|
498
|
+
? h(VxeUISelectComponent, {
|
|
571
499
|
props: {
|
|
572
|
-
value:
|
|
573
|
-
|
|
574
|
-
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
575
|
-
content: getI18n('vxe.export.expOptUseStyle')
|
|
500
|
+
value: defaultOptions.widthMode,
|
|
501
|
+
options: colWidthModeOptions
|
|
576
502
|
},
|
|
577
503
|
on: {
|
|
578
|
-
|
|
579
|
-
defaultOptions.
|
|
504
|
+
modelValue (value: any) {
|
|
505
|
+
defaultOptions.widthMode = value
|
|
580
506
|
}
|
|
581
507
|
}
|
|
582
508
|
})
|
|
583
|
-
|
|
584
|
-
h('div', {
|
|
585
|
-
class: 'vxe-table-export--panel-option-row'
|
|
586
|
-
}, [
|
|
587
|
-
h('vxe-checkbox', {
|
|
588
|
-
props: {
|
|
589
|
-
value: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
590
|
-
disabled: hasEmptyData || !hasTree,
|
|
591
|
-
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
592
|
-
content: getI18n('vxe.export.expOptTreeAllExpand')
|
|
593
|
-
},
|
|
594
|
-
on: {
|
|
595
|
-
input (value: any) {
|
|
596
|
-
defaultOptions.isTreeAllExpanded = value
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
}),
|
|
600
|
-
h('vxe-checkbox', {
|
|
601
|
-
props: {
|
|
602
|
-
value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
603
|
-
disabled: hasEmptyData || !hasRowGroup,
|
|
604
|
-
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
605
|
-
content: getI18n('vxe.export.expOptRowGroupAllExpand')
|
|
606
|
-
},
|
|
607
|
-
on: {
|
|
608
|
-
input (value: any) {
|
|
609
|
-
defaultOptions.isRowGroupAllExpanded = value
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
})
|
|
509
|
+
: renderEmptyElement($xeTable)
|
|
613
510
|
])
|
|
614
511
|
])
|
|
615
|
-
|
|
616
|
-
|
|
512
|
+
: renderEmptyElement($xeTable),
|
|
513
|
+
h('tr', [
|
|
514
|
+
h('td', getI18n('vxe.export.expOpts')),
|
|
515
|
+
parameterSlot
|
|
516
|
+
? h('td', [
|
|
517
|
+
h('div', {
|
|
518
|
+
class: 'vxe-table-export--panel-option-row'
|
|
519
|
+
}, $xeTable.callSlot(parameterSlot, params, h))
|
|
520
|
+
])
|
|
521
|
+
: h('td', [
|
|
522
|
+
h('div', {
|
|
523
|
+
class: 'vxe-table-export--panel-option-row'
|
|
524
|
+
}, VxeUICheckboxComponent
|
|
525
|
+
? [
|
|
526
|
+
h(VxeUICheckboxComponent, {
|
|
527
|
+
props: {
|
|
528
|
+
value: hasEmptyData || isHeader,
|
|
529
|
+
disabled: hasEmptyData,
|
|
530
|
+
title: getI18n('vxe.export.expHeaderTitle'),
|
|
531
|
+
content: getI18n('vxe.export.expOptHeader')
|
|
532
|
+
},
|
|
533
|
+
on: {
|
|
534
|
+
input (value: any) {
|
|
535
|
+
defaultOptions.isHeader = value
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}),
|
|
539
|
+
h(VxeUICheckboxComponent, {
|
|
540
|
+
props: {
|
|
541
|
+
value: defaultOptions.isFooter,
|
|
542
|
+
disabled: !storeData.hasFooter,
|
|
543
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
544
|
+
content: getI18n('vxe.export.expOptFooter')
|
|
545
|
+
},
|
|
546
|
+
on: {
|
|
547
|
+
input (value: any) {
|
|
548
|
+
defaultOptions.isFooter = value
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}),
|
|
552
|
+
h(VxeUICheckboxComponent, {
|
|
553
|
+
props: {
|
|
554
|
+
value: isHeader ? defaultOptions.isTitle : false,
|
|
555
|
+
disabled: !isHeader,
|
|
556
|
+
title: getI18n('vxe.export.expTitleTitle'),
|
|
557
|
+
content: getI18n('vxe.export.expOptTitle')
|
|
558
|
+
},
|
|
559
|
+
on: {
|
|
560
|
+
input (value: any) {
|
|
561
|
+
defaultOptions.isTitle = value
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}),
|
|
565
|
+
h(VxeUICheckboxComponent, {
|
|
566
|
+
props: {
|
|
567
|
+
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
568
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
569
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
570
|
+
content: getI18n('vxe.export.expOptColgroup')
|
|
571
|
+
},
|
|
572
|
+
on: {
|
|
573
|
+
input (value: any) {
|
|
574
|
+
defaultOptions.isColgroup = value
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
})
|
|
578
|
+
]
|
|
579
|
+
: []),
|
|
580
|
+
h('div', {
|
|
581
|
+
class: 'vxe-table-export--panel-option-row'
|
|
582
|
+
}, VxeUICheckboxComponent
|
|
583
|
+
? [
|
|
584
|
+
h(VxeUICheckboxComponent, {
|
|
585
|
+
props: {
|
|
586
|
+
value: hasEmptyData ? false : defaultOptions.original,
|
|
587
|
+
disabled: hasEmptyData,
|
|
588
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
589
|
+
content: getI18n('vxe.export.expOptOriginal')
|
|
590
|
+
},
|
|
591
|
+
on: {
|
|
592
|
+
input (value: any) {
|
|
593
|
+
defaultOptions.original = value
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}),
|
|
597
|
+
h(VxeUICheckboxComponent, {
|
|
598
|
+
props: {
|
|
599
|
+
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
600
|
+
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
601
|
+
title: getI18n('vxe.export.expMergeTitle'),
|
|
602
|
+
content: getI18n('vxe.export.expOptMerge')
|
|
603
|
+
},
|
|
604
|
+
on: {
|
|
605
|
+
input (value: any) {
|
|
606
|
+
defaultOptions.isMerge = value
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}),
|
|
610
|
+
isPrint
|
|
611
|
+
? renderEmptyElement($xeTable)
|
|
612
|
+
: h(VxeUICheckboxComponent, {
|
|
613
|
+
props: {
|
|
614
|
+
value: supportStyle ? defaultOptions.useStyle : false,
|
|
615
|
+
disabled: !supportStyle,
|
|
616
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
617
|
+
content: getI18n('vxe.export.expOptUseStyle')
|
|
618
|
+
},
|
|
619
|
+
on: {
|
|
620
|
+
input (value: any) {
|
|
621
|
+
defaultOptions.useStyle = value
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
})
|
|
625
|
+
]
|
|
626
|
+
: []),
|
|
627
|
+
h('div', {
|
|
628
|
+
class: 'vxe-table-export--panel-option-row'
|
|
629
|
+
}, VxeUICheckboxComponent
|
|
630
|
+
? [
|
|
631
|
+
h(VxeUICheckboxComponent, {
|
|
632
|
+
props: {
|
|
633
|
+
value: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
634
|
+
disabled: hasEmptyData || !hasTree,
|
|
635
|
+
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
636
|
+
content: getI18n('vxe.export.expOptTreeAllExpand')
|
|
637
|
+
},
|
|
638
|
+
on: {
|
|
639
|
+
input (value: any) {
|
|
640
|
+
defaultOptions.isTreeAllExpanded = value
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}),
|
|
644
|
+
h(VxeUICheckboxComponent, {
|
|
645
|
+
props: {
|
|
646
|
+
value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
647
|
+
disabled: hasEmptyData || !hasRowGroup,
|
|
648
|
+
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
649
|
+
content: getI18n('vxe.export.expOptRowGroupAllExpand')
|
|
650
|
+
},
|
|
651
|
+
on: {
|
|
652
|
+
input (value: any) {
|
|
653
|
+
defaultOptions.isRowGroupAllExpanded = value
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
})
|
|
657
|
+
]
|
|
658
|
+
: [])
|
|
659
|
+
])
|
|
660
|
+
])
|
|
661
|
+
]
|
|
662
|
+
])
|
|
617
663
|
])
|
|
664
|
+
]),
|
|
665
|
+
bottomSlot
|
|
666
|
+
? h('div', {
|
|
667
|
+
class: 'vxe-table-export--panel-bottom'
|
|
668
|
+
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
669
|
+
: renderEmptyElement($xeTable)
|
|
670
|
+
])
|
|
671
|
+
},
|
|
672
|
+
footer (): VNode {
|
|
673
|
+
const params = {
|
|
674
|
+
$table: $xeTable,
|
|
675
|
+
$grid: $xeGrid,
|
|
676
|
+
$gantt: $xeGantt,
|
|
677
|
+
options: defaultOptions,
|
|
678
|
+
columns,
|
|
679
|
+
params: defaultOptions.params as any
|
|
680
|
+
}
|
|
681
|
+
return h('div', {
|
|
682
|
+
class: 'vxe-table-export--panel-footer'
|
|
683
|
+
}, footerSlot
|
|
684
|
+
? $xeTable.callSlot(footerSlot, params, h)
|
|
685
|
+
: [
|
|
686
|
+
h('div', {
|
|
687
|
+
class: 'vxe-table-export--panel-btns'
|
|
688
|
+
}, [
|
|
689
|
+
VxeUIButtonComponent
|
|
690
|
+
? h(VxeUIButtonComponent, {
|
|
691
|
+
props: {
|
|
692
|
+
content: getI18n('vxe.export.expCancel')
|
|
693
|
+
},
|
|
694
|
+
on: {
|
|
695
|
+
click: $xeExportPanel.cancelEvent
|
|
696
|
+
}
|
|
697
|
+
})
|
|
698
|
+
: renderEmptyElement($xeTable),
|
|
699
|
+
VxeUIButtonComponent
|
|
700
|
+
? h(VxeUIButtonComponent, {
|
|
701
|
+
ref: 'confirmBtn',
|
|
702
|
+
props: {
|
|
703
|
+
status: 'primary',
|
|
704
|
+
content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
|
|
705
|
+
},
|
|
706
|
+
on: {
|
|
707
|
+
click: $xeExportPanel.confirmEvent
|
|
708
|
+
}
|
|
709
|
+
})
|
|
710
|
+
: renderEmptyElement($xeTable)
|
|
618
711
|
])
|
|
619
|
-
]),
|
|
620
|
-
bottomSlot
|
|
621
|
-
? h('div', {
|
|
622
|
-
class: 'vxe-table-export--panel-bottom'
|
|
623
|
-
}, $xeTable.callSlot(bottomSlot, params, h))
|
|
624
|
-
: renderEmptyElement($xeTable)
|
|
625
|
-
])
|
|
626
|
-
},
|
|
627
|
-
footer (): VNode {
|
|
628
|
-
const params = {
|
|
629
|
-
$table: $xeTable,
|
|
630
|
-
$grid: $xeGrid,
|
|
631
|
-
$gantt: $xeGantt,
|
|
632
|
-
options: defaultOptions,
|
|
633
|
-
columns,
|
|
634
|
-
params: defaultOptions.params as any
|
|
635
|
-
}
|
|
636
|
-
return h('div', {
|
|
637
|
-
class: 'vxe-table-export--panel-footer'
|
|
638
|
-
}, footerSlot
|
|
639
|
-
? $xeTable.callSlot(footerSlot, params, h)
|
|
640
|
-
: [
|
|
641
|
-
h('div', {
|
|
642
|
-
class: 'vxe-table-export--panel-btns'
|
|
643
|
-
}, [
|
|
644
|
-
h('vxe-button', {
|
|
645
|
-
props: {
|
|
646
|
-
content: getI18n('vxe.export.expCancel')
|
|
647
|
-
},
|
|
648
|
-
on: {
|
|
649
|
-
click: $xeExportPanel.cancelEvent
|
|
650
|
-
}
|
|
651
|
-
}),
|
|
652
|
-
h('vxe-button', {
|
|
653
|
-
ref: 'confirmBtn',
|
|
654
|
-
props: {
|
|
655
|
-
status: 'primary',
|
|
656
|
-
content: getI18n(isPrint ? 'vxe.export.expPrint' : 'vxe.export.expConfirm')
|
|
657
|
-
},
|
|
658
|
-
on: {
|
|
659
|
-
click: $xeExportPanel.confirmEvent
|
|
660
|
-
}
|
|
661
|
-
})
|
|
662
712
|
])
|
|
663
|
-
|
|
713
|
+
}
|
|
664
714
|
}
|
|
665
|
-
}
|
|
666
|
-
|
|
715
|
+
})
|
|
716
|
+
: renderEmptyElement($xeTable)
|
|
667
717
|
}
|
|
668
718
|
},
|
|
669
719
|
render (h: CreateElement) {
|