vxe-table 4.7.41 → 4.7.43
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/en-US.js +2 -5
- package/es/locale/lang/es-ES.js +2 -5
- package/es/locale/lang/ja-JP.js +2 -5
- package/es/locale/lang/pt-BR.js +2 -5
- package/es/locale/lang/zh-CN.js +2 -5
- package/es/locale/lang/zh-TC.js +3 -6
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +171 -145
- package/es/table/render/index.js +16 -2
- package/es/table/src/table.js +21 -20
- package/es/table/style.css +3 -0
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +1 -1
- package/es/ui/index.js +11 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -0
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.umd.js +112 -59
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -5
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -5
- package/lib/locale/lang/es-ES.js +2 -5
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +2 -5
- package/lib/locale/lang/ja-JP.js +2 -5
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -5
- package/lib/locale/lang/pt-BR.js +2 -5
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +2 -5
- package/lib/locale/lang/zh-CN.js +2 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -5
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +3 -6
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +3 -6
- package/lib/locale/lang/zh-TC.js +3 -6
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +3 -6
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +3 -6
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +51 -22
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/render/index.js +21 -2
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/table.js +21 -24
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +3 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +3 -1
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +11 -4
- 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/vxe-table/style/style.css +3 -0
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/en-US.ts +2 -5
- package/packages/locale/lang/es-ES.ts +2 -5
- package/packages/locale/lang/ja-JP.ts +2 -5
- package/packages/locale/lang/pt-BR.ts +2 -5
- package/packages/locale/lang/zh-CN.ts +2 -5
- package/packages/locale/lang/zh-TC.ts +3 -6
- package/packages/table/module/custom/panel.ts +172 -146
- package/packages/table/render/index.ts +36 -17
- package/packages/table/src/table.ts +21 -20
- package/packages/toolbar/src/toolbar.ts +1 -1
- package/packages/ui/index.ts +9 -2
- package/styles/components/table-module/custom.scss +4 -1
- /package/es/{iconfont.1719997006744.ttf → iconfont.1720061363684.ttf} +0 -0
- /package/es/{iconfont.1719997006744.woff → iconfont.1720061363684.woff} +0 -0
- /package/es/{iconfont.1719997006744.woff2 → iconfont.1720061363684.woff2} +0 -0
- /package/lib/{iconfont.1719997006744.ttf → iconfont.1720061363684.ttf} +0 -0
- /package/lib/{iconfont.1719997006744.woff → iconfont.1720061363684.woff} +0 -0
- /package/lib/{iconfont.1719997006744.woff2 → iconfont.1720061363684.woff2} +0 -0
|
@@ -15,6 +15,7 @@ export default defineComponent({
|
|
|
15
15
|
},
|
|
16
16
|
setup(props) {
|
|
17
17
|
const VxeUIModalComponent = VxeUI.getComponent('VxeModal');
|
|
18
|
+
const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer');
|
|
18
19
|
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton');
|
|
19
20
|
const VxeUIInputComponent = VxeUI.getComponent('VxeInput');
|
|
20
21
|
const VxeUITooltipComponent = VxeUI.getComponent('VxeTooltip');
|
|
@@ -459,9 +460,12 @@ export default defineComponent({
|
|
|
459
460
|
const { customStore } = props;
|
|
460
461
|
const { customColumnList } = reactData;
|
|
461
462
|
const customOpts = computeCustomOpts.value;
|
|
462
|
-
const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
|
|
463
|
+
const { modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts;
|
|
463
464
|
const columnOpts = computeColumnOpts.value;
|
|
465
|
+
const { maxFixedSize } = columnOpts;
|
|
466
|
+
const { mode } = customOpts;
|
|
464
467
|
const modalOpts = Object.assign({}, modalOptions);
|
|
468
|
+
const drawerOpts = Object.assign({}, drawerOptions);
|
|
465
469
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
466
470
|
const trVNs = [];
|
|
467
471
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
@@ -580,165 +584,187 @@ export default defineComponent({
|
|
|
580
584
|
});
|
|
581
585
|
const isAllChecked = customStore.isAll;
|
|
582
586
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
height: modalOpts.height || '50vh',
|
|
592
|
-
minHeight: modalOpts.minHeight || 400,
|
|
593
|
-
mask: true,
|
|
594
|
-
lockView: true,
|
|
595
|
-
showFooter: true,
|
|
596
|
-
resize: true,
|
|
597
|
-
escClosable: true,
|
|
598
|
-
destroyOnClose: true,
|
|
599
|
-
'onUpdate:modelValue'(value) {
|
|
600
|
-
customStore.visible = value;
|
|
601
|
-
}
|
|
602
|
-
}, {
|
|
603
|
-
default: () => {
|
|
604
|
-
return h('div', {
|
|
605
|
-
ref: bodyElemRef,
|
|
606
|
-
class: 'vxe-table-custom-popup--body'
|
|
587
|
+
const scopedSlots = {
|
|
588
|
+
default: () => {
|
|
589
|
+
return h('div', {
|
|
590
|
+
ref: bodyElemRef,
|
|
591
|
+
class: 'vxe-table-custom-popup--body'
|
|
592
|
+
}, [
|
|
593
|
+
h('div', {
|
|
594
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
607
595
|
}, [
|
|
608
|
-
h('
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
596
|
+
h('table', {}, [
|
|
597
|
+
h('colgroup', {}, [
|
|
598
|
+
allowVisible
|
|
599
|
+
? h('col', {
|
|
600
|
+
style: {
|
|
601
|
+
width: '80px'
|
|
602
|
+
}
|
|
603
|
+
})
|
|
604
|
+
: createCommentVNode(),
|
|
605
|
+
allowSort
|
|
606
|
+
? h('col', {
|
|
607
|
+
style: {
|
|
608
|
+
width: '80px'
|
|
609
|
+
}
|
|
610
|
+
})
|
|
611
|
+
: createCommentVNode(),
|
|
612
|
+
h('col', {
|
|
613
|
+
style: {
|
|
614
|
+
minWidth: '120px'
|
|
615
|
+
}
|
|
616
|
+
}),
|
|
617
|
+
allowResizable
|
|
618
|
+
? h('col', {
|
|
619
|
+
style: {
|
|
620
|
+
width: '140px'
|
|
621
|
+
}
|
|
622
|
+
})
|
|
623
|
+
: createCommentVNode(),
|
|
624
|
+
allowFixed
|
|
625
|
+
? h('col', {
|
|
626
|
+
style: {
|
|
627
|
+
width: '200px'
|
|
628
|
+
}
|
|
629
|
+
})
|
|
630
|
+
: createCommentVNode()
|
|
631
|
+
]),
|
|
632
|
+
h('thead', {}, [
|
|
633
|
+
h('tr', {}, [
|
|
613
634
|
allowVisible
|
|
614
|
-
? h('
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
635
|
+
? h('th', {}, [
|
|
636
|
+
h('div', {
|
|
637
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
638
|
+
'is--checked': isAllChecked,
|
|
639
|
+
'is--indeterminate': isAllIndeterminate
|
|
640
|
+
}],
|
|
641
|
+
title: getI18n('vxe.table.allTitle'),
|
|
642
|
+
onClick: allCustomEvent
|
|
643
|
+
}, [
|
|
644
|
+
h('span', {
|
|
645
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
646
|
+
}),
|
|
647
|
+
h('span', {
|
|
648
|
+
class: 'vxe-checkbox--label'
|
|
649
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
650
|
+
])
|
|
651
|
+
])
|
|
619
652
|
: createCommentVNode(),
|
|
620
653
|
allowSort
|
|
621
|
-
? h('
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
|
|
654
|
+
? h('th', {}, [
|
|
655
|
+
h('span', {
|
|
656
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
657
|
+
}, getI18n('vxe.custom.setting.colSort')),
|
|
658
|
+
VxeUITooltipComponent
|
|
659
|
+
? h(VxeUITooltipComponent, {
|
|
660
|
+
enterable: true,
|
|
661
|
+
content: getI18n('vxe.custom.setting.sortHelpTip')
|
|
662
|
+
}, {
|
|
663
|
+
default: () => {
|
|
664
|
+
return h('i', {
|
|
665
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
})
|
|
669
|
+
: createCommentVNode()
|
|
670
|
+
])
|
|
626
671
|
: createCommentVNode(),
|
|
627
|
-
h('
|
|
628
|
-
style: {
|
|
629
|
-
minWidth: '120px'
|
|
630
|
-
}
|
|
631
|
-
}),
|
|
672
|
+
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
632
673
|
allowResizable
|
|
633
|
-
? h('
|
|
634
|
-
style: {
|
|
635
|
-
width: '140px'
|
|
636
|
-
}
|
|
637
|
-
})
|
|
674
|
+
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
638
675
|
: createCommentVNode(),
|
|
639
676
|
allowFixed
|
|
640
|
-
? h('
|
|
641
|
-
style: {
|
|
642
|
-
width: '200px'
|
|
643
|
-
}
|
|
644
|
-
})
|
|
677
|
+
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
645
678
|
: createCommentVNode()
|
|
646
|
-
])
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
'is--indeterminate': isAllIndeterminate
|
|
655
|
-
}],
|
|
656
|
-
title: getI18n('vxe.table.allTitle'),
|
|
657
|
-
onClick: allCustomEvent
|
|
658
|
-
}, [
|
|
659
|
-
h('span', {
|
|
660
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
661
|
-
}),
|
|
662
|
-
h('span', {
|
|
663
|
-
class: 'vxe-checkbox--label'
|
|
664
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
665
|
-
])
|
|
666
|
-
])
|
|
667
|
-
: createCommentVNode(),
|
|
668
|
-
allowSort
|
|
669
|
-
? h('th', {}, [
|
|
670
|
-
h('span', {
|
|
671
|
-
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
672
|
-
}, getI18n('vxe.custom.setting.colSort')),
|
|
673
|
-
VxeUITooltipComponent
|
|
674
|
-
? h(VxeUITooltipComponent, {
|
|
675
|
-
enterable: true,
|
|
676
|
-
content: getI18n('vxe.custom.setting.sortHelpTip')
|
|
677
|
-
}, {
|
|
678
|
-
default: () => {
|
|
679
|
-
return h('i', {
|
|
680
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
681
|
-
});
|
|
682
|
-
}
|
|
683
|
-
})
|
|
684
|
-
: createCommentVNode()
|
|
685
|
-
])
|
|
686
|
-
: createCommentVNode(),
|
|
687
|
-
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
688
|
-
allowResizable
|
|
689
|
-
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
690
|
-
: createCommentVNode(),
|
|
691
|
-
allowFixed
|
|
692
|
-
? h('th', {}, getI18n('vxe.custom.setting.colFixed', [columnOpts.maxFixedSize || 0]))
|
|
693
|
-
: createCommentVNode()
|
|
694
|
-
])
|
|
695
|
-
]),
|
|
696
|
-
h(TransitionGroup, {
|
|
697
|
-
class: 'vxe-table-custom--body',
|
|
698
|
-
tag: 'tbody',
|
|
699
|
-
name: 'vxe-table-custom--list'
|
|
700
|
-
}, {
|
|
701
|
-
default: () => trVNs
|
|
702
|
-
})
|
|
703
|
-
])
|
|
704
|
-
]),
|
|
705
|
-
h('div', {
|
|
706
|
-
ref: dragHintElemRef,
|
|
707
|
-
class: 'vxe-table-custom-popup--drag-hint'
|
|
708
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))
|
|
709
|
-
]);
|
|
710
|
-
},
|
|
711
|
-
footer: () => {
|
|
712
|
-
return h('div', {
|
|
713
|
-
class: 'vxe-table-custom-popup--footer'
|
|
714
|
-
}, [
|
|
715
|
-
VxeUIButtonComponent
|
|
716
|
-
? h(VxeUIButtonComponent, {
|
|
717
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
718
|
-
onClick: resetCustomEvent
|
|
719
|
-
})
|
|
720
|
-
: createCommentVNode(),
|
|
721
|
-
VxeUIButtonComponent
|
|
722
|
-
? h(VxeUIButtonComponent, {
|
|
723
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel'),
|
|
724
|
-
onClick: cancelCustomEvent
|
|
725
|
-
})
|
|
726
|
-
: createCommentVNode(),
|
|
727
|
-
VxeUIButtonComponent
|
|
728
|
-
? h(VxeUIButtonComponent, {
|
|
729
|
-
status: 'primary',
|
|
730
|
-
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm'),
|
|
731
|
-
onClick: confirmCustomEvent
|
|
679
|
+
])
|
|
680
|
+
]),
|
|
681
|
+
h(TransitionGroup, {
|
|
682
|
+
class: 'vxe-table-custom--body',
|
|
683
|
+
tag: 'tbody',
|
|
684
|
+
name: 'vxe-table-custom--list'
|
|
685
|
+
}, {
|
|
686
|
+
default: () => trVNs
|
|
732
687
|
})
|
|
733
|
-
|
|
734
|
-
])
|
|
688
|
+
])
|
|
689
|
+
]),
|
|
690
|
+
h('div', {
|
|
691
|
+
ref: dragHintElemRef,
|
|
692
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
693
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))
|
|
694
|
+
]);
|
|
695
|
+
},
|
|
696
|
+
footer: () => {
|
|
697
|
+
return h('div', {
|
|
698
|
+
class: 'vxe-table-custom-popup--footer'
|
|
699
|
+
}, [
|
|
700
|
+
VxeUIButtonComponent
|
|
701
|
+
? h(VxeUIButtonComponent, {
|
|
702
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
703
|
+
onClick: resetCustomEvent
|
|
704
|
+
})
|
|
705
|
+
: createCommentVNode(),
|
|
706
|
+
VxeUIButtonComponent
|
|
707
|
+
? h(VxeUIButtonComponent, {
|
|
708
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel'),
|
|
709
|
+
onClick: cancelCustomEvent
|
|
710
|
+
})
|
|
711
|
+
: createCommentVNode(),
|
|
712
|
+
VxeUIButtonComponent
|
|
713
|
+
? h(VxeUIButtonComponent, {
|
|
714
|
+
status: 'primary',
|
|
715
|
+
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm'),
|
|
716
|
+
onClick: confirmCustomEvent
|
|
717
|
+
})
|
|
718
|
+
: createCommentVNode()
|
|
719
|
+
]);
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
if (mode === 'drawer') {
|
|
723
|
+
return VxeUIDrawerComponent
|
|
724
|
+
? h(VxeUIDrawerComponent, {
|
|
725
|
+
key: 'drawer',
|
|
726
|
+
className: ['vxe-table-custom-drawer-wrapper', 'vxe-table--ignore-clear', drawerOpts.className || ''].join(' '),
|
|
727
|
+
modelValue: customStore.visible,
|
|
728
|
+
title: drawerOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
729
|
+
width: drawerOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
730
|
+
position: drawerOpts.position,
|
|
731
|
+
escClosable: !!drawerOpts.escClosable,
|
|
732
|
+
destroyOnClose: true,
|
|
733
|
+
showFooter: true,
|
|
734
|
+
'onUpdate:modelValue'(value) {
|
|
735
|
+
customStore.visible = value;
|
|
736
|
+
}
|
|
737
|
+
}, scopedSlots)
|
|
738
|
+
: createCommentVNode();
|
|
739
|
+
}
|
|
740
|
+
return VxeUIModalComponent
|
|
741
|
+
? h(VxeUIModalComponent, {
|
|
742
|
+
key: 'modal',
|
|
743
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
744
|
+
modelValue: customStore.visible,
|
|
745
|
+
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
746
|
+
width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
747
|
+
minWidth: modalOpts.minWidth || 700,
|
|
748
|
+
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
749
|
+
minHeight: modalOpts.minHeight || 400,
|
|
750
|
+
showZoom: modalOpts.showZoom,
|
|
751
|
+
showMaximize: modalOpts.showMaximize,
|
|
752
|
+
showMinimize: modalOpts.showMinimize,
|
|
753
|
+
mask: modalOpts.mask,
|
|
754
|
+
lockView: modalOpts.lockView,
|
|
755
|
+
resize: modalOpts.resize,
|
|
756
|
+
escClosable: !!modalOpts.escClosable,
|
|
757
|
+
destroyOnClose: true,
|
|
758
|
+
showFooter: true,
|
|
759
|
+
'onUpdate:modelValue'(value) {
|
|
760
|
+
customStore.visible = value;
|
|
735
761
|
}
|
|
736
|
-
})
|
|
762
|
+
}, scopedSlots)
|
|
737
763
|
: createCommentVNode();
|
|
738
764
|
};
|
|
739
765
|
const renderVN = () => {
|
|
740
766
|
const customOpts = computeCustomOpts.value;
|
|
741
|
-
if (
|
|
767
|
+
if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
|
|
742
768
|
return renderPopupPanel();
|
|
743
769
|
}
|
|
744
770
|
return renderSimplePanel();
|
package/es/table/render/index.js
CHANGED
|
@@ -258,7 +258,7 @@ function nativeEditRender(renderOpts, params) {
|
|
|
258
258
|
h(name, Object.assign(Object.assign(Object.assign({ class: `vxe-default-${name}` }, getNativeAttrs(renderOpts)), { value: cellValue }), getNativeEditOns(renderOpts, params)))
|
|
259
259
|
];
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function buttonCellRender(renderOpts, params) {
|
|
262
262
|
return [
|
|
263
263
|
h(getDefaultComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, null)), getComponentOns(renderOpts, params)))
|
|
264
264
|
];
|
|
@@ -270,6 +270,14 @@ function defaultEditRender(renderOpts, params) {
|
|
|
270
270
|
h(getDefaultComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, cellValue)), getEditOns(renderOpts, params)))
|
|
271
271
|
];
|
|
272
272
|
}
|
|
273
|
+
function radioAndCheckboxEditRender(renderOpts, params) {
|
|
274
|
+
const { options } = renderOpts;
|
|
275
|
+
const { row, column } = params;
|
|
276
|
+
const cellValue = getCellValue(row, column);
|
|
277
|
+
return [
|
|
278
|
+
h(getDefaultComponent(renderOpts), Object.assign(Object.assign({ options }, getCellEditProps(renderOpts, params, cellValue)), getEditOns(renderOpts, params)))
|
|
279
|
+
];
|
|
280
|
+
}
|
|
273
281
|
/**
|
|
274
282
|
* 已废弃
|
|
275
283
|
* @deprecated
|
|
@@ -525,7 +533,7 @@ renderer.mixin({
|
|
|
525
533
|
autofocus: '.vxe-textarea--inner'
|
|
526
534
|
},
|
|
527
535
|
VxeButton: {
|
|
528
|
-
renderDefault:
|
|
536
|
+
renderDefault: buttonCellRender
|
|
529
537
|
},
|
|
530
538
|
VxeButtonGroup: {
|
|
531
539
|
renderDefault(renderOpts, params) {
|
|
@@ -553,6 +561,12 @@ renderer.mixin({
|
|
|
553
561
|
defaultFilterMethod: handleFilterMethod,
|
|
554
562
|
exportMethod: handleExportSelectMethod
|
|
555
563
|
},
|
|
564
|
+
VxeRadioGroup: {
|
|
565
|
+
renderDefault: radioAndCheckboxEditRender
|
|
566
|
+
},
|
|
567
|
+
VxeCheckboxGroup: {
|
|
568
|
+
renderDefault: radioAndCheckboxEditRender
|
|
569
|
+
},
|
|
556
570
|
VxeSwitch: {
|
|
557
571
|
autofocus: '.vxe-switch--button',
|
|
558
572
|
renderEdit: defaultEditRender,
|
package/es/table/src/table.js
CHANGED
|
@@ -483,7 +483,7 @@ export default defineComponent({
|
|
|
483
483
|
let fixedSize = 0;
|
|
484
484
|
// 只判断第一层
|
|
485
485
|
collectColumn.forEach((column) => {
|
|
486
|
-
if (column.
|
|
486
|
+
if (column.renderFixed) {
|
|
487
487
|
fixedSize++;
|
|
488
488
|
}
|
|
489
489
|
});
|
|
@@ -822,27 +822,29 @@ export default defineComponent({
|
|
|
822
822
|
return num;
|
|
823
823
|
};
|
|
824
824
|
const handleCustomRestore = (storeData) => {
|
|
825
|
-
const { tableFullColumn } = internalData;
|
|
826
825
|
let { collectColumn } = internalData;
|
|
827
826
|
const { resizableData, sortData, visibleData, fixedData } = storeData;
|
|
828
827
|
let hasCustomSort = false;
|
|
829
828
|
// 处理还原
|
|
830
829
|
if (resizableData || sortData || visibleData || fixedData) {
|
|
831
|
-
|
|
830
|
+
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
832
831
|
const colKey = column.getKey();
|
|
832
|
+
// 支持一级
|
|
833
|
+
if (!parent) {
|
|
834
|
+
if (fixedData && fixedData[colKey]) {
|
|
835
|
+
column.fixed = fixedData[colKey];
|
|
836
|
+
}
|
|
837
|
+
if (sortData && XEUtils.isNumber(sortData[colKey])) {
|
|
838
|
+
hasCustomSort = true;
|
|
839
|
+
column.renderSortNumber = sortData[colKey];
|
|
840
|
+
}
|
|
841
|
+
}
|
|
833
842
|
if (resizableData && XEUtils.isNumber(resizableData[colKey])) {
|
|
834
843
|
column.resizeWidth = resizableData[colKey];
|
|
835
844
|
}
|
|
836
845
|
if (visibleData && XEUtils.isBoolean(visibleData[colKey])) {
|
|
837
846
|
column.visible = visibleData[colKey];
|
|
838
847
|
}
|
|
839
|
-
if (fixedData && fixedData[colKey]) {
|
|
840
|
-
column.fixed = fixedData[colKey];
|
|
841
|
-
}
|
|
842
|
-
if (sortData && XEUtils.isNumber(sortData[colKey])) {
|
|
843
|
-
hasCustomSort = true;
|
|
844
|
-
column.renderSortNumber = sortData[colKey];
|
|
845
|
-
}
|
|
846
848
|
});
|
|
847
849
|
// 如果自定义了顺序
|
|
848
850
|
if (hasCustomSort) {
|
|
@@ -3241,14 +3243,13 @@ export default defineComponent({
|
|
|
3241
3243
|
const targetColumn = getRootColumn($xeTable, column);
|
|
3242
3244
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
3243
3245
|
const columnOpts = computeColumnOpts.value;
|
|
3244
|
-
const { maxFixedSize } = columnOpts;
|
|
3245
3246
|
if (targetColumn && targetColumn.fixed !== fixed) {
|
|
3246
3247
|
// 是否超过最大固定列数量
|
|
3247
3248
|
if (!targetColumn.fixed && isMaxFixedColumn) {
|
|
3248
3249
|
if (VxeUI.modal) {
|
|
3249
3250
|
VxeUI.modal.message({
|
|
3250
3251
|
status: 'error',
|
|
3251
|
-
content: getI18n('vxe.table.maxFixedCol', [maxFixedSize])
|
|
3252
|
+
content: getI18n('vxe.table.maxFixedCol', [columnOpts.maxFixedSize])
|
|
3252
3253
|
});
|
|
3253
3254
|
}
|
|
3254
3255
|
return nextTick();
|
|
@@ -4533,7 +4534,7 @@ export default defineComponent({
|
|
|
4533
4534
|
let hasFixedt = 0;
|
|
4534
4535
|
let hasVisible = 0;
|
|
4535
4536
|
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
4536
|
-
//
|
|
4537
|
+
// 只支持一级
|
|
4537
4538
|
if (!parent) {
|
|
4538
4539
|
collectColumn.forEach((column) => {
|
|
4539
4540
|
const colKey = column.getKey();
|
|
@@ -4542,6 +4543,13 @@ export default defineComponent({
|
|
|
4542
4543
|
sortData[colKey] = column.renderSortNumber;
|
|
4543
4544
|
}
|
|
4544
4545
|
});
|
|
4546
|
+
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
4547
|
+
const colKey = column.getKey();
|
|
4548
|
+
if (colKey) {
|
|
4549
|
+
hasFixedt = 1;
|
|
4550
|
+
fixedData[colKey] = column.fixed;
|
|
4551
|
+
}
|
|
4552
|
+
}
|
|
4545
4553
|
}
|
|
4546
4554
|
if (column.resizeWidth) {
|
|
4547
4555
|
const colKey = column.getKey();
|
|
@@ -4550,13 +4558,6 @@ export default defineComponent({
|
|
|
4550
4558
|
resizableData[colKey] = column.renderWidth;
|
|
4551
4559
|
}
|
|
4552
4560
|
}
|
|
4553
|
-
if (column.fixed && column.fixed !== column.defaultFixed) {
|
|
4554
|
-
const colKey = column.getKey();
|
|
4555
|
-
if (colKey) {
|
|
4556
|
-
hasFixedt = 1;
|
|
4557
|
-
fixedData[colKey] = column.fixed;
|
|
4558
|
-
}
|
|
4559
|
-
}
|
|
4560
4561
|
if (!checkMethod || checkMethod({ column })) {
|
|
4561
4562
|
if (!column.visible && column.defaultVisible) {
|
|
4562
4563
|
const colKey = column.getKey();
|
package/es/table/style.css
CHANGED