vxe-table 4.16.0-beta.6 → 4.16.0-beta.7
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/panel.js +119 -125
- package/es/table/src/anime.js +4 -4
- package/es/table/src/table.js +136 -70
- package/es/table/style.css +178 -163
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +178 -163
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +31 -36
- 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 +2 -8
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/anime.js +4 -4
- package/lib/table/src/anime.min.js +1 -1
- package/lib/table/src/table.js +22 -22
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +178 -163
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +178 -163
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +3 -2
- package/packages/table/module/custom/panel.ts +128 -134
- package/packages/table/src/anime.ts +4 -4
- package/packages/table/src/table.ts +139 -71
- package/styles/components/table.scss +166 -165
- /package/es/{iconfont.1755597300201.ttf → iconfont.1755651021240.ttf} +0 -0
- /package/es/{iconfont.1755597300201.woff → iconfont.1755651021240.woff} +0 -0
- /package/es/{iconfont.1755597300201.woff2 → iconfont.1755651021240.woff2} +0 -0
- /package/lib/{iconfont.1755597300201.ttf → iconfont.1755651021240.ttf} +0 -0
- /package/lib/{iconfont.1755597300201.woff → iconfont.1755651021240.woff} +0 -0
- /package/lib/{iconfont.1755597300201.woff2 → iconfont.1755651021240.woff2} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, inject, ref, Ref, provide, VNode, PropType, nextTick, TransitionGroup, createCommentVNode, reactive,
|
|
1
|
+
import { h, inject, ref, Ref, provide, VNode, PropType, nextTick, TransitionGroup, createCommentVNode, reactive, onUnmounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
3
|
import { VxeUI } from '../../../ui'
|
|
4
4
|
import { formatText } from '../../../ui/src/utils'
|
|
@@ -609,7 +609,6 @@ export default defineVxeComponent({
|
|
|
609
609
|
const { customStore } = props
|
|
610
610
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
|
|
611
611
|
const { isCustomStatus, customColumnList } = tableReactData
|
|
612
|
-
const { teleportToWrapperElem } = tableInternalData
|
|
613
612
|
const customOpts = computeCustomOpts.value
|
|
614
613
|
const { immediate } = customOpts
|
|
615
614
|
const columnDragOpts = computeColumnDragOpts.value
|
|
@@ -751,146 +750,141 @@ export default defineVxeComponent({
|
|
|
751
750
|
)
|
|
752
751
|
}
|
|
753
752
|
})
|
|
754
|
-
return h(
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
753
|
+
return h('div', {
|
|
754
|
+
ref: refElem,
|
|
755
|
+
key: 'simple',
|
|
756
|
+
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
757
|
+
'is--active': customStore.visible
|
|
758
|
+
}],
|
|
759
|
+
style: maxHeight && !['left', 'right'].includes(placement || '')
|
|
760
|
+
? {
|
|
761
|
+
maxHeight: `${maxHeight}px`
|
|
762
|
+
}
|
|
763
|
+
: {}
|
|
764
|
+
}, customStore.visible
|
|
765
|
+
? [
|
|
766
|
+
h('div', {
|
|
767
|
+
ref: refBodyWrapperElem,
|
|
768
|
+
class: 'vxe-table-custom-simple--body-wrapper'
|
|
769
|
+
}, [
|
|
770
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
771
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
772
|
+
customStore
|
|
773
|
+
})
|
|
774
|
+
: renderEmptyElement($xeTable),
|
|
771
775
|
h('div', {
|
|
772
|
-
ref:
|
|
773
|
-
class: 'vxe-table-custom
|
|
776
|
+
ref: refCustomBodyElem,
|
|
777
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
774
778
|
}, [
|
|
775
|
-
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
776
|
-
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
777
|
-
customStore
|
|
778
|
-
})
|
|
779
|
-
: renderEmptyElement($xeTable),
|
|
780
779
|
h('div', {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
class: 'vxe-table-custom--panel-list'
|
|
780
|
+
class: 'vxe-table-custom--header'
|
|
781
|
+
}, headerSlot
|
|
782
|
+
? $xeTable.callSlot(headerSlot, params)
|
|
783
|
+
: [
|
|
784
|
+
h('ul', {
|
|
785
|
+
class: 'vxe-table-custom--panel-list'
|
|
786
|
+
}, [
|
|
787
|
+
h('li', {
|
|
788
|
+
class: 'vxe-table-custom--option'
|
|
791
789
|
}, [
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
},
|
|
804
|
-
|
|
805
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
806
|
-
}),
|
|
807
|
-
h('span', {
|
|
808
|
-
class: 'vxe-checkbox--label'
|
|
809
|
-
}, getI18n('vxe.toolbar.customAll'))
|
|
810
|
-
])
|
|
811
|
-
: h('span', {
|
|
790
|
+
allowVisible
|
|
791
|
+
? h('div', {
|
|
792
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
793
|
+
'is--checked': isAllChecked,
|
|
794
|
+
'is--indeterminate': isAllIndeterminate
|
|
795
|
+
}],
|
|
796
|
+
title: getI18n('vxe.table.allTitle'),
|
|
797
|
+
onClick: allOptionEvent
|
|
798
|
+
}, [
|
|
799
|
+
h('span', {
|
|
800
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
801
|
+
}),
|
|
802
|
+
h('span', {
|
|
812
803
|
class: 'vxe-checkbox--label'
|
|
813
|
-
}, getI18n('vxe.
|
|
814
|
-
|
|
804
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
805
|
+
])
|
|
806
|
+
: h('span', {
|
|
807
|
+
class: 'vxe-checkbox--label'
|
|
808
|
+
}, getI18n('vxe.table.customTitle'))
|
|
815
809
|
])
|
|
816
|
-
])
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
class: 'vxe-table-custom--panel-top'
|
|
823
|
-
}, $xeTable.callSlot(topSlot, params))
|
|
824
|
-
: renderEmptyElement($xeTable),
|
|
825
|
-
defaultSlot
|
|
826
|
-
? h('div', {
|
|
827
|
-
class: 'vxe-table-custom--panel-body'
|
|
828
|
-
}, $xeTable.callSlot(defaultSlot, params))
|
|
829
|
-
: h(TransitionGroup, {
|
|
830
|
-
class: 'vxe-table-custom--panel-list',
|
|
831
|
-
name: 'vxe-table-custom--list',
|
|
832
|
-
tag: 'ul',
|
|
833
|
-
...customWrapperOns
|
|
834
|
-
}, {
|
|
835
|
-
default: () => colVNs
|
|
836
|
-
}),
|
|
837
|
-
bottomSlot
|
|
838
|
-
? h('div', {
|
|
839
|
-
class: 'vxe-table-custom--panel-bottom'
|
|
840
|
-
}, $xeTable.callSlot(bottomSlot, params))
|
|
841
|
-
: renderEmptyElement($xeTable)
|
|
842
|
-
]),
|
|
843
|
-
customOpts.showFooter
|
|
810
|
+
])
|
|
811
|
+
]),
|
|
812
|
+
h('div', {
|
|
813
|
+
class: 'vxe-table-custom--body'
|
|
814
|
+
}, [
|
|
815
|
+
topSlot
|
|
844
816
|
? h('div', {
|
|
845
|
-
class: 'vxe-table-custom--
|
|
846
|
-
},
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
onClick: cancelCloseEvent
|
|
866
|
-
})
|
|
867
|
-
: createCommentVNode())
|
|
868
|
-
: (VxeUIButtonComponent
|
|
869
|
-
? h(VxeUIButtonComponent, {
|
|
870
|
-
mode: 'text',
|
|
871
|
-
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
872
|
-
onClick: cancelCustomEvent
|
|
873
|
-
})
|
|
874
|
-
: createCommentVNode()),
|
|
875
|
-
immediate
|
|
876
|
-
? createCommentVNode()
|
|
877
|
-
: (VxeUIButtonComponent
|
|
878
|
-
? h(VxeUIButtonComponent, {
|
|
879
|
-
mode: 'text',
|
|
880
|
-
status: 'primary',
|
|
881
|
-
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
882
|
-
onClick: confirmCustomEvent
|
|
883
|
-
})
|
|
884
|
-
: createCommentVNode())
|
|
885
|
-
])
|
|
886
|
-
])
|
|
887
|
-
: null
|
|
817
|
+
class: 'vxe-table-custom--panel-top'
|
|
818
|
+
}, $xeTable.callSlot(topSlot, params))
|
|
819
|
+
: renderEmptyElement($xeTable),
|
|
820
|
+
defaultSlot
|
|
821
|
+
? h('div', {
|
|
822
|
+
class: 'vxe-table-custom--panel-body'
|
|
823
|
+
}, $xeTable.callSlot(defaultSlot, params))
|
|
824
|
+
: h(TransitionGroup, {
|
|
825
|
+
class: 'vxe-table-custom--panel-list',
|
|
826
|
+
name: 'vxe-table-custom--list',
|
|
827
|
+
tag: 'ul',
|
|
828
|
+
...customWrapperOns
|
|
829
|
+
}, {
|
|
830
|
+
default: () => colVNs
|
|
831
|
+
}),
|
|
832
|
+
bottomSlot
|
|
833
|
+
? h('div', {
|
|
834
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
835
|
+
}, $xeTable.callSlot(bottomSlot, params))
|
|
836
|
+
: renderEmptyElement($xeTable)
|
|
888
837
|
]),
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
838
|
+
customOpts.showFooter
|
|
839
|
+
? h('div', {
|
|
840
|
+
class: 'vxe-table-custom--footer'
|
|
841
|
+
}, footerSlot
|
|
842
|
+
? $xeTable.callSlot(footerSlot, params)
|
|
843
|
+
: [
|
|
844
|
+
h('div', {
|
|
845
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
846
|
+
}, [
|
|
847
|
+
VxeUIButtonComponent
|
|
848
|
+
? h(VxeUIButtonComponent, {
|
|
849
|
+
mode: 'text',
|
|
850
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
851
|
+
disabled: !isCustomStatus,
|
|
852
|
+
onClick: resetCustomEvent
|
|
853
|
+
})
|
|
854
|
+
: createCommentVNode(),
|
|
855
|
+
immediate
|
|
856
|
+
? (VxeUIButtonComponent
|
|
857
|
+
? h(VxeUIButtonComponent, {
|
|
858
|
+
mode: 'text',
|
|
859
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
860
|
+
onClick: cancelCloseEvent
|
|
861
|
+
})
|
|
862
|
+
: createCommentVNode())
|
|
863
|
+
: (VxeUIButtonComponent
|
|
864
|
+
? h(VxeUIButtonComponent, {
|
|
865
|
+
mode: 'text',
|
|
866
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
867
|
+
onClick: cancelCustomEvent
|
|
868
|
+
})
|
|
869
|
+
: createCommentVNode()),
|
|
870
|
+
immediate
|
|
871
|
+
? createCommentVNode()
|
|
872
|
+
: (VxeUIButtonComponent
|
|
873
|
+
? h(VxeUIButtonComponent, {
|
|
874
|
+
mode: 'text',
|
|
875
|
+
status: 'primary',
|
|
876
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
877
|
+
onClick: confirmCustomEvent
|
|
878
|
+
})
|
|
879
|
+
: createCommentVNode())
|
|
880
|
+
])
|
|
881
|
+
])
|
|
882
|
+
: null
|
|
883
|
+
]),
|
|
884
|
+
renderDragTip()
|
|
885
|
+
])
|
|
886
|
+
]
|
|
887
|
+
: [])
|
|
894
888
|
}
|
|
895
889
|
|
|
896
890
|
const renderPopupPanel = () => {
|
|
@@ -20,10 +20,10 @@ export function moveRowAnimateToTb (elemList: NodeListOf<HTMLElement> | HTMLDivE
|
|
|
20
20
|
})
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export function clearRowAnimate (elem: HTMLElement | undefined) {
|
|
23
|
+
export function clearRowAnimate (elem: HTMLElement | undefined, clss: string[]) {
|
|
24
24
|
setTimeout(() => {
|
|
25
25
|
if (elem) {
|
|
26
|
-
XEUtils.arrayEach(elem.querySelectorAll(
|
|
26
|
+
XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, rowMoveCls))
|
|
27
27
|
}
|
|
28
28
|
}, 500)
|
|
29
29
|
}
|
|
@@ -43,10 +43,10 @@ export function moveColAnimateToLr (elemList: NodeListOf<HTMLElement> | HTMLDivE
|
|
|
43
43
|
})
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export function clearColAnimate (elem: HTMLElement | undefined) {
|
|
46
|
+
export function clearColAnimate (elem: HTMLElement | undefined, clss: string[]) {
|
|
47
47
|
setTimeout(() => {
|
|
48
48
|
if (elem) {
|
|
49
|
-
XEUtils.arrayEach(elem.querySelectorAll(
|
|
49
|
+
XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, colMoveClass))
|
|
50
50
|
}
|
|
51
51
|
}, 500)
|
|
52
52
|
}
|