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.
Files changed (44) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/custom/panel.js +119 -125
  6. package/es/table/src/anime.js +4 -4
  7. package/es/table/src/table.js +136 -70
  8. package/es/table/style.css +178 -163
  9. package/es/table/style.min.css +1 -1
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +178 -163
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/lib/index.css +1 -1
  15. package/lib/index.min.css +1 -1
  16. package/lib/index.umd.js +31 -36
  17. package/lib/index.umd.min.js +1 -1
  18. package/lib/style.css +1 -1
  19. package/lib/style.min.css +1 -1
  20. package/lib/table/module/custom/panel.js +2 -8
  21. package/lib/table/module/custom/panel.min.js +1 -1
  22. package/lib/table/src/anime.js +4 -4
  23. package/lib/table/src/anime.min.js +1 -1
  24. package/lib/table/src/table.js +22 -22
  25. package/lib/table/src/table.min.js +1 -1
  26. package/lib/table/style/style.css +178 -163
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/log.js +1 -1
  31. package/lib/ui/src/log.min.js +1 -1
  32. package/lib/vxe-table/style/style.css +178 -163
  33. package/lib/vxe-table/style/style.min.css +1 -1
  34. package/package.json +3 -2
  35. package/packages/table/module/custom/panel.ts +128 -134
  36. package/packages/table/src/anime.ts +4 -4
  37. package/packages/table/src/table.ts +139 -71
  38. package/styles/components/table.scss +166 -165
  39. /package/es/{iconfont.1755597300201.ttf → iconfont.1755651021240.ttf} +0 -0
  40. /package/es/{iconfont.1755597300201.woff → iconfont.1755651021240.woff} +0 -0
  41. /package/es/{iconfont.1755597300201.woff2 → iconfont.1755651021240.woff2} +0 -0
  42. /package/lib/{iconfont.1755597300201.ttf → iconfont.1755651021240.ttf} +0 -0
  43. /package/lib/{iconfont.1755597300201.woff → iconfont.1755651021240.woff} +0 -0
  44. /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, Teleport, onUnmounted } from 'vue'
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(Teleport, {
755
- to: teleportToWrapperElem,
756
- disabled: !($xeGantt && teleportToWrapperElem)
757
- }, [
758
- h('div', {
759
- ref: refElem,
760
- key: 'simple',
761
- class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
762
- 'is--active': customStore.visible
763
- }],
764
- style: maxHeight && !['left', 'right'].includes(placement || '')
765
- ? {
766
- maxHeight: `${maxHeight}px`
767
- }
768
- : {}
769
- }, customStore.visible
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: refBodyWrapperElem,
773
- class: 'vxe-table-custom-simple--body-wrapper'
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
- ref: refCustomBodyElem,
782
- class: 'vxe-table-custom--handle-wrapper'
783
- }, [
784
- h('div', {
785
- class: 'vxe-table-custom--header'
786
- }, headerSlot
787
- ? $xeTable.callSlot(headerSlot, params)
788
- : [
789
- h('ul', {
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
- h('li', {
793
- class: 'vxe-table-custom--option'
794
- }, [
795
- allowVisible
796
- ? h('div', {
797
- class: ['vxe-table-custom--checkbox-option', {
798
- 'is--checked': isAllChecked,
799
- 'is--indeterminate': isAllIndeterminate
800
- }],
801
- title: getI18n('vxe.table.allTitle'),
802
- onClick: allOptionEvent
803
- }, [
804
- h('span', {
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.table.customTitle'))
814
- ])
804
+ }, getI18n('vxe.toolbar.customAll'))
805
+ ])
806
+ : h('span', {
807
+ class: 'vxe-checkbox--label'
808
+ }, getI18n('vxe.table.customTitle'))
815
809
  ])
816
- ]),
817
- h('div', {
818
- class: 'vxe-table-custom--body'
819
- }, [
820
- topSlot
821
- ? h('div', {
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--footer'
846
- }, footerSlot
847
- ? $xeTable.callSlot(footerSlot, params)
848
- : [
849
- h('div', {
850
- class: 'vxe-table-custom--footer-buttons'
851
- }, [
852
- VxeUIButtonComponent
853
- ? h(VxeUIButtonComponent, {
854
- mode: 'text',
855
- content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
856
- disabled: !isCustomStatus,
857
- onClick: resetCustomEvent
858
- })
859
- : createCommentVNode(),
860
- immediate
861
- ? (VxeUIButtonComponent
862
- ? h(VxeUIButtonComponent, {
863
- mode: 'text',
864
- content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
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
- renderDragTip()
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(`.vxe-body--row.${rowMoveCls}`), elem => removeClass(elem, rowMoveCls))
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(`.vxe-table--column.${colMoveClass}`), elem => removeClass(elem, colMoveClass))
49
+ XEUtils.arrayEach(elem.querySelectorAll(clss.map(cls => `${cls}.${rowMoveCls}`).join(',')), elem => removeClass(elem, colMoveClass))
50
50
  }
51
51
  }, 500)
52
52
  }