vxe-table 3.9.0-rc.2 → 3.9.0-rc.21
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/grid/src/grid.js +120 -66
- package/es/locale/lang/en-US.js +2 -8
- package/es/locale/lang/es-ES.js +2 -1
- package/es/locale/lang/hu-HU.d.ts +2 -0
- package/es/locale/lang/hu-HU.js +497 -501
- package/es/locale/lang/ja-JP.js +2 -8
- package/es/locale/lang/ko-KR.d.ts +2 -0
- package/es/locale/lang/ko-KR.js +2 -8
- package/es/locale/lang/pt-BR.js +2 -8
- package/es/locale/lang/ru-RU.d.ts +2 -0
- package/es/locale/lang/ru-RU.js +497 -503
- package/es/locale/lang/uk-UA.d.ts +2 -0
- package/es/locale/lang/uk-UA.js +667 -0
- package/es/locale/lang/vi-VN.js +2 -8
- package/es/locale/lang/zh-CHT.d.ts +2 -0
- package/es/locale/lang/zh-CHT.js +667 -0
- package/es/locale/lang/zh-CN.js +2 -8
- package/es/locale/lang/zh-HK.js +2 -2
- package/es/locale/lang/zh-MO.js +2 -2
- package/es/locale/lang/zh-TC.js +2 -673
- package/es/locale/lang/zh-TW.js +2 -2
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/index.js +29 -3
- package/es/table/module/custom/panel.js +183 -173
- package/es/table/module/edit/mixin.js +33 -24
- package/es/table/module/export/export-panel.js +32 -4
- package/es/table/module/export/import-panel.js +24 -5
- package/es/table/module/export/mixin.js +11 -11
- package/es/table/module/menu/mixin.js +2 -2
- package/es/table/module/validator/mixin.js +4 -4
- package/es/table/render/index.js +23 -38
- package/es/table/src/body.js +1 -0
- package/es/table/src/columnInfo.js +3 -3
- package/es/table/src/methods.js +48 -40
- package/es/table/src/props.js +65 -15
- package/es/table/src/table.js +161 -55
- package/es/table/src/util.js +3 -2
- package/es/table/style.css +37 -23
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +21 -7
- package/es/ui/index.js +5 -4
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/vn.js +24 -1
- package/es/vxe-table/style.css +37 -23
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +115 -68
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.umd.js +632 -330
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -8
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -8
- package/lib/locale/lang/es-ES.js +2 -1
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -1
- package/lib/locale/lang/hu-HU.d.ts +2 -0
- package/lib/locale/lang/hu-HU.js +497 -501
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +687 -0
- package/lib/locale/lang/ja-JP.js +2 -8
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -8
- package/lib/locale/lang/ko-KR.d.ts +2 -0
- package/lib/locale/lang/ko-KR.js +2 -8
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +687 -0
- package/lib/locale/lang/pt-BR.js +2 -8
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -8
- package/lib/locale/lang/ru-RU.d.ts +2 -0
- package/lib/locale/lang/ru-RU.js +497 -503
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +687 -0
- package/lib/locale/lang/uk-UA.d.ts +2 -0
- package/lib/locale/lang/uk-UA.js +673 -0
- package/lib/locale/lang/uk-UA.min.js +1 -0
- package/lib/locale/lang/uk-UA.umd.js +687 -0
- package/lib/locale/lang/vi-VN.js +2 -8
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/zh-CHT.d.ts +2 -0
- package/lib/locale/lang/zh-CHT.js +673 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -0
- package/lib/locale/lang/zh-CHT.umd.js +687 -0
- package/lib/locale/lang/zh-CN.js +2 -8
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -8
- package/lib/locale/lang/zh-HK.js +2 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -677
- package/lib/locale/lang/zh-MO.js +2 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -677
- package/lib/locale/lang/zh-TC.js +3 -673
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -677
- package/lib/locale/lang/zh-TW.js +2 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -677
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +30 -3
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/panel.js +12 -7
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +32 -23
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/export/export-panel.js +31 -4
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +23 -5
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/export/mixin.js +11 -11
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/menu/mixin.js +2 -2
- package/lib/table/module/menu/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +4 -4
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +27 -41
- package/lib/table/render/index.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/columnInfo.js +3 -3
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +47 -40
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +7 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +147 -48
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +3 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +37 -23
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +21 -7
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +6 -5
- 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/vn.js +26 -1
- package/lib/ui/src/vn.min.js +1 -1
- package/lib/vxe-table/style/style.css +37 -23
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +127 -65
- package/packages/locale/lang/en-US.ts +2 -10
- package/packages/locale/lang/es-ES.ts +2 -1
- package/packages/locale/lang/hu-HU.ts +497 -503
- package/packages/locale/lang/ja-JP.ts +2 -10
- package/packages/locale/lang/ko-KR.ts +2 -10
- package/packages/locale/lang/pt-BR.ts +2 -10
- package/packages/locale/lang/ru-RU.ts +497 -505
- package/packages/locale/lang/uk-UA.ts +667 -0
- package/packages/locale/lang/vi-VN.ts +2 -10
- package/packages/locale/lang/zh-CHT.ts +667 -0
- package/packages/locale/lang/zh-CN.ts +2 -10
- package/packages/locale/lang/zh-HK.ts +2 -2
- package/packages/locale/lang/zh-MO.ts +2 -2
- package/packages/locale/lang/zh-TC.ts +2 -674
- package/packages/locale/lang/zh-TW.ts +2 -2
- package/packages/table/index.ts +28 -5
- package/packages/table/module/custom/panel.ts +186 -175
- package/packages/table/module/edit/mixin.ts +32 -23
- package/packages/table/module/export/export-panel.ts +36 -4
- package/packages/table/module/export/import-panel.ts +28 -5
- package/packages/table/module/export/mixin.ts +11 -11
- package/packages/table/module/menu/mixin.ts +2 -2
- package/packages/table/module/validator/mixin.ts +4 -4
- package/packages/table/render/index.ts +26 -40
- package/packages/table/src/body.ts +1 -0
- package/packages/table/src/columnInfo.ts +3 -3
- package/packages/table/src/methods.ts +47 -40
- package/packages/table/src/props.ts +68 -15
- package/packages/table/src/table.ts +167 -56
- package/packages/table/src/util.ts +3 -2
- package/packages/toolbar/src/toolbar.ts +21 -7
- package/packages/ui/index.ts +3 -2
- package/packages/ui/src/vn.ts +26 -1
- package/styles/components/table.scss +82 -17
- package/types/all.d.ts +2 -2
- /package/es/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/es/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/es/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
- /package/lib/{iconfont.1726028471123.ttf → iconfont.1727868548661.ttf} +0 -0
- /package/lib/{iconfont.1726028471123.woff → iconfont.1727868548661.woff} +0 -0
- /package/lib/{iconfont.1726028471123.woff2 → iconfont.1727868548661.woff2} +0 -0
|
@@ -3,7 +3,7 @@ import { formatText } from '../../../ui/src/utils';
|
|
|
3
3
|
import { addClass, removeClass } from '../../../ui/src/dom';
|
|
4
4
|
import { errLog } from '../../../ui/src/log';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
6
|
-
const { getI18n, getIcon } = VxeUI;
|
|
6
|
+
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
7
7
|
function updateDropHint(_vm, evnt) {
|
|
8
8
|
const { $refs } = _vm;
|
|
9
9
|
const dragHintEl = $refs.dragHintElemRef;
|
|
@@ -267,7 +267,11 @@ const renderSimplePanel = (h, _vm) => {
|
|
|
267
267
|
: []);
|
|
268
268
|
};
|
|
269
269
|
const renderPopupPanel = (h, _vm) => {
|
|
270
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
270
271
|
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
272
|
+
const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
|
|
273
|
+
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
274
|
+
const $xeTableCustomPanel = _vm;
|
|
271
275
|
const { _e, $xetable, customStore } = _vm;
|
|
272
276
|
const { customOpts, customColumnList, columnOpts, isMaxFixedColumn } = $xetable;
|
|
273
277
|
const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
|
|
@@ -375,18 +379,20 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
375
379
|
}, [
|
|
376
380
|
column.children && column.children.length
|
|
377
381
|
? h('span', '-')
|
|
378
|
-
:
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
: (VxeUIInputComponent
|
|
383
|
+
? h(VxeUIInputComponent, {
|
|
384
|
+
props: {
|
|
385
|
+
type: 'integer',
|
|
386
|
+
disabled: isHidden,
|
|
387
|
+
value: column.renderResizeWidth
|
|
388
|
+
},
|
|
389
|
+
on: {
|
|
390
|
+
modelValue(value) {
|
|
391
|
+
column.renderResizeWidth = Math.max(0, Number(value));
|
|
392
|
+
}
|
|
387
393
|
}
|
|
388
|
-
}
|
|
389
|
-
|
|
394
|
+
})
|
|
395
|
+
: renderEmptyElement($xeTableCustomPanel))
|
|
390
396
|
])
|
|
391
397
|
: _e(),
|
|
392
398
|
allowFixed
|
|
@@ -420,177 +426,181 @@ const renderPopupPanel = (h, _vm) => {
|
|
|
420
426
|
});
|
|
421
427
|
const isAllChecked = customStore.isAll;
|
|
422
428
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
423
|
-
return
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
h('div', {
|
|
453
|
-
class: 'vxe-table-custom-popup--table-wrapper'
|
|
429
|
+
return VxeUIModalComponent
|
|
430
|
+
? h(VxeUIModalComponent, {
|
|
431
|
+
key: 'modal',
|
|
432
|
+
props: {
|
|
433
|
+
className: ['vxe-table-custom-popup-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
434
|
+
value: customStore.visible,
|
|
435
|
+
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
436
|
+
width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
437
|
+
minWidth: modalOpts.minWidth || 700,
|
|
438
|
+
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
439
|
+
minHeight: modalOpts.minHeight || 400,
|
|
440
|
+
showZoom: !!modalOpts.showZoom,
|
|
441
|
+
mask: !!modalOpts.mask,
|
|
442
|
+
lockView: !!modalOpts.lockView,
|
|
443
|
+
resize: !!modalOpts.resize,
|
|
444
|
+
escClosable: !!modalOpts.escClosable,
|
|
445
|
+
destroyOnClose: true,
|
|
446
|
+
showFooter: true
|
|
447
|
+
},
|
|
448
|
+
on: {
|
|
449
|
+
input(value) {
|
|
450
|
+
customStore.visible = value;
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
scopedSlots: {
|
|
454
|
+
default: () => {
|
|
455
|
+
return h('div', {
|
|
456
|
+
ref: 'bodyElemRef',
|
|
457
|
+
class: 'vxe-table-custom-popup--body'
|
|
454
458
|
}, [
|
|
455
|
-
h('
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
width: '80px'
|
|
461
|
-
}
|
|
462
|
-
})
|
|
463
|
-
: _e(),
|
|
464
|
-
allowSort
|
|
465
|
-
? h('col', {
|
|
466
|
-
style: {
|
|
467
|
-
width: '80px'
|
|
468
|
-
}
|
|
469
|
-
})
|
|
470
|
-
: _e(),
|
|
471
|
-
h('col', {
|
|
472
|
-
style: {
|
|
473
|
-
minWidth: '120px'
|
|
474
|
-
}
|
|
475
|
-
}),
|
|
476
|
-
allowResizable
|
|
477
|
-
? h('col', {
|
|
478
|
-
style: {
|
|
479
|
-
width: '140px'
|
|
480
|
-
}
|
|
481
|
-
})
|
|
482
|
-
: _e(),
|
|
483
|
-
allowFixed
|
|
484
|
-
? h('col', {
|
|
485
|
-
style: {
|
|
486
|
-
width: '200px'
|
|
487
|
-
}
|
|
488
|
-
})
|
|
489
|
-
: _e()
|
|
490
|
-
]),
|
|
491
|
-
h('thead', {}, [
|
|
492
|
-
h('tr', {}, [
|
|
459
|
+
h('div', {
|
|
460
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
461
|
+
}, [
|
|
462
|
+
h('table', {}, [
|
|
463
|
+
h('colgroup', {}, [
|
|
493
464
|
allowVisible
|
|
494
|
-
? h('
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
}],
|
|
500
|
-
attrs: {
|
|
501
|
-
title: getI18n('vxe.table.allTitle')
|
|
502
|
-
},
|
|
503
|
-
on: {
|
|
504
|
-
click: _vm.allOptionEvent
|
|
505
|
-
}
|
|
506
|
-
}, [
|
|
507
|
-
h('span', {
|
|
508
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
509
|
-
}),
|
|
510
|
-
h('span', {
|
|
511
|
-
class: 'vxe-checkbox--label'
|
|
512
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
513
|
-
])
|
|
514
|
-
])
|
|
465
|
+
? h('col', {
|
|
466
|
+
style: {
|
|
467
|
+
width: '80px'
|
|
468
|
+
}
|
|
469
|
+
})
|
|
515
470
|
: _e(),
|
|
516
471
|
allowSort
|
|
517
|
-
? h('
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
props: {
|
|
523
|
-
enterable: true,
|
|
524
|
-
content: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
525
|
-
popupClassName: 'vxe-table--ignore-clear'
|
|
526
|
-
},
|
|
527
|
-
scopedSlots: {
|
|
528
|
-
default: () => {
|
|
529
|
-
return h('i', {
|
|
530
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
})
|
|
535
|
-
])
|
|
472
|
+
? h('col', {
|
|
473
|
+
style: {
|
|
474
|
+
width: '80px'
|
|
475
|
+
}
|
|
476
|
+
})
|
|
536
477
|
: _e(),
|
|
537
|
-
h('
|
|
478
|
+
h('col', {
|
|
479
|
+
style: {
|
|
480
|
+
minWidth: '120px'
|
|
481
|
+
}
|
|
482
|
+
}),
|
|
538
483
|
allowResizable
|
|
539
|
-
? h('
|
|
484
|
+
? h('col', {
|
|
485
|
+
style: {
|
|
486
|
+
width: '140px'
|
|
487
|
+
}
|
|
488
|
+
})
|
|
540
489
|
: _e(),
|
|
541
490
|
allowFixed
|
|
542
|
-
? h('
|
|
491
|
+
? h('col', {
|
|
492
|
+
style: {
|
|
493
|
+
width: '200px'
|
|
494
|
+
}
|
|
495
|
+
})
|
|
543
496
|
: _e()
|
|
544
|
-
])
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
497
|
+
]),
|
|
498
|
+
h('thead', {}, [
|
|
499
|
+
h('tr', {}, [
|
|
500
|
+
allowVisible
|
|
501
|
+
? h('th', {}, [
|
|
502
|
+
h('div', {
|
|
503
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
504
|
+
'is--checked': isAllChecked,
|
|
505
|
+
'is--indeterminate': isAllIndeterminate
|
|
506
|
+
}],
|
|
507
|
+
attrs: {
|
|
508
|
+
title: getI18n('vxe.table.allTitle')
|
|
509
|
+
},
|
|
510
|
+
on: {
|
|
511
|
+
click: _vm.allOptionEvent
|
|
512
|
+
}
|
|
513
|
+
}, [
|
|
514
|
+
h('span', {
|
|
515
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
516
|
+
}),
|
|
517
|
+
h('span', {
|
|
518
|
+
class: 'vxe-checkbox--label'
|
|
519
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
520
|
+
])
|
|
521
|
+
])
|
|
522
|
+
: _e(),
|
|
523
|
+
allowSort
|
|
524
|
+
? h('th', {}, [
|
|
525
|
+
h('span', {
|
|
526
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
527
|
+
}, getI18n('vxe.custom.setting.colSort')),
|
|
528
|
+
VxeUITooltipComponent
|
|
529
|
+
? h(VxeUITooltipComponent, {
|
|
530
|
+
props: {
|
|
531
|
+
enterable: true,
|
|
532
|
+
content: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
533
|
+
popupClassName: 'vxe-table--ignore-clear'
|
|
534
|
+
},
|
|
535
|
+
scopedSlots: {
|
|
536
|
+
default: () => {
|
|
537
|
+
return h('i', {
|
|
538
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
})
|
|
543
|
+
: renderEmptyElement($xeTableCustomPanel)
|
|
544
|
+
])
|
|
545
|
+
: _e(),
|
|
546
|
+
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
547
|
+
allowResizable
|
|
548
|
+
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
549
|
+
: _e(),
|
|
550
|
+
allowFixed
|
|
551
|
+
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
552
|
+
: _e()
|
|
553
|
+
])
|
|
554
|
+
]),
|
|
555
|
+
h('transition-group', {
|
|
556
|
+
class: 'vxe-table-custom--body',
|
|
557
|
+
props: {
|
|
558
|
+
tag: 'tbody',
|
|
559
|
+
name: 'vxe-table-custom--list'
|
|
560
|
+
}
|
|
561
|
+
}, trVNs)
|
|
562
|
+
])
|
|
563
|
+
]),
|
|
564
|
+
h('div', {
|
|
565
|
+
ref: 'dragHintElemRef',
|
|
566
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
567
|
+
}, getI18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
|
|
568
|
+
]);
|
|
569
|
+
},
|
|
570
|
+
footer: () => {
|
|
571
|
+
return h('div', {
|
|
572
|
+
class: 'vxe-table-custom-popup--footer'
|
|
573
|
+
}, [
|
|
574
|
+
h(VxeUIButtonComponent, {
|
|
575
|
+
props: {
|
|
576
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore')
|
|
577
|
+
},
|
|
578
|
+
on: {
|
|
579
|
+
click: _vm.resetCustomEvent
|
|
580
|
+
}
|
|
581
|
+
}),
|
|
582
|
+
h(VxeUIButtonComponent, {
|
|
583
|
+
props: {
|
|
584
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel')
|
|
585
|
+
},
|
|
586
|
+
on: {
|
|
587
|
+
click: _vm.cancelCustomEvent
|
|
588
|
+
}
|
|
589
|
+
}),
|
|
590
|
+
h(VxeUIButtonComponent, {
|
|
591
|
+
props: {
|
|
592
|
+
status: 'primary',
|
|
593
|
+
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm')
|
|
594
|
+
},
|
|
595
|
+
on: {
|
|
596
|
+
click: _vm.confirmCustomEvent
|
|
597
|
+
}
|
|
598
|
+
})
|
|
599
|
+
]);
|
|
600
|
+
}
|
|
591
601
|
}
|
|
592
|
-
}
|
|
593
|
-
|
|
602
|
+
})
|
|
603
|
+
: renderEmptyElement($xeTableCustomPanel);
|
|
594
604
|
};
|
|
595
605
|
export default {
|
|
596
606
|
name: 'VxeTableCustomPanel',
|
|
@@ -33,7 +33,7 @@ function insertTreeRow(_vm, newRecords, isAppend) {
|
|
|
33
33
|
fullAllDataRowIdData[rowid] = rest;
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
if (process.env.
|
|
36
|
+
if (process.env.NODE_ENV === 'development') {
|
|
37
37
|
if (parentRowId) {
|
|
38
38
|
warnLog('vxe.error.unableInsert');
|
|
39
39
|
}
|
|
@@ -100,7 +100,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
100
100
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
101
101
|
newRecords.forEach((item, i) => {
|
|
102
102
|
const rowid = getRowid(_vm, item);
|
|
103
|
-
if (process.env.
|
|
103
|
+
if (process.env.NODE_ENV === 'development') {
|
|
104
104
|
if (item[treeOpts.parentField]) {
|
|
105
105
|
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
106
106
|
errLog('vxe.error.errProp', [`${treeOpts.parentField}=${item[treeOpts.parentField]}`, `${treeOpts.parentField}=${parentRow[rowField]}`]);
|
|
@@ -133,7 +133,7 @@ function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
else {
|
|
136
|
-
if (process.env.
|
|
136
|
+
if (process.env.NODE_ENV === 'development') {
|
|
137
137
|
warnLog('vxe.error.unableInsert');
|
|
138
138
|
}
|
|
139
139
|
insertTreeRow(_vm, newRecords, true);
|
|
@@ -561,7 +561,7 @@ export default {
|
|
|
561
561
|
}
|
|
562
562
|
},
|
|
563
563
|
_clearActived(evnt) {
|
|
564
|
-
if (process.env.
|
|
564
|
+
if (process.env.NODE_ENV === 'development') {
|
|
565
565
|
warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit']);
|
|
566
566
|
}
|
|
567
567
|
// 即将废弃
|
|
@@ -599,7 +599,7 @@ export default {
|
|
|
599
599
|
return this.$nextTick();
|
|
600
600
|
},
|
|
601
601
|
_getActiveRecord() {
|
|
602
|
-
if (process.env.
|
|
602
|
+
if (process.env.NODE_ENV === 'development') {
|
|
603
603
|
warnLog('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
|
|
604
604
|
}
|
|
605
605
|
// 即将废弃
|
|
@@ -615,7 +615,7 @@ export default {
|
|
|
615
615
|
return null;
|
|
616
616
|
},
|
|
617
617
|
_isActiveByRow(row) {
|
|
618
|
-
if (process.env.
|
|
618
|
+
if (process.env.NODE_ENV === 'development') {
|
|
619
619
|
warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
|
|
620
620
|
}
|
|
621
621
|
// 即将废弃
|
|
@@ -632,6 +632,7 @@ export default {
|
|
|
632
632
|
* 处理聚焦
|
|
633
633
|
*/
|
|
634
634
|
handleFocus(params) {
|
|
635
|
+
const { editOpts } = this;
|
|
635
636
|
const { row, column, cell } = params;
|
|
636
637
|
const { editRender } = column;
|
|
637
638
|
if (isEnableConf(editRender)) {
|
|
@@ -639,20 +640,23 @@ export default {
|
|
|
639
640
|
let autoFocus = editRender.autofocus || editRender.autoFocus;
|
|
640
641
|
let autoSelect = editRender.autoSelect || editRender.autoselect;
|
|
641
642
|
let inputElem;
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
if (
|
|
655
|
-
inputElem.
|
|
643
|
+
// 是否启用聚焦
|
|
644
|
+
if (editOpts.autoFocus) {
|
|
645
|
+
if (!autoFocus && compRender) {
|
|
646
|
+
autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus;
|
|
647
|
+
}
|
|
648
|
+
if (!autoSelect && compRender) {
|
|
649
|
+
autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect;
|
|
650
|
+
}
|
|
651
|
+
// 如果指定了聚焦 class
|
|
652
|
+
if (XEUtils.isFunction(autoFocus)) {
|
|
653
|
+
inputElem = autoFocus.call(this, params);
|
|
654
|
+
}
|
|
655
|
+
else if (autoFocus) {
|
|
656
|
+
inputElem = cell.querySelector(autoFocus);
|
|
657
|
+
if (inputElem) {
|
|
658
|
+
inputElem.focus();
|
|
659
|
+
}
|
|
656
660
|
}
|
|
657
661
|
}
|
|
658
662
|
if (inputElem) {
|
|
@@ -669,13 +673,18 @@ export default {
|
|
|
669
673
|
}
|
|
670
674
|
}
|
|
671
675
|
else {
|
|
672
|
-
//
|
|
673
|
-
|
|
676
|
+
// 是否自动定位
|
|
677
|
+
if (editOpts.autoPos) {
|
|
678
|
+
if (!column.fixed) {
|
|
679
|
+
// 显示到可视区中
|
|
680
|
+
this.scrollToRow(row, column);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
674
683
|
}
|
|
675
684
|
}
|
|
676
685
|
},
|
|
677
686
|
_setActiveRow(row) {
|
|
678
|
-
if (process.env.
|
|
687
|
+
if (process.env.NODE_ENV === 'development') {
|
|
679
688
|
warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
|
|
680
689
|
}
|
|
681
690
|
// 即将废弃
|
|
@@ -692,7 +701,7 @@ export default {
|
|
|
692
701
|
return this.setEditCell(row, column);
|
|
693
702
|
},
|
|
694
703
|
_setActiveCell(row, fieldOrColumn) {
|
|
695
|
-
if (process.env.
|
|
704
|
+
if (process.env.NODE_ENV === 'development') {
|
|
696
705
|
warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
|
|
697
706
|
}
|
|
698
707
|
// 即将废弃
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { VxeUI } from '../../../ui';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { formatText } from '../../../ui/src/utils';
|
|
4
|
-
|
|
4
|
+
import { errLog } from '../../../ui/src/log';
|
|
5
|
+
const { getI18n, getIcon, globalMixins } = VxeUI;
|
|
5
6
|
export default {
|
|
6
7
|
name: 'VxeTableExportPanel',
|
|
8
|
+
mixins: [
|
|
9
|
+
globalMixins.sizeMixin
|
|
10
|
+
],
|
|
7
11
|
props: {
|
|
8
12
|
defaultOptions: Object,
|
|
9
13
|
storeData: Object
|
|
@@ -23,9 +27,6 @@ export default {
|
|
|
23
27
|
};
|
|
24
28
|
},
|
|
25
29
|
computed: {
|
|
26
|
-
vSize() {
|
|
27
|
-
return this.size || this.$parent.size || this.$parent.vSize;
|
|
28
|
-
},
|
|
29
30
|
checkedAll() {
|
|
30
31
|
return this.storeData.columns.every((column) => column.checked);
|
|
31
32
|
},
|
|
@@ -41,6 +42,33 @@ export default {
|
|
|
41
42
|
return !defaultOptions.original && ['xlsx'].indexOf(defaultOptions.type) > -1;
|
|
42
43
|
}
|
|
43
44
|
},
|
|
45
|
+
created() {
|
|
46
|
+
const $xeTableExportPanel = this;
|
|
47
|
+
if (process.env.NODE_ENV === 'development') {
|
|
48
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
49
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
50
|
+
const VxeUISelectComponent = VxeUI.getComponent('VxeSelect');
|
|
51
|
+
const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
|
|
52
|
+
const VxeUICheckboxComponent = VxeUI.getComponent('VxeCheckbox');
|
|
53
|
+
$xeTableExportPanel.$nextTick(() => {
|
|
54
|
+
if (!VxeUIModalComponent) {
|
|
55
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
56
|
+
}
|
|
57
|
+
if (!VxeUIButtonComponent) {
|
|
58
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
59
|
+
}
|
|
60
|
+
if (!VxeUISelectComponent) {
|
|
61
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
62
|
+
}
|
|
63
|
+
if (!VxeUIInputComponent) {
|
|
64
|
+
errLog('vxe.error.reqComp', ['vxe-input']);
|
|
65
|
+
}
|
|
66
|
+
if (!VxeUICheckboxComponent) {
|
|
67
|
+
errLog('vxe.error.reqComp', ['vxe-checkbox']);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
44
72
|
render(h) {
|
|
45
73
|
const { _e, checkedAll, isAll: isAllChecked, isIndeterminate: isAllIndeterminate, showSheet, supportMerge, supportStyle, defaultOptions, storeData } = this;
|
|
46
74
|
const { hasTree, hasMerge, isPrint, hasColgroup } = storeData;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { VxeUI } from '../../../ui';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { parseFile } from '../../../ui/src/utils';
|
|
4
|
-
|
|
5
|
-
const { getI18n, getIcon } = VxeUI;
|
|
4
|
+
import { errLog } from '../../../ui/src/log';
|
|
5
|
+
const { getI18n, getIcon, globalMixins } = VxeUI;
|
|
6
6
|
export default {
|
|
7
7
|
name: 'VxeTableImportPanel',
|
|
8
|
+
mixins: [
|
|
9
|
+
globalMixins.sizeMixin
|
|
10
|
+
],
|
|
8
11
|
props: {
|
|
9
12
|
defaultOptions: Object,
|
|
10
13
|
storeData: Object
|
|
@@ -19,9 +22,6 @@ export default {
|
|
|
19
22
|
};
|
|
20
23
|
},
|
|
21
24
|
computed: {
|
|
22
|
-
vSize() {
|
|
23
|
-
return this.size || this.$parent.size || this.$parent.vSize;
|
|
24
|
-
},
|
|
25
25
|
selectName() {
|
|
26
26
|
return `${this.storeData.filename}.${this.storeData.type}`;
|
|
27
27
|
},
|
|
@@ -38,6 +38,25 @@ export default {
|
|
|
38
38
|
return `*.${typeList.map((item) => item.value).join(', *.')}`;
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
+
created() {
|
|
42
|
+
const $xeTableImportPanel = this;
|
|
43
|
+
if (process.env.NODE_ENV === 'development') {
|
|
44
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
45
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
46
|
+
const VxeUISelectComponent = VxeUI.getComponent('VxeSelect');
|
|
47
|
+
$xeTableImportPanel.$nextTick(() => {
|
|
48
|
+
if (!VxeUIModalComponent) {
|
|
49
|
+
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
50
|
+
}
|
|
51
|
+
if (!VxeUIButtonComponent) {
|
|
52
|
+
errLog('vxe.error.reqComp', ['vxe-button']);
|
|
53
|
+
}
|
|
54
|
+
if (!VxeUISelectComponent) {
|
|
55
|
+
errLog('vxe.error.reqComp', ['vxe-select']);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
},
|
|
41
60
|
render(h) {
|
|
42
61
|
const { hasFile, parseTypeLabel, defaultOptions, storeData, selectName } = this;
|
|
43
62
|
return h('vxe-modal', {
|