vxe-table 3.23.0-beta.2 → 3.23.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/style.css +1 -1
- package/es/table/module/export/export-panel.js +208 -195
- package/es/table/module/export/import-panel.js +31 -23
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +5 -1
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.js +3 -0
- package/lib/index.umd.js +47 -27
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/export/export-panel.js +22 -15
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +15 -9
- 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/dom.js +6 -1
- package/lib/ui/src/dom.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 +208 -195
- package/packages/table/module/export/import-panel.ts +31 -23
- package/packages/ui/src/dom.ts +7 -2
- package/packages/ui/src/utils.ts +4 -0
- /package/es/{iconfont.1787119200875.ttf → iconfont.1787216111946.ttf} +0 -0
- /package/es/{iconfont.1787119200875.woff → iconfont.1787216111946.woff} +0 -0
- /package/es/{iconfont.1787119200875.woff2 → iconfont.1787216111946.woff2} +0 -0
- /package/lib/{iconfont.1787119200875.ttf → iconfont.1787216111946.ttf} +0 -0
- /package/lib/{iconfont.1787119200875.woff → iconfont.1787216111946.woff} +0 -0
- /package/lib/{iconfont.1787119200875.woff2 → iconfont.1787216111946.woff2} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
|
-
import { formatText } from '../../../ui/src/utils';
|
|
4
|
+
import { formatText, getDefaultConfig } from '../../../ui/src/utils';
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log';
|
|
6
6
|
const { errLog } = createComponentLog('table');
|
|
7
7
|
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI;
|
|
@@ -226,6 +226,10 @@ export default {
|
|
|
226
226
|
const { hasTree, hasRowGroup, hasMerge, isPrint, hasColgroup, columns } = storeData;
|
|
227
227
|
const { isHeader } = defaultOptions;
|
|
228
228
|
const colVNs = [];
|
|
229
|
+
const exportOpts = $xeTable.computeExportOpts;
|
|
230
|
+
const printOpts = $xeTable.computePrintOpts;
|
|
231
|
+
const modelOptions = (isPrint ? printOpts : exportOpts).modelOptions || {};
|
|
232
|
+
const settingOptions = (isPrint ? printOpts : exportOpts).settingOptions || {};
|
|
229
233
|
const checkedAll = $xeExportPanel.computeCheckedAll;
|
|
230
234
|
const showSheet = $xeExportPanel.computeShowSheet;
|
|
231
235
|
const supportMerge = $xeExportPanel.computeSupportMerge;
|
|
@@ -285,17 +289,20 @@ export default {
|
|
|
285
289
|
props: {
|
|
286
290
|
id: 'VXE_EXPORT_MODAL',
|
|
287
291
|
value: storeData.visible,
|
|
288
|
-
title: getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
289
|
-
width: 660,
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
title: modelOptions.title || getI18n(isPrint ? 'vxe.export.printTitle' : 'vxe.export.expTitle'),
|
|
293
|
+
width: modelOptions.width || 660,
|
|
294
|
+
height: modelOptions.height,
|
|
295
|
+
minWidth: modelOptions.minWidth || 500,
|
|
296
|
+
minHeight: modelOptions.minHeight || 400,
|
|
297
|
+
mask: getDefaultConfig(modelOptions.mask, true),
|
|
298
|
+
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
294
299
|
showFooter: true,
|
|
295
300
|
escClosable: true,
|
|
296
301
|
maskClosable: true,
|
|
297
|
-
|
|
298
|
-
|
|
302
|
+
fullscreen: modelOptions.fullscreen,
|
|
303
|
+
showMinimize: modelOptions.showMinimize,
|
|
304
|
+
showMaximize: getDefaultConfig(modelOptions.showMaximize, true),
|
|
305
|
+
resize: getDefaultConfig(modelOptions.resize, true),
|
|
299
306
|
loading: reactData.loading
|
|
300
307
|
},
|
|
301
308
|
on: {
|
|
@@ -338,7 +345,7 @@ export default {
|
|
|
338
345
|
}, [
|
|
339
346
|
h('tbody', [
|
|
340
347
|
[
|
|
341
|
-
isPrint
|
|
348
|
+
isPrint || settingOptions.showFileName === false
|
|
342
349
|
? renderEmptyElement($xeTable)
|
|
343
350
|
: h('tr', [
|
|
344
351
|
h('td', getI18n('vxe.export.expName')),
|
|
@@ -361,7 +368,7 @@ export default {
|
|
|
361
368
|
: renderEmptyElement($xeTable)
|
|
362
369
|
])
|
|
363
370
|
]),
|
|
364
|
-
isPrint
|
|
371
|
+
isPrint || settingOptions.showType === false
|
|
365
372
|
? renderEmptyElement($xeTable)
|
|
366
373
|
: h('tr', [
|
|
367
374
|
h('td', getI18n('vxe.export.expType')),
|
|
@@ -379,7 +386,7 @@ export default {
|
|
|
379
386
|
})
|
|
380
387
|
])
|
|
381
388
|
]),
|
|
382
|
-
isPrint || showSheet
|
|
389
|
+
(isPrint || showSheet) && settingOptions.showSheet !== false
|
|
383
390
|
? h('tr', [
|
|
384
391
|
h('td', getI18n('vxe.export.expSheetName')),
|
|
385
392
|
h('td', [
|
|
@@ -402,58 +409,62 @@ export default {
|
|
|
402
409
|
])
|
|
403
410
|
])
|
|
404
411
|
: renderEmptyElement($xeTable),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
h('
|
|
408
|
-
h(
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
412
|
+
settingOptions.showMode === false
|
|
413
|
+
? renderEmptyElement($xeTable)
|
|
414
|
+
: h('tr', [
|
|
415
|
+
h('td', getI18n('vxe.export.expMode')),
|
|
416
|
+
h('td', [
|
|
417
|
+
h(VxeUISelectComponent, {
|
|
418
|
+
props: {
|
|
419
|
+
value: defaultOptions.mode,
|
|
420
|
+
options: storeData.modeList
|
|
421
|
+
},
|
|
422
|
+
on: {
|
|
423
|
+
modelValue(value) {
|
|
424
|
+
defaultOptions.mode = value;
|
|
425
|
+
}
|
|
416
426
|
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
])
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
h('
|
|
423
|
-
|
|
424
|
-
h('
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
h('ul', {
|
|
428
|
-
class: 'vxe-table-export--panel-column-header'
|
|
427
|
+
})
|
|
428
|
+
])
|
|
429
|
+
]),
|
|
430
|
+
settingOptions.showColumn === false
|
|
431
|
+
? renderEmptyElement($xeTable)
|
|
432
|
+
: h('tr', [
|
|
433
|
+
h('td', [getI18n('vxe.export.expColumn')]),
|
|
434
|
+
h('td', [
|
|
435
|
+
h('div', {
|
|
436
|
+
class: 'vxe-table-export--panel-column'
|
|
429
437
|
}, [
|
|
430
|
-
h('
|
|
431
|
-
class:
|
|
432
|
-
'is--checked': isAllChecked,
|
|
433
|
-
'is--indeterminate': isAllIndeterminate
|
|
434
|
-
}],
|
|
435
|
-
attrs: {
|
|
436
|
-
title: getI18n('vxe.table.allTitle')
|
|
437
|
-
},
|
|
438
|
-
on: {
|
|
439
|
-
click: $xeExportPanel.allColumnEvent
|
|
440
|
-
}
|
|
438
|
+
h('ul', {
|
|
439
|
+
class: 'vxe-table-export--panel-column-header'
|
|
441
440
|
}, [
|
|
442
|
-
h('
|
|
443
|
-
class: ['vxe-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
441
|
+
h('li', {
|
|
442
|
+
class: ['vxe-table-export--panel-column-option', {
|
|
443
|
+
'is--checked': isAllChecked,
|
|
444
|
+
'is--indeterminate': isAllIndeterminate
|
|
445
|
+
}],
|
|
446
|
+
attrs: {
|
|
447
|
+
title: getI18n('vxe.table.allTitle')
|
|
448
|
+
},
|
|
449
|
+
on: {
|
|
450
|
+
click: $xeExportPanel.allColumnEvent
|
|
451
|
+
}
|
|
452
|
+
}, [
|
|
453
|
+
h('span', {
|
|
454
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
455
|
+
}),
|
|
456
|
+
h('span', {
|
|
457
|
+
class: 'vxe-checkbox--label'
|
|
458
|
+
}, getI18n('vxe.export.expCurrentColumn'))
|
|
459
|
+
])
|
|
460
|
+
]),
|
|
461
|
+
h('ul', {
|
|
462
|
+
class: 'vxe-table-export--panel-column-body'
|
|
463
|
+
}, colVNs)
|
|
464
|
+
])
|
|
453
465
|
])
|
|
454
|
-
])
|
|
455
|
-
|
|
456
|
-
isPrint
|
|
466
|
+
]),
|
|
467
|
+
isPrint && (settingOptions.showWidthMode !== false)
|
|
457
468
|
? h('tr', [
|
|
458
469
|
h('td', getI18n('vxe.export.widthMode')),
|
|
459
470
|
h('td', [
|
|
@@ -473,154 +484,156 @@ export default {
|
|
|
473
484
|
])
|
|
474
485
|
])
|
|
475
486
|
: renderEmptyElement($xeTable),
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
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;
|
|
487
|
+
settingOptions.showParameter === false
|
|
488
|
+
? renderEmptyElement($xeTable)
|
|
489
|
+
: h('tr', [
|
|
490
|
+
h('td', getI18n('vxe.export.expOpts')),
|
|
491
|
+
parameterSlot
|
|
492
|
+
? h('td', [
|
|
493
|
+
h('div', {
|
|
494
|
+
class: 'vxe-table-export--panel-option-row'
|
|
495
|
+
}, $xeTable.callSlot(parameterSlot, params, h))
|
|
496
|
+
])
|
|
497
|
+
: h('td', [
|
|
498
|
+
h('div', {
|
|
499
|
+
class: 'vxe-table-export--panel-option-row'
|
|
500
|
+
}, VxeUICheckboxComponent
|
|
501
|
+
? [
|
|
502
|
+
h(VxeUICheckboxComponent, {
|
|
503
|
+
props: {
|
|
504
|
+
value: hasEmptyData || isHeader,
|
|
505
|
+
disabled: hasEmptyData,
|
|
506
|
+
title: getI18n('vxe.export.expHeaderTitle'),
|
|
507
|
+
content: getI18n('vxe.export.expOptHeader')
|
|
508
|
+
},
|
|
509
|
+
on: {
|
|
510
|
+
input(value) {
|
|
511
|
+
defaultOptions.isHeader = value;
|
|
512
|
+
}
|
|
512
513
|
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
514
|
+
}),
|
|
515
|
+
h(VxeUICheckboxComponent, {
|
|
516
|
+
props: {
|
|
517
|
+
value: defaultOptions.isFooter,
|
|
518
|
+
disabled: !storeData.hasFooter,
|
|
519
|
+
title: getI18n('vxe.export.expFooterTitle'),
|
|
520
|
+
content: getI18n('vxe.export.expOptFooter')
|
|
521
|
+
},
|
|
522
|
+
on: {
|
|
523
|
+
input(value) {
|
|
524
|
+
defaultOptions.isFooter = value;
|
|
525
|
+
}
|
|
525
526
|
}
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
527
|
+
}),
|
|
528
|
+
h(VxeUICheckboxComponent, {
|
|
529
|
+
props: {
|
|
530
|
+
value: isHeader ? defaultOptions.isTitle : false,
|
|
531
|
+
disabled: !isHeader,
|
|
532
|
+
title: getI18n('vxe.export.expTitleTitle'),
|
|
533
|
+
content: getI18n('vxe.export.expOptTitle')
|
|
534
|
+
},
|
|
535
|
+
on: {
|
|
536
|
+
input(value) {
|
|
537
|
+
defaultOptions.isTitle = value;
|
|
538
|
+
}
|
|
538
539
|
}
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
title: getI18n('vxe.export.expOriginalTitle'),
|
|
552
|
-
content: getI18n('vxe.export.expOptOriginal')
|
|
553
|
-
},
|
|
554
|
-
on: {
|
|
555
|
-
input(value) {
|
|
556
|
-
defaultOptions.original = value;
|
|
540
|
+
}),
|
|
541
|
+
h(VxeUICheckboxComponent, {
|
|
542
|
+
props: {
|
|
543
|
+
value: isHeader && hasColgroup && supportMerge ? defaultOptions.isColgroup : false,
|
|
544
|
+
disabled: !isHeader || !hasColgroup || !supportMerge,
|
|
545
|
+
title: getI18n('vxe.export.expColgroupTitle'),
|
|
546
|
+
content: getI18n('vxe.export.expOptColgroup')
|
|
547
|
+
},
|
|
548
|
+
on: {
|
|
549
|
+
input(value) {
|
|
550
|
+
defaultOptions.isColgroup = value;
|
|
551
|
+
}
|
|
557
552
|
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
553
|
+
})
|
|
554
|
+
]
|
|
555
|
+
: []),
|
|
556
|
+
h('div', {
|
|
557
|
+
class: 'vxe-table-export--panel-option-row'
|
|
558
|
+
}, VxeUICheckboxComponent
|
|
559
|
+
? [
|
|
560
|
+
h(VxeUICheckboxComponent, {
|
|
561
|
+
props: {
|
|
562
|
+
value: hasEmptyData ? false : defaultOptions.original,
|
|
563
|
+
disabled: hasEmptyData,
|
|
564
|
+
title: getI18n('vxe.export.expOriginalTitle'),
|
|
565
|
+
content: getI18n('vxe.export.expOptOriginal')
|
|
566
|
+
},
|
|
567
|
+
on: {
|
|
568
|
+
input(value) {
|
|
569
|
+
defaultOptions.original = value;
|
|
570
|
+
}
|
|
570
571
|
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
isPrint
|
|
574
|
-
? renderEmptyElement($xeTable)
|
|
575
|
-
: h(VxeUICheckboxComponent, {
|
|
572
|
+
}),
|
|
573
|
+
h(VxeUICheckboxComponent, {
|
|
576
574
|
props: {
|
|
577
|
-
value:
|
|
578
|
-
disabled: !
|
|
579
|
-
title: getI18n('vxe.export.
|
|
580
|
-
content: getI18n('vxe.export.
|
|
575
|
+
value: hasMerge && supportMerge && checkedAll ? defaultOptions.isMerge : false,
|
|
576
|
+
disabled: hasEmptyData || !hasMerge || !supportMerge || !checkedAll,
|
|
577
|
+
title: getI18n('vxe.export.expMergeTitle'),
|
|
578
|
+
content: getI18n('vxe.export.expOptMerge')
|
|
581
579
|
},
|
|
582
580
|
on: {
|
|
583
581
|
input(value) {
|
|
584
|
-
defaultOptions.
|
|
582
|
+
defaultOptions.isMerge = value;
|
|
585
583
|
}
|
|
586
584
|
}
|
|
587
|
-
})
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
585
|
+
}),
|
|
586
|
+
isPrint
|
|
587
|
+
? renderEmptyElement($xeTable)
|
|
588
|
+
: h(VxeUICheckboxComponent, {
|
|
589
|
+
props: {
|
|
590
|
+
value: supportStyle ? defaultOptions.useStyle : false,
|
|
591
|
+
disabled: !supportStyle,
|
|
592
|
+
title: getI18n('vxe.export.expUseStyleTitle'),
|
|
593
|
+
content: getI18n('vxe.export.expOptUseStyle')
|
|
594
|
+
},
|
|
595
|
+
on: {
|
|
596
|
+
input(value) {
|
|
597
|
+
defaultOptions.useStyle = value;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
})
|
|
601
|
+
]
|
|
602
|
+
: []),
|
|
603
|
+
h('div', {
|
|
604
|
+
class: 'vxe-table-export--panel-option-row'
|
|
605
|
+
}, VxeUICheckboxComponent
|
|
606
|
+
? [
|
|
607
|
+
h(VxeUICheckboxComponent, {
|
|
608
|
+
props: {
|
|
609
|
+
value: hasTree ? defaultOptions.isTreeAllExpanded : false,
|
|
610
|
+
disabled: hasEmptyData || !hasTree,
|
|
611
|
+
title: getI18n('vxe.export.expTreeAllExpandTitle'),
|
|
612
|
+
content: getI18n('vxe.export.expOptTreeAllExpand')
|
|
613
|
+
},
|
|
614
|
+
on: {
|
|
615
|
+
input(value) {
|
|
616
|
+
defaultOptions.isTreeAllExpanded = value;
|
|
617
|
+
}
|
|
604
618
|
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
619
|
+
}),
|
|
620
|
+
h(VxeUICheckboxComponent, {
|
|
621
|
+
props: {
|
|
622
|
+
value: hasRowGroup ? defaultOptions.isRowGroupAllExpanded : false,
|
|
623
|
+
disabled: hasEmptyData || !hasRowGroup,
|
|
624
|
+
title: getI18n('vxe.export.expRowGroupAllExpandTitle'),
|
|
625
|
+
content: getI18n('vxe.export.expOptRowGroupAllExpand')
|
|
626
|
+
},
|
|
627
|
+
on: {
|
|
628
|
+
input(value) {
|
|
629
|
+
defaultOptions.isRowGroupAllExpanded = value;
|
|
630
|
+
}
|
|
617
631
|
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
])
|
|
632
|
+
})
|
|
633
|
+
]
|
|
634
|
+
: [])
|
|
635
|
+
])
|
|
636
|
+
])
|
|
624
637
|
]
|
|
625
638
|
])
|
|
626
639
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
2
|
import { VxeUI } from '../../../ui';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
|
-
import { parseFile } from '../../../ui/src/utils';
|
|
4
|
+
import { getDefaultConfig, parseFile } from '../../../ui/src/utils';
|
|
5
5
|
import { createComponentLog } from '../../../ui/src/log';
|
|
6
6
|
const { errLog } = createComponentLog('table');
|
|
7
7
|
const { getI18n, getIcon, globalMixins, renderEmptyElement } = VxeUI;
|
|
@@ -131,7 +131,10 @@ export default {
|
|
|
131
131
|
const { defaultOptions, storeData } = props;
|
|
132
132
|
const selectName = $xeImportPanel.computeSelectName;
|
|
133
133
|
const hasFile = $xeImportPanel.computeHasFile;
|
|
134
|
+
const importOpts = $xeTable.computeImportOpts;
|
|
134
135
|
const parseTypeLabel = $xeImportPanel.computeParseTypeLabel;
|
|
136
|
+
const modelOptions = importOpts.modelOptions || {};
|
|
137
|
+
const settingOptions = importOpts.settingOptions || {};
|
|
135
138
|
const slots = defaultOptions.slots || {};
|
|
136
139
|
const topSlot = slots.top;
|
|
137
140
|
const bottomSlot = slots.bottom;
|
|
@@ -142,17 +145,20 @@ export default {
|
|
|
142
145
|
props: {
|
|
143
146
|
id: 'VXE_IMPORT_MODAL',
|
|
144
147
|
value: storeData.visible,
|
|
145
|
-
title: getI18n('vxe.import.impTitle'),
|
|
146
|
-
width: 540,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
title: modelOptions.title || getI18n('vxe.import.impTitle'),
|
|
149
|
+
width: modelOptions.width || 540,
|
|
150
|
+
height: modelOptions.height,
|
|
151
|
+
minWidth: modelOptions.minWidth || 360,
|
|
152
|
+
minHeight: modelOptions.minHeight || 240,
|
|
153
|
+
mask: getDefaultConfig(modelOptions.mask, true),
|
|
154
|
+
lockView: getDefaultConfig(modelOptions.lockView, true),
|
|
151
155
|
showFooter: true,
|
|
152
156
|
escClosable: true,
|
|
153
157
|
maskClosable: true,
|
|
154
|
-
|
|
155
|
-
|
|
158
|
+
fullscreen: modelOptions.fullscreen,
|
|
159
|
+
showMinimize: modelOptions.showMinimize,
|
|
160
|
+
showMaximize: getDefaultConfig(modelOptions.showMaximize, true),
|
|
161
|
+
resize: getDefaultConfig(modelOptions.resize, true),
|
|
156
162
|
loading: reactData.loading
|
|
157
163
|
},
|
|
158
164
|
on: {
|
|
@@ -226,22 +232,24 @@ export default {
|
|
|
226
232
|
h('td', getI18n('vxe.import.impType')),
|
|
227
233
|
h('td', parseTypeLabel)
|
|
228
234
|
]),
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
h('
|
|
232
|
-
h('vxe
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
settingOptions.showMode === false
|
|
236
|
+
? renderEmptyElement($xeTable)
|
|
237
|
+
: h('tr', [
|
|
238
|
+
h('td', getI18n('vxe.import.impMode')),
|
|
239
|
+
h('td', [
|
|
240
|
+
h('vxe-select', {
|
|
241
|
+
props: {
|
|
242
|
+
value: defaultOptions.mode,
|
|
243
|
+
options: storeData.modeList
|
|
244
|
+
},
|
|
245
|
+
on: {
|
|
246
|
+
modelValue(value) {
|
|
247
|
+
defaultOptions.mode = value;
|
|
248
|
+
}
|
|
240
249
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
250
|
+
})
|
|
251
|
+
])
|
|
243
252
|
])
|
|
244
|
-
])
|
|
245
253
|
])
|
|
246
254
|
])
|
|
247
255
|
]),
|
package/es/ui/index.js
CHANGED
package/es/ui/src/dom.js
CHANGED
|
@@ -217,8 +217,12 @@ export function wheelScrollTopTo(diffNum, cb) {
|
|
|
217
217
|
}
|
|
218
218
|
export function getPopupContainer(appendTo) {
|
|
219
219
|
const selectElem = appendTo && XEUtils.isFunction(appendTo) ? appendTo({}) : appendTo;
|
|
220
|
+
return selectElem || 'body';
|
|
221
|
+
}
|
|
222
|
+
export function getPopupAppendElement(appendTo) {
|
|
223
|
+
const selectElem = getPopupContainer(appendTo);
|
|
220
224
|
if (XEUtils.isString(selectElem)) {
|
|
221
225
|
return document.querySelector(selectElem) || document.body;
|
|
222
226
|
}
|
|
223
|
-
return selectElem
|
|
227
|
+
return selectElem;
|
|
224
228
|
}
|