vxe-table 3.23.0-beta.2 → 3.23.0-beta.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/style.css +1 -1
- package/es/table/module/export/export-panel.js +205 -193
- package/es/table/module/export/import-panel.js +28 -21
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +3 -0
- package/lib/index.umd.js +36 -22
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/export-panel.js +19 -13
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +12 -7
- package/lib/table/module/export/import-panel.min.js +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/ui/src/utils.js +4 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/export/export-panel.ts +205 -193
- package/packages/table/module/export/import-panel.ts +28 -21
- package/packages/ui/src/utils.ts +4 -0
- /package/es/{iconfont.1787119200875.ttf → iconfont.1787137343422.ttf} +0 -0
- /package/es/{iconfont.1787119200875.woff → iconfont.1787137343422.woff} +0 -0
- /package/es/{iconfont.1787119200875.woff2 → iconfont.1787137343422.woff2} +0 -0
- /package/lib/{iconfont.1787119200875.ttf → iconfont.1787137343422.ttf} +0 -0
- /package/lib/{iconfont.1787119200875.woff → iconfont.1787137343422.woff} +0 -0
- /package/lib/{iconfont.1787119200875.woff2 → iconfont.1787137343422.woff2} +0 -0
|
@@ -2,7 +2,7 @@ import { CreateElement, VNode, PropType } from 'vue'
|
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import XEUtils from 'xe-utils'
|
|
5
|
-
import { formatText } from '../../../ui/src/utils'
|
|
5
|
+
import { formatText, getDefaultConfig } from '../../../ui/src/utils'
|
|
6
6
|
import { createComponentLog } from '../../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { VxeComponentSizeType } from 'vxe-pc-ui'
|
|
@@ -260,6 +260,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
260
260
|
const { hasTree, hasRowGroup, hasMerge, isPrint, hasColgroup, columns } = storeData
|
|
261
261
|
const { isHeader } = defaultOptions
|
|
262
262
|
const colVNs: VNode[] = []
|
|
263
|
+
const exportOpts = $xeTable.computeExportOpts
|
|
264
|
+
const printOpts = $xeTable.computePrintOpts
|
|
265
|
+
const modelOptions = (isPrint ? printOpts : exportOpts).modelOptions || {}
|
|
266
|
+
const settingOptions = (isPrint ? printOpts : exportOpts).settingOptions || {}
|
|
263
267
|
const checkedAll = $xeExportPanel.computeCheckedAll
|
|
264
268
|
const showSheet = $xeExportPanel.computeShowSheet
|
|
265
269
|
const supportMerge = $xeExportPanel.computeSupportMerge
|
|
@@ -321,17 +325,19 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
321
325
|
props: {
|
|
322
326
|
id: 'VXE_EXPORT_MODAL',
|
|
323
327
|
value: storeData.visible,
|
|
324
|
-
title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
325
|
-
width: 660,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
title: modelOptions.title || getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
329
|
+
width: modelOptions.width || 660,
|
|
330
|
+
height: modelOptions.height,
|
|
331
|
+
minWidth: modelOptions.minWidth || 500,
|
|
332
|
+
minHeight: modelOptions.minHeight || 400,
|
|
328
333
|
mask: true,
|
|
329
334
|
lockView: true,
|
|
330
335
|
showFooter: true,
|
|
331
336
|
escClosable: true,
|
|
332
337
|
maskClosable: true,
|
|
333
|
-
|
|
334
|
-
|
|
338
|
+
showMinimize: modelOptions.showMinimize,
|
|
339
|
+
showMaximize: getDefaultConfig(modelOptions.showMaximize, true),
|
|
340
|
+
resize: getDefaultConfig(modelOptions.resize, true),
|
|
335
341
|
loading: reactData.loading
|
|
336
342
|
},
|
|
337
343
|
on: {
|
|
@@ -375,7 +381,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
375
381
|
}, [
|
|
376
382
|
h('tbody', [
|
|
377
383
|
[
|
|
378
|
-
isPrint
|
|
384
|
+
isPrint || settingOptions.showFileName === false
|
|
379
385
|
? renderEmptyElement($xeTable)
|
|
380
386
|
: h('tr', [
|
|
381
387
|
h('td', getI18n('vxe.export.expName')),
|
|
@@ -398,7 +404,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
398
404
|
: renderEmptyElement($xeTable)
|
|
399
405
|
])
|
|
400
406
|
]),
|
|
401
|
-
isPrint
|
|
407
|
+
isPrint || settingOptions.showType === false
|
|
402
408
|
? renderEmptyElement($xeTable)
|
|
403
409
|
: h('tr', [
|
|
404
410
|
h('td', getI18n('vxe.export.expType')),
|
|
@@ -416,7 +422,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
416
422
|
})
|
|
417
423
|
])
|
|
418
424
|
]),
|
|
419
|
-
isPrint || showSheet
|
|
425
|
+
(isPrint || showSheet) && settingOptions.showSheet !== false
|
|
420
426
|
? h('tr', [
|
|
421
427
|
h('td', getI18n('vxe.export.expSheetName')),
|
|
422
428
|
h('td', [
|
|
@@ -439,58 +445,62 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
439
445
|
])
|
|
440
446
|
])
|
|
441
447
|
: renderEmptyElement($xeTable),
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
h('
|
|
445
|
-
h(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
448
|
+
settingOptions.showMode === false
|
|
449
|
+
? renderEmptyElement($xeTable)
|
|
450
|
+
: h('tr', [
|
|
451
|
+
h('td', getI18n('vxe.export.expMode')),
|
|
452
|
+
h('td', [
|
|
453
|
+
h(VxeUISelectComponent, {
|
|
454
|
+
props: {
|
|
455
|
+
value: defaultOptions.mode,
|
|
456
|
+
options: storeData.modeList
|
|
457
|
+
},
|
|
458
|
+
on: {
|
|
459
|
+
modelValue (value: any) {
|
|
460
|
+
defaultOptions.mode = value
|
|
461
|
+
}
|
|
453
462
|
}
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
])
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
h('
|
|
460
|
-
|
|
461
|
-
h('
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
h('ul', {
|
|
465
|
-
class: 'vxe-table-export--panel-column-header'
|
|
463
|
+
})
|
|
464
|
+
])
|
|
465
|
+
]),
|
|
466
|
+
settingOptions.showColumn === false
|
|
467
|
+
? renderEmptyElement($xeTable)
|
|
468
|
+
: h('tr', [
|
|
469
|
+
h('td', [getI18n('vxe.export.expColumn')]),
|
|
470
|
+
h('td', [
|
|
471
|
+
h('div', {
|
|
472
|
+
class: 'vxe-table-export--panel-column'
|
|
466
473
|
}, [
|
|
467
|
-
h('
|
|
468
|
-
class:
|
|
469
|
-
'is--checked': isAllChecked,
|
|
470
|
-
'is--indeterminate': isAllIndeterminate
|
|
471
|
-
}],
|
|
472
|
-
attrs: {
|
|
473
|
-
title: getI18n('vxe.table.allTitle')
|
|
474
|
-
},
|
|
475
|
-
on: {
|
|
476
|
-
click: $xeExportPanel.allColumnEvent
|
|
477
|
-
}
|
|
474
|
+
h('ul', {
|
|
475
|
+
class: 'vxe-table-export--panel-column-header'
|
|
478
476
|
}, [
|
|
479
|
-
h('
|
|
480
|
-
class: ['vxe-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
477
|
+
h('li', {
|
|
478
|
+
class: ['vxe-table-export--panel-column-option', {
|
|
479
|
+
'is--checked': isAllChecked,
|
|
480
|
+
'is--indeterminate': isAllIndeterminate
|
|
481
|
+
}],
|
|
482
|
+
attrs: {
|
|
483
|
+
title: getI18n('vxe.table.allTitle')
|
|
484
|
+
},
|
|
485
|
+
on: {
|
|
486
|
+
click: $xeExportPanel.allColumnEvent
|
|
487
|
+
}
|
|
488
|
+
}, [
|
|
489
|
+
h('span', {
|
|
490
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
491
|
+
}),
|
|
492
|
+
h('span', {
|
|
493
|
+
class: 'vxe-checkbox--label'
|
|
494
|
+
}, getI18n('vxe.export.expCurrentColumn'))
|
|
495
|
+
])
|
|
496
|
+
]),
|
|
497
|
+
h('ul', {
|
|
498
|
+
class: 'vxe-table-export--panel-column-body'
|
|
499
|
+
}, colVNs)
|
|
500
|
+
])
|
|
490
501
|
])
|
|
491
|
-
])
|
|
492
|
-
|
|
493
|
-
isPrint
|
|
502
|
+
]),
|
|
503
|
+
isPrint && (settingOptions.showWidthMode !== false)
|
|
494
504
|
? h('tr', [
|
|
495
505
|
h('td', getI18n('vxe.export.widthMode')),
|
|
496
506
|
h('td', [
|
|
@@ -510,154 +520,156 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
510
520
|
])
|
|
511
521
|
])
|
|
512
522
|
: renderEmptyElement($xeTable),
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
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
|
|
523
|
+
settingOptions.showParameter === false
|
|
524
|
+
? renderEmptyElement($xeTable)
|
|
525
|
+
: h('tr', [
|
|
526
|
+
h('td', getI18n('vxe.export.expOpts')),
|
|
527
|
+
parameterSlot
|
|
528
|
+
? h('td', [
|
|
529
|
+
h('div', {
|
|
530
|
+
class: 'vxe-table-export--panel-option-row'
|
|
531
|
+
}, $xeTable.callSlot(parameterSlot, params, h))
|
|
532
|
+
])
|
|
533
|
+
: h('td', [
|
|
534
|
+
h('div', {
|
|
535
|
+
class: 'vxe-table-export--panel-option-row'
|
|
536
|
+
}, VxeUICheckboxComponent
|
|
537
|
+
? [
|
|
538
|
+
h(VxeUICheckboxComponent, {
|
|
539
|
+
props: {
|
|
540
|
+
value: hasEmptyData || isHeader,
|
|
541
|
+
disabled: hasEmptyData,
|
|
542
|
+
title: getI18n('vxe.export.expHeaderTitle'),
|
|
543
|
+
content: getI18n('vxe.export.expOptHeader')
|
|
544
|
+
},
|
|
545
|
+
on: {
|
|
546
|
+
input (value: any) {
|
|
547
|
+
defaultOptions.isHeader = value
|
|
548
|
+
}
|
|
549
549
|
}
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
550
|
+
}),
|
|
551
|
+
h(VxeUICheckboxComponent, {
|
|
552
|
+
props: {
|
|
553
|
+
value: defaultOptions.isFooter,
|
|
554
|
+
disabled: !storeData.hasFooter,
|
|
555
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
556
|
+
content: getI18n('vxe.export.expOptFooter')
|
|
557
|
+
},
|
|
558
|
+
on: {
|
|
559
|
+
input (value: any) {
|
|
560
|
+
defaultOptions.isFooter = value
|
|
561
|
+
}
|
|
562
562
|
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
563
|
+
}),
|
|
564
|
+
h(VxeUICheckboxComponent, {
|
|
565
|
+
props: {
|
|
566
|
+
value: isHeader ? defaultOptions.isTitle : false,
|
|
567
|
+
disabled: !isHeader,
|
|
568
|
+
title: getI18n('vxe.export.expTitleTitle'),
|
|
569
|
+
content: getI18n('vxe.export.expOptTitle')
|
|
570
|
+
},
|
|
571
|
+
on: {
|
|
572
|
+
input (value: any) {
|
|
573
|
+
defaultOptions.isTitle = value
|
|
574
|
+
}
|
|
575
575
|
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
title: getI18n('vxe.export.expOriginalTitle'),
|
|
589
|
-
content: getI18n('vxe.export.expOptOriginal')
|
|
590
|
-
},
|
|
591
|
-
on: {
|
|
592
|
-
input (value: any) {
|
|
593
|
-
defaultOptions.original = value
|
|
576
|
+
}),
|
|
577
|
+
h(VxeUICheckboxComponent, {
|
|
578
|
+
props: {
|
|
579
|
+
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
580
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
581
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
582
|
+
content: getI18n('vxe.export.expOptColgroup')
|
|
583
|
+
},
|
|
584
|
+
on: {
|
|
585
|
+
input (value: any) {
|
|
586
|
+
defaultOptions.isColgroup = value
|
|
587
|
+
}
|
|
594
588
|
}
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
589
|
+
})
|
|
590
|
+
]
|
|
591
|
+
: []),
|
|
592
|
+
h('div', {
|
|
593
|
+
class: 'vxe-table-export--panel-option-row'
|
|
594
|
+
}, VxeUICheckboxComponent
|
|
595
|
+
? [
|
|
596
|
+
h(VxeUICheckboxComponent, {
|
|
597
|
+
props: {
|
|
598
|
+
value: hasEmptyData ? false : defaultOptions.original,
|
|
599
|
+
disabled: hasEmptyData,
|
|
600
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
601
|
+
content: getI18n('vxe.export.expOptOriginal')
|
|
602
|
+
},
|
|
603
|
+
on: {
|
|
604
|
+
input (value: any) {
|
|
605
|
+
defaultOptions.original = value
|
|
606
|
+
}
|
|
607
607
|
}
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
isPrint
|
|
611
|
-
? renderEmptyElement($xeTable)
|
|
612
|
-
: h(VxeUICheckboxComponent, {
|
|
608
|
+
}),
|
|
609
|
+
h(VxeUICheckboxComponent, {
|
|
613
610
|
props: {
|
|
614
|
-
value:
|
|
615
|
-
disabled: !
|
|
616
|
-
title: getI18n('vxe.export.
|
|
617
|
-
content: getI18n('vxe.export.
|
|
611
|
+
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
612
|
+
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
613
|
+
title: getI18n('vxe.export.expMergeTitle'),
|
|
614
|
+
content: getI18n('vxe.export.expOptMerge')
|
|
618
615
|
},
|
|
619
616
|
on: {
|
|
620
617
|
input (value: any) {
|
|
621
|
-
defaultOptions.
|
|
618
|
+
defaultOptions.isMerge = value
|
|
622
619
|
}
|
|
623
620
|
}
|
|
624
|
-
})
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
621
|
+
}),
|
|
622
|
+
isPrint
|
|
623
|
+
? renderEmptyElement($xeTable)
|
|
624
|
+
: h(VxeUICheckboxComponent, {
|
|
625
|
+
props: {
|
|
626
|
+
value: supportStyle ? defaultOptions.useStyle : false,
|
|
627
|
+
disabled: !supportStyle,
|
|
628
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
629
|
+
content: getI18n('vxe.export.expOptUseStyle')
|
|
630
|
+
},
|
|
631
|
+
on: {
|
|
632
|
+
input (value: any) {
|
|
633
|
+
defaultOptions.useStyle = value
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
})
|
|
637
|
+
]
|
|
638
|
+
: []),
|
|
639
|
+
h('div', {
|
|
640
|
+
class: 'vxe-table-export--panel-option-row'
|
|
641
|
+
}, VxeUICheckboxComponent
|
|
642
|
+
? [
|
|
643
|
+
h(VxeUICheckboxComponent, {
|
|
644
|
+
props: {
|
|
645
|
+
value: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
646
|
+
disabled: hasEmptyData || !hasTree,
|
|
647
|
+
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
648
|
+
content: getI18n('vxe.export.expOptTreeAllExpand')
|
|
649
|
+
},
|
|
650
|
+
on: {
|
|
651
|
+
input (value: any) {
|
|
652
|
+
defaultOptions.isTreeAllExpanded = value
|
|
653
|
+
}
|
|
641
654
|
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
655
|
+
}),
|
|
656
|
+
h(VxeUICheckboxComponent, {
|
|
657
|
+
props: {
|
|
658
|
+
value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
659
|
+
disabled: hasEmptyData || !hasRowGroup,
|
|
660
|
+
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
661
|
+
content: getI18n('vxe.export.expOptRowGroupAllExpand')
|
|
662
|
+
},
|
|
663
|
+
on: {
|
|
664
|
+
input (value: any) {
|
|
665
|
+
defaultOptions.isRowGroupAllExpanded = value
|
|
666
|
+
}
|
|
654
667
|
}
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
]
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
])
|
|
668
|
+
})
|
|
669
|
+
]
|
|
670
|
+
: [])
|
|
671
|
+
])
|
|
672
|
+
])
|
|
661
673
|
]
|
|
662
674
|
])
|
|
663
675
|
])
|
|
@@ -2,7 +2,7 @@ import { CreateElement, PropType } from 'vue'
|
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import XEUtils from 'xe-utils'
|
|
5
|
-
import { parseFile } from '../../../ui/src/utils'
|
|
5
|
+
import { getDefaultConfig, parseFile } from '../../../ui/src/utils'
|
|
6
6
|
import { createComponentLog } from '../../../ui/src/log'
|
|
7
7
|
|
|
8
8
|
import type { VxeComponentSizeType } from 'vxe-pc-ui'
|
|
@@ -154,7 +154,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
154
154
|
const { defaultOptions, storeData } = props
|
|
155
155
|
const selectName = $xeImportPanel.computeSelectName as string
|
|
156
156
|
const hasFile = $xeImportPanel.computeHasFile
|
|
157
|
+
const importOpts = $xeTable.computeImportOpts
|
|
157
158
|
const parseTypeLabel = $xeImportPanel.computeParseTypeLabel as string
|
|
159
|
+
const modelOptions = importOpts.modelOptions || {}
|
|
160
|
+
const settingOptions = importOpts.settingOptions || {}
|
|
158
161
|
const slots = defaultOptions.slots || {}
|
|
159
162
|
const topSlot = slots.top
|
|
160
163
|
const bottomSlot = slots.bottom
|
|
@@ -165,17 +168,19 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
165
168
|
props: {
|
|
166
169
|
id: 'VXE_IMPORT_MODAL',
|
|
167
170
|
value: storeData.visible,
|
|
168
|
-
title: getI18n('vxe.import.impTitle'),
|
|
169
|
-
width: 540,
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
title: modelOptions.title || getI18n('vxe.import.impTitle'),
|
|
172
|
+
width: modelOptions.width || 540,
|
|
173
|
+
height: modelOptions.height,
|
|
174
|
+
minWidth: modelOptions.minWidth || 360,
|
|
175
|
+
minHeight: modelOptions.minHeight || 240,
|
|
172
176
|
mask: true,
|
|
173
177
|
lockView: true,
|
|
174
178
|
showFooter: true,
|
|
175
179
|
escClosable: true,
|
|
176
180
|
maskClosable: true,
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
showMinimize: modelOptions.showMinimize,
|
|
182
|
+
showMaximize: getDefaultConfig(modelOptions.showMaximize, true),
|
|
183
|
+
resize: getDefaultConfig(modelOptions.resize, true),
|
|
179
184
|
loading: reactData.loading
|
|
180
185
|
},
|
|
181
186
|
on: {
|
|
@@ -250,22 +255,24 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
250
255
|
h('td', getI18n('vxe.import.impType')),
|
|
251
256
|
h('td', parseTypeLabel)
|
|
252
257
|
]),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
h('
|
|
256
|
-
h('vxe
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
258
|
+
settingOptions.showMode === false
|
|
259
|
+
? renderEmptyElement($xeTable)
|
|
260
|
+
: h('tr', [
|
|
261
|
+
h('td', getI18n('vxe.import.impMode')),
|
|
262
|
+
h('td', [
|
|
263
|
+
h('vxe-select', {
|
|
264
|
+
props: {
|
|
265
|
+
value: defaultOptions.mode,
|
|
266
|
+
options: storeData.modeList
|
|
267
|
+
},
|
|
268
|
+
on: {
|
|
269
|
+
modelValue (value: any) {
|
|
270
|
+
defaultOptions.mode = value
|
|
271
|
+
}
|
|
264
272
|
}
|
|
265
|
-
}
|
|
266
|
-
|
|
273
|
+
})
|
|
274
|
+
])
|
|
267
275
|
])
|
|
268
|
-
])
|
|
269
276
|
])
|
|
270
277
|
])
|
|
271
278
|
]
|
package/packages/ui/src/utils.ts
CHANGED
|
@@ -54,3 +54,7 @@ export function eqEmptyValue (cellValue: any) {
|
|
|
54
54
|
export function getClass (property: any, params: any) {
|
|
55
55
|
return property ? XEUtils.isFunction(property) ? property(params) : property : ''
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
export function getDefaultConfig (val1: any, def1: any) {
|
|
59
|
+
return XEUtils.eqNull(val1) ? def1 : val1
|
|
60
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|