vxe-table 4.7.42 → 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/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +163 -141
- package/es/table/render/index.js +16 -2
- 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 +2 -2
- 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 +76 -30
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/panel.js +47 -24
- 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/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 +2 -2
- 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/table/module/custom/panel.ts +164 -142
- package/packages/table/render/index.ts +36 -17
- package/packages/toolbar/src/toolbar.ts +1 -1
- package/styles/components/table-module/custom.scss +4 -1
- /package/es/{iconfont.1720011186898.ttf → iconfont.1720061363684.ttf} +0 -0
- /package/es/{iconfont.1720011186898.woff → iconfont.1720061363684.woff} +0 -0
- /package/es/{iconfont.1720011186898.woff2 → iconfont.1720061363684.woff2} +0 -0
- /package/lib/{iconfont.1720011186898.ttf → iconfont.1720061363684.ttf} +0 -0
- /package/lib/{iconfont.1720011186898.woff → iconfont.1720061363684.woff} +0 -0
- /package/lib/{iconfont.1720011186898.woff2 → iconfont.1720061363684.woff2} +0 -0
|
@@ -5,7 +5,7 @@ import { addClass, removeClass } from '../../../ui/src/dom'
|
|
|
5
5
|
import { errLog } from '../../../ui/src/log'
|
|
6
6
|
import XEUtils from 'xe-utils'
|
|
7
7
|
|
|
8
|
-
import type { VxeModalComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent } from 'vxe-pc-ui'
|
|
8
|
+
import type { VxeModalComponent, VxeDrawerComponent, VxeButtonComponent, VxeRadioGroupComponent, VxeTooltipComponent, VxeInputComponent } from 'vxe-pc-ui'
|
|
9
9
|
import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes } from '../../../../types'
|
|
10
10
|
|
|
11
11
|
const { getI18n, getIcon } = VxeUI
|
|
@@ -20,6 +20,7 @@ export default defineComponent({
|
|
|
20
20
|
},
|
|
21
21
|
setup (props) {
|
|
22
22
|
const VxeUIModalComponent = VxeUI.getComponent<VxeModalComponent>('VxeModal')
|
|
23
|
+
const VxeUIDrawerComponent = VxeUI.getComponent<VxeDrawerComponent>('VxeDrawer')
|
|
23
24
|
const VxeUIButtonComponent = VxeUI.getComponent<VxeButtonComponent>('VxeButton')
|
|
24
25
|
const VxeUIInputComponent = VxeUI.getComponent<VxeInputComponent>('VxeInput')
|
|
25
26
|
const VxeUITooltipComponent = VxeUI.getComponent<VxeTooltipComponent>('VxeTooltip')
|
|
@@ -493,10 +494,12 @@ export default defineComponent({
|
|
|
493
494
|
const { customStore } = props
|
|
494
495
|
const { customColumnList } = reactData
|
|
495
496
|
const customOpts = computeCustomOpts.value
|
|
496
|
-
const { modalOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
497
|
+
const { modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, checkMethod, visibleMethod } = customOpts
|
|
497
498
|
const columnOpts = computeColumnOpts.value
|
|
498
499
|
const { maxFixedSize } = columnOpts
|
|
500
|
+
const { mode } = customOpts
|
|
499
501
|
const modalOpts = Object.assign({}, modalOptions)
|
|
502
|
+
const drawerOpts = Object.assign({}, drawerOptions)
|
|
500
503
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
501
504
|
const trVNs: VNode[] = []
|
|
502
505
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
|
|
@@ -621,15 +624,168 @@ export default defineComponent({
|
|
|
621
624
|
})
|
|
622
625
|
const isAllChecked = customStore.isAll
|
|
623
626
|
const isAllIndeterminate = customStore.isIndeterminate
|
|
627
|
+
const scopedSlots = {
|
|
628
|
+
default: () => {
|
|
629
|
+
return h('div', {
|
|
630
|
+
ref: bodyElemRef,
|
|
631
|
+
class: 'vxe-table-custom-popup--body'
|
|
632
|
+
}, [
|
|
633
|
+
h('div', {
|
|
634
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
635
|
+
}, [
|
|
636
|
+
h('table', {}, [
|
|
637
|
+
h('colgroup', {}, [
|
|
638
|
+
allowVisible
|
|
639
|
+
? h('col', {
|
|
640
|
+
style: {
|
|
641
|
+
width: '80px'
|
|
642
|
+
}
|
|
643
|
+
})
|
|
644
|
+
: createCommentVNode(),
|
|
645
|
+
allowSort
|
|
646
|
+
? h('col', {
|
|
647
|
+
style: {
|
|
648
|
+
width: '80px'
|
|
649
|
+
}
|
|
650
|
+
})
|
|
651
|
+
: createCommentVNode(),
|
|
652
|
+
h('col', {
|
|
653
|
+
style: {
|
|
654
|
+
minWidth: '120px'
|
|
655
|
+
}
|
|
656
|
+
}),
|
|
657
|
+
allowResizable
|
|
658
|
+
? h('col', {
|
|
659
|
+
style: {
|
|
660
|
+
width: '140px'
|
|
661
|
+
}
|
|
662
|
+
})
|
|
663
|
+
: createCommentVNode(),
|
|
664
|
+
allowFixed
|
|
665
|
+
? h('col', {
|
|
666
|
+
style: {
|
|
667
|
+
width: '200px'
|
|
668
|
+
}
|
|
669
|
+
})
|
|
670
|
+
: createCommentVNode()
|
|
671
|
+
]),
|
|
672
|
+
h('thead', {}, [
|
|
673
|
+
h('tr', {}, [
|
|
674
|
+
allowVisible
|
|
675
|
+
? h('th', {}, [
|
|
676
|
+
h('div', {
|
|
677
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
678
|
+
'is--checked': isAllChecked,
|
|
679
|
+
'is--indeterminate': isAllIndeterminate
|
|
680
|
+
}],
|
|
681
|
+
title: getI18n('vxe.table.allTitle'),
|
|
682
|
+
onClick: allCustomEvent
|
|
683
|
+
}, [
|
|
684
|
+
h('span', {
|
|
685
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
686
|
+
}),
|
|
687
|
+
h('span', {
|
|
688
|
+
class: 'vxe-checkbox--label'
|
|
689
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
690
|
+
])
|
|
691
|
+
])
|
|
692
|
+
: createCommentVNode(),
|
|
693
|
+
allowSort
|
|
694
|
+
? h('th', {}, [
|
|
695
|
+
h('span', {
|
|
696
|
+
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
697
|
+
}, getI18n('vxe.custom.setting.colSort')),
|
|
698
|
+
VxeUITooltipComponent
|
|
699
|
+
? h(VxeUITooltipComponent, {
|
|
700
|
+
enterable: true,
|
|
701
|
+
content: getI18n('vxe.custom.setting.sortHelpTip')
|
|
702
|
+
}, {
|
|
703
|
+
default: () => {
|
|
704
|
+
return h('i', {
|
|
705
|
+
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
706
|
+
})
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
: createCommentVNode()
|
|
710
|
+
])
|
|
711
|
+
: createCommentVNode(),
|
|
712
|
+
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
713
|
+
allowResizable
|
|
714
|
+
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
715
|
+
: createCommentVNode(),
|
|
716
|
+
allowFixed
|
|
717
|
+
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
718
|
+
: createCommentVNode()
|
|
719
|
+
])
|
|
720
|
+
]),
|
|
721
|
+
h(TransitionGroup, {
|
|
722
|
+
class: 'vxe-table-custom--body',
|
|
723
|
+
tag: 'tbody',
|
|
724
|
+
name: 'vxe-table-custom--list'
|
|
725
|
+
}, {
|
|
726
|
+
default: () => trVNs
|
|
727
|
+
})
|
|
728
|
+
])
|
|
729
|
+
]),
|
|
730
|
+
h('div', {
|
|
731
|
+
ref: dragHintElemRef,
|
|
732
|
+
class: 'vxe-table-custom-popup--drag-hint'
|
|
733
|
+
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))
|
|
734
|
+
])
|
|
735
|
+
},
|
|
736
|
+
footer: () => {
|
|
737
|
+
return h('div', {
|
|
738
|
+
class: 'vxe-table-custom-popup--footer'
|
|
739
|
+
}, [
|
|
740
|
+
VxeUIButtonComponent
|
|
741
|
+
? h(VxeUIButtonComponent, {
|
|
742
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
743
|
+
onClick: resetCustomEvent
|
|
744
|
+
})
|
|
745
|
+
: createCommentVNode(),
|
|
746
|
+
VxeUIButtonComponent
|
|
747
|
+
? h(VxeUIButtonComponent, {
|
|
748
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel'),
|
|
749
|
+
onClick: cancelCustomEvent
|
|
750
|
+
})
|
|
751
|
+
: createCommentVNode(),
|
|
752
|
+
VxeUIButtonComponent
|
|
753
|
+
? h(VxeUIButtonComponent, {
|
|
754
|
+
status: 'primary',
|
|
755
|
+
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm'),
|
|
756
|
+
onClick: confirmCustomEvent
|
|
757
|
+
})
|
|
758
|
+
: createCommentVNode()
|
|
759
|
+
])
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
if (mode === 'drawer') {
|
|
763
|
+
return VxeUIDrawerComponent
|
|
764
|
+
? h(VxeUIDrawerComponent, {
|
|
765
|
+
key: 'drawer',
|
|
766
|
+
className: ['vxe-table-custom-drawer-wrapper', 'vxe-table--ignore-clear', drawerOpts.className || ''].join(' '),
|
|
767
|
+
modelValue: customStore.visible,
|
|
768
|
+
title: drawerOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
769
|
+
width: drawerOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
770
|
+
position: drawerOpts.position,
|
|
771
|
+
escClosable: !!drawerOpts.escClosable,
|
|
772
|
+
destroyOnClose: true,
|
|
773
|
+
showFooter: true,
|
|
774
|
+
'onUpdate:modelValue' (value: any) {
|
|
775
|
+
customStore.visible = value
|
|
776
|
+
}
|
|
777
|
+
}, scopedSlots)
|
|
778
|
+
: createCommentVNode()
|
|
779
|
+
}
|
|
624
780
|
return VxeUIModalComponent
|
|
625
781
|
? h(VxeUIModalComponent, {
|
|
626
|
-
key: '
|
|
627
|
-
className: ['vxe-table-custom-
|
|
782
|
+
key: 'modal',
|
|
783
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
628
784
|
modelValue: customStore.visible,
|
|
629
785
|
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
630
|
-
width: modalOpts.width ||
|
|
786
|
+
width: modalOpts.width || Math.min(880, document.documentElement.clientWidth),
|
|
631
787
|
minWidth: modalOpts.minWidth || 700,
|
|
632
|
-
height: modalOpts.height ||
|
|
788
|
+
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
633
789
|
minHeight: modalOpts.minHeight || 400,
|
|
634
790
|
showZoom: modalOpts.showZoom,
|
|
635
791
|
showMaximize: modalOpts.showMaximize,
|
|
@@ -643,147 +799,13 @@ export default defineComponent({
|
|
|
643
799
|
'onUpdate:modelValue' (value: any) {
|
|
644
800
|
customStore.visible = value
|
|
645
801
|
}
|
|
646
|
-
},
|
|
647
|
-
default: () => {
|
|
648
|
-
return h('div', {
|
|
649
|
-
ref: bodyElemRef,
|
|
650
|
-
class: 'vxe-table-custom-popup--body'
|
|
651
|
-
}, [
|
|
652
|
-
h('div', {
|
|
653
|
-
class: 'vxe-table-custom-popup--table-wrapper'
|
|
654
|
-
}, [
|
|
655
|
-
h('table', {}, [
|
|
656
|
-
h('colgroup', {}, [
|
|
657
|
-
allowVisible
|
|
658
|
-
? h('col', {
|
|
659
|
-
style: {
|
|
660
|
-
width: '80px'
|
|
661
|
-
}
|
|
662
|
-
})
|
|
663
|
-
: createCommentVNode(),
|
|
664
|
-
allowSort
|
|
665
|
-
? h('col', {
|
|
666
|
-
style: {
|
|
667
|
-
width: '80px'
|
|
668
|
-
}
|
|
669
|
-
})
|
|
670
|
-
: createCommentVNode(),
|
|
671
|
-
h('col', {
|
|
672
|
-
style: {
|
|
673
|
-
minWidth: '120px'
|
|
674
|
-
}
|
|
675
|
-
}),
|
|
676
|
-
allowResizable
|
|
677
|
-
? h('col', {
|
|
678
|
-
style: {
|
|
679
|
-
width: '140px'
|
|
680
|
-
}
|
|
681
|
-
})
|
|
682
|
-
: createCommentVNode(),
|
|
683
|
-
allowFixed
|
|
684
|
-
? h('col', {
|
|
685
|
-
style: {
|
|
686
|
-
width: '200px'
|
|
687
|
-
}
|
|
688
|
-
})
|
|
689
|
-
: createCommentVNode()
|
|
690
|
-
]),
|
|
691
|
-
h('thead', {}, [
|
|
692
|
-
h('tr', {}, [
|
|
693
|
-
allowVisible
|
|
694
|
-
? h('th', {}, [
|
|
695
|
-
h('div', {
|
|
696
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
697
|
-
'is--checked': isAllChecked,
|
|
698
|
-
'is--indeterminate': isAllIndeterminate
|
|
699
|
-
}],
|
|
700
|
-
title: getI18n('vxe.table.allTitle'),
|
|
701
|
-
onClick: allCustomEvent
|
|
702
|
-
}, [
|
|
703
|
-
h('span', {
|
|
704
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
705
|
-
}),
|
|
706
|
-
h('span', {
|
|
707
|
-
class: 'vxe-checkbox--label'
|
|
708
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
709
|
-
])
|
|
710
|
-
])
|
|
711
|
-
: createCommentVNode(),
|
|
712
|
-
allowSort
|
|
713
|
-
? h('th', {}, [
|
|
714
|
-
h('span', {
|
|
715
|
-
class: 'vxe-table-custom-popup--table-sort-help-title'
|
|
716
|
-
}, getI18n('vxe.custom.setting.colSort')),
|
|
717
|
-
VxeUITooltipComponent
|
|
718
|
-
? h(VxeUITooltipComponent, {
|
|
719
|
-
enterable: true,
|
|
720
|
-
content: getI18n('vxe.custom.setting.sortHelpTip')
|
|
721
|
-
}, {
|
|
722
|
-
default: () => {
|
|
723
|
-
return h('i', {
|
|
724
|
-
class: 'vxe-table-custom-popup--table-sort-help-icon vxe-icon-question-circle-fill'
|
|
725
|
-
})
|
|
726
|
-
}
|
|
727
|
-
})
|
|
728
|
-
: createCommentVNode()
|
|
729
|
-
])
|
|
730
|
-
: createCommentVNode(),
|
|
731
|
-
h('th', {}, getI18n('vxe.custom.setting.colTitle')),
|
|
732
|
-
allowResizable
|
|
733
|
-
? h('th', {}, getI18n('vxe.custom.setting.colResizable'))
|
|
734
|
-
: createCommentVNode(),
|
|
735
|
-
allowFixed
|
|
736
|
-
? h('th', {}, getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
737
|
-
: createCommentVNode()
|
|
738
|
-
])
|
|
739
|
-
]),
|
|
740
|
-
h(TransitionGroup, {
|
|
741
|
-
class: 'vxe-table-custom--body',
|
|
742
|
-
tag: 'tbody',
|
|
743
|
-
name: 'vxe-table-custom--list'
|
|
744
|
-
}, {
|
|
745
|
-
default: () => trVNs
|
|
746
|
-
})
|
|
747
|
-
])
|
|
748
|
-
]),
|
|
749
|
-
h('div', {
|
|
750
|
-
ref: dragHintElemRef,
|
|
751
|
-
class: 'vxe-table-custom-popup--drag-hint'
|
|
752
|
-
}, getI18n('vxe.custom.cstmDragTarget', [dragColumn.value ? dragColumn.value.getTitle() : '']))
|
|
753
|
-
])
|
|
754
|
-
},
|
|
755
|
-
footer: () => {
|
|
756
|
-
return h('div', {
|
|
757
|
-
class: 'vxe-table-custom-popup--footer'
|
|
758
|
-
}, [
|
|
759
|
-
VxeUIButtonComponent
|
|
760
|
-
? h(VxeUIButtonComponent, {
|
|
761
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
762
|
-
onClick: resetCustomEvent
|
|
763
|
-
})
|
|
764
|
-
: createCommentVNode(),
|
|
765
|
-
VxeUIButtonComponent
|
|
766
|
-
? h(VxeUIButtonComponent, {
|
|
767
|
-
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmCancel'),
|
|
768
|
-
onClick: cancelCustomEvent
|
|
769
|
-
})
|
|
770
|
-
: createCommentVNode(),
|
|
771
|
-
VxeUIButtonComponent
|
|
772
|
-
? h(VxeUIButtonComponent, {
|
|
773
|
-
status: 'primary',
|
|
774
|
-
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm'),
|
|
775
|
-
onClick: confirmCustomEvent
|
|
776
|
-
})
|
|
777
|
-
: createCommentVNode()
|
|
778
|
-
])
|
|
779
|
-
}
|
|
780
|
-
})
|
|
802
|
+
}, scopedSlots)
|
|
781
803
|
: createCommentVNode()
|
|
782
804
|
}
|
|
783
805
|
|
|
784
806
|
const renderVN = () => {
|
|
785
807
|
const customOpts = computeCustomOpts.value
|
|
786
|
-
if (
|
|
808
|
+
if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
|
|
787
809
|
return renderPopupPanel()
|
|
788
810
|
}
|
|
789
811
|
return renderSimplePanel()
|
|
@@ -289,7 +289,7 @@ function nativeEditRender (renderOpts: any, params: any) {
|
|
|
289
289
|
]
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
function
|
|
292
|
+
function buttonCellRender (renderOpts: any, params: any) {
|
|
293
293
|
return [
|
|
294
294
|
h(getDefaultComponent(renderOpts), {
|
|
295
295
|
...getCellEditProps(renderOpts, params, null),
|
|
@@ -298,7 +298,7 @@ function defaultCellRender (renderOpts: any, params: any) {
|
|
|
298
298
|
]
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
function defaultEditRender (renderOpts: VxeGlobalRendererHandles.
|
|
301
|
+
function defaultEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: VxeGlobalRendererHandles.RenderEditParams) {
|
|
302
302
|
const { row, column } = params
|
|
303
303
|
const cellValue = getCellValue(row, column)
|
|
304
304
|
return [
|
|
@@ -309,11 +309,24 @@ function defaultEditRender (renderOpts: VxeGlobalRendererHandles.RenderEditOptio
|
|
|
309
309
|
]
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
+
function radioAndCheckboxEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: VxeGlobalRendererHandles.RenderEditParams) {
|
|
313
|
+
const { options } = renderOpts
|
|
314
|
+
const { row, column } = params
|
|
315
|
+
const cellValue = getCellValue(row, column)
|
|
316
|
+
return [
|
|
317
|
+
h(getDefaultComponent(renderOpts), {
|
|
318
|
+
options,
|
|
319
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
320
|
+
...getEditOns(renderOpts, params)
|
|
321
|
+
})
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
|
|
312
325
|
/**
|
|
313
326
|
* 已废弃
|
|
314
327
|
* @deprecated
|
|
315
328
|
*/
|
|
316
|
-
function oldEditRender (renderOpts: VxeGlobalRendererHandles.
|
|
329
|
+
function oldEditRender (renderOpts: VxeGlobalRendererHandles.RenderTableEditOptions, params: VxeGlobalRendererHandles.RenderEditParams) {
|
|
317
330
|
const { row, column } = params
|
|
318
331
|
const cellValue = getCellValue(row, column)
|
|
319
332
|
return [
|
|
@@ -520,12 +533,12 @@ renderer.mixin({
|
|
|
520
533
|
select: {
|
|
521
534
|
renderEdit: nativeSelectEditRender,
|
|
522
535
|
renderDefault: nativeSelectEditRender,
|
|
523
|
-
renderCell (renderOpts
|
|
536
|
+
renderCell (renderOpts, params) {
|
|
524
537
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
525
538
|
},
|
|
526
|
-
renderFilter (renderOpts
|
|
539
|
+
renderFilter (renderOpts, params) {
|
|
527
540
|
const { column } = params
|
|
528
|
-
return column.filters.map((option
|
|
541
|
+
return column.filters.map((option, oIndex) => {
|
|
529
542
|
return h('select', {
|
|
530
543
|
key: oIndex,
|
|
531
544
|
class: 'vxe-default-select',
|
|
@@ -541,7 +554,7 @@ renderer.mixin({
|
|
|
541
554
|
VxeInput: {
|
|
542
555
|
autofocus: '.vxe-input--inner',
|
|
543
556
|
renderEdit: defaultEditRender,
|
|
544
|
-
renderCell (renderOpts
|
|
557
|
+
renderCell (renderOpts, params) {
|
|
545
558
|
const { props = {} } = renderOpts
|
|
546
559
|
const { row, column } = params
|
|
547
560
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
@@ -569,7 +582,7 @@ renderer.mixin({
|
|
|
569
582
|
VxeNumberInput: {
|
|
570
583
|
autofocus: '.vxe-number-input--inner',
|
|
571
584
|
renderEdit: defaultEditRender,
|
|
572
|
-
renderCell (renderOpts
|
|
585
|
+
renderCell (renderOpts, params) {
|
|
573
586
|
const { props = {} } = renderOpts
|
|
574
587
|
const { row, column } = params
|
|
575
588
|
const digits = props.digits || getConfig().numberInput?.digits || 2
|
|
@@ -590,7 +603,7 @@ renderer.mixin({
|
|
|
590
603
|
VxeDatePicker: {
|
|
591
604
|
autofocus: '.vxe-date-picker--inner',
|
|
592
605
|
renderEdit: defaultEditRender,
|
|
593
|
-
renderCell (renderOpts
|
|
606
|
+
renderCell (renderOpts, params) {
|
|
594
607
|
const { props = {} } = renderOpts
|
|
595
608
|
const { row, column } = params
|
|
596
609
|
let cellValue = XEUtils.get(row, column.property)
|
|
@@ -615,7 +628,7 @@ renderer.mixin({
|
|
|
615
628
|
autofocus: '.vxe-textarea--inner'
|
|
616
629
|
},
|
|
617
630
|
VxeButton: {
|
|
618
|
-
renderDefault:
|
|
631
|
+
renderDefault: buttonCellRender
|
|
619
632
|
},
|
|
620
633
|
VxeButtonGroup: {
|
|
621
634
|
renderDefault (renderOpts, params) {
|
|
@@ -633,13 +646,13 @@ renderer.mixin({
|
|
|
633
646
|
autofocus: '.vxe-input--inner',
|
|
634
647
|
renderEdit: defaultSelectEditRender,
|
|
635
648
|
renderDefault: defaultSelectEditRender,
|
|
636
|
-
renderCell (renderOpts
|
|
649
|
+
renderCell (renderOpts, params) {
|
|
637
650
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
638
651
|
},
|
|
639
|
-
renderFilter (renderOpts
|
|
652
|
+
renderFilter (renderOpts, params) {
|
|
640
653
|
const { column } = params
|
|
641
654
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
642
|
-
return column.filters.map((option
|
|
655
|
+
return column.filters.map((option, oIndex) => {
|
|
643
656
|
const optionValue = option.data
|
|
644
657
|
return h(getDefaultComponent(renderOpts), {
|
|
645
658
|
key: oIndex,
|
|
@@ -651,6 +664,12 @@ renderer.mixin({
|
|
|
651
664
|
defaultFilterMethod: handleFilterMethod,
|
|
652
665
|
exportMethod: handleExportSelectMethod
|
|
653
666
|
},
|
|
667
|
+
VxeRadioGroup: {
|
|
668
|
+
renderDefault: radioAndCheckboxEditRender
|
|
669
|
+
},
|
|
670
|
+
VxeCheckboxGroup: {
|
|
671
|
+
renderDefault: radioAndCheckboxEditRender
|
|
672
|
+
},
|
|
654
673
|
VxeSwitch: {
|
|
655
674
|
autofocus: '.vxe-switch--button',
|
|
656
675
|
renderEdit: defaultEditRender,
|
|
@@ -664,7 +683,7 @@ renderer.mixin({
|
|
|
664
683
|
$input: {
|
|
665
684
|
autofocus: '.vxe-input--inner',
|
|
666
685
|
renderEdit: oldEditRender,
|
|
667
|
-
renderCell (renderOpts
|
|
686
|
+
renderCell (renderOpts, params) {
|
|
668
687
|
const { props = {} } = renderOpts
|
|
669
688
|
const { row, column } = params
|
|
670
689
|
const digits = props.digits || getConfig().input?.digits || 2
|
|
@@ -701,13 +720,13 @@ renderer.mixin({
|
|
|
701
720
|
autofocus: '.vxe-input--inner',
|
|
702
721
|
renderEdit: oldSelectEditRender,
|
|
703
722
|
renderDefault: oldSelectEditRender,
|
|
704
|
-
renderCell (renderOpts
|
|
723
|
+
renderCell (renderOpts, params) {
|
|
705
724
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params))
|
|
706
725
|
},
|
|
707
|
-
renderFilter (renderOpts
|
|
726
|
+
renderFilter (renderOpts, params) {
|
|
708
727
|
const { column } = params
|
|
709
728
|
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts
|
|
710
|
-
return column.filters.map((option
|
|
729
|
+
return column.filters.map((option, oIndex) => {
|
|
711
730
|
const optionValue = option.data
|
|
712
731
|
return h(getOldComponent(renderOpts), {
|
|
713
732
|
key: oIndex,
|
|
@@ -154,9 +154,12 @@
|
|
|
154
154
|
outline: none;
|
|
155
155
|
}
|
|
156
156
|
&:hover {
|
|
157
|
-
color: var(--vxe-ui-font-primary-color);
|
|
157
|
+
color: var(--vxe-ui-font-primary-lighten-color);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
.btn--confirm {
|
|
161
|
+
color: var(--vxe-ui-font-primary-color);
|
|
162
|
+
}
|
|
160
163
|
}
|
|
161
164
|
|
|
162
165
|
.vxe-table-custom--checkbox-option {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|