vxe-table 4.16.0-beta.3 → 4.16.0-beta.5
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/table/module/custom/hook.js +10 -3
- package/es/table/module/custom/panel.js +139 -126
- package/es/table/module/keyboard/hook.js +2 -2
- package/es/table/src/cell.js +4 -0
- package/es/table/src/table.js +49 -12
- package/es/table/src/util.js +1 -0
- package/es/toolbar/src/toolbar.js +26 -24
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +90 -47
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/custom/hook.js +12 -3
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +23 -9
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/keyboard/hook.js +2 -2
- package/lib/table/module/keyboard/hook.min.js +1 -1
- package/lib/table/src/cell.js +8 -0
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/table.js +16 -14
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +1 -0
- package/lib/table/src/util.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +27 -17
- package/lib/toolbar/src/toolbar.min.js +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/package.json +1 -1
- package/packages/table/module/custom/hook.ts +10 -3
- package/packages/table/module/custom/panel.ts +150 -135
- package/packages/table/module/keyboard/hook.ts +2 -2
- package/packages/table/src/cell.ts +4 -0
- package/packages/table/src/table.ts +49 -12
- package/packages/table/src/util.ts +2 -0
- package/packages/toolbar/src/toolbar.ts +27 -25
- /package/es/{iconfont.1755253968888.ttf → iconfont.1755588973979.ttf} +0 -0
- /package/es/{iconfont.1755253968888.woff → iconfont.1755588973979.woff} +0 -0
- /package/es/{iconfont.1755253968888.woff2 → iconfont.1755588973979.woff2} +0 -0
- /package/lib/{iconfont.1755253968888.ttf → iconfont.1755588973979.ttf} +0 -0
- /package/lib/{iconfont.1755253968888.woff → iconfont.1755588973979.woff} +0 -0
- /package/lib/{iconfont.1755253968888.woff2 → iconfont.1755588973979.woff2} +0 -0
|
@@ -12,11 +12,18 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
12
12
|
const $xeGantt = $xeTable.xeGantt;
|
|
13
13
|
const calcMaxHeight = () => {
|
|
14
14
|
const { customStore } = reactData;
|
|
15
|
-
|
|
15
|
+
let wrapperEl = refElem.value;
|
|
16
16
|
// 判断面板不能大于表格高度
|
|
17
17
|
let tableHeight = 0;
|
|
18
|
-
if (
|
|
19
|
-
|
|
18
|
+
if ($xeGantt) {
|
|
19
|
+
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
20
|
+
const ganttContainerElem = refGanttContainerElem.value;
|
|
21
|
+
if (ganttContainerElem) {
|
|
22
|
+
wrapperEl = ganttContainerElem;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (wrapperEl) {
|
|
26
|
+
tableHeight = wrapperEl.clientHeight - 28;
|
|
20
27
|
}
|
|
21
28
|
customStore.maxHeight = Math.max(88, tableHeight);
|
|
22
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, inject, ref, provide, nextTick, TransitionGroup, createCommentVNode, reactive } from 'vue';
|
|
1
|
+
import { h, inject, ref, provide, nextTick, TransitionGroup, createCommentVNode, reactive, Teleport, 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';
|
|
@@ -6,6 +6,16 @@ import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/
|
|
|
6
6
|
import { errLog } from '../../../ui/src/log';
|
|
7
7
|
import XEUtils from 'xe-utils';
|
|
8
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
9
|
+
export function createInternalData() {
|
|
10
|
+
return {
|
|
11
|
+
// teleportTo: undefined,
|
|
12
|
+
// prevDragCol: undefined,
|
|
13
|
+
// prevDragGroupField: undefined,
|
|
14
|
+
// prevDragAggFnColid: undefined,
|
|
15
|
+
// prevDragToChild: false,
|
|
16
|
+
// prevDragPos: null
|
|
17
|
+
};
|
|
18
|
+
}
|
|
9
19
|
export default defineVxeComponent({
|
|
10
20
|
name: 'TableCustomPanel',
|
|
11
21
|
props: {
|
|
@@ -35,13 +45,7 @@ export default defineVxeComponent({
|
|
|
35
45
|
dragAggFnCol: null,
|
|
36
46
|
dragTipText: ''
|
|
37
47
|
});
|
|
38
|
-
|
|
39
|
-
// prevDragCol: undefined,
|
|
40
|
-
// prevDragGroupField: undefined,
|
|
41
|
-
// prevDragAggFnColid: undefined,
|
|
42
|
-
// prevDragToChild: false,
|
|
43
|
-
// prevDragPos: null
|
|
44
|
-
};
|
|
48
|
+
let customPanelInternalData = createInternalData();
|
|
45
49
|
const refMaps = {
|
|
46
50
|
refElem,
|
|
47
51
|
refBodyWrapperElem,
|
|
@@ -561,6 +565,7 @@ export default defineVxeComponent({
|
|
|
561
565
|
const { customStore } = props;
|
|
562
566
|
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
563
567
|
const { isCustomStatus, customColumnList } = tableReactData;
|
|
568
|
+
const { teleportToWrapperElem } = tableInternalData;
|
|
564
569
|
const customOpts = computeCustomOpts.value;
|
|
565
570
|
const { immediate } = customOpts;
|
|
566
571
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
@@ -696,136 +701,141 @@ export default defineVxeComponent({
|
|
|
696
701
|
]));
|
|
697
702
|
}
|
|
698
703
|
});
|
|
699
|
-
return h(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
:
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
717
|
-
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
718
|
-
customStore
|
|
719
|
-
})
|
|
720
|
-
: renderEmptyElement($xeTable),
|
|
704
|
+
return h(Teleport, {
|
|
705
|
+
to: teleportToWrapperElem,
|
|
706
|
+
disabled: !($xeGantt && teleportToWrapperElem)
|
|
707
|
+
}, [
|
|
708
|
+
h('div', {
|
|
709
|
+
ref: refElem,
|
|
710
|
+
key: 'simple',
|
|
711
|
+
class: ['vxe-table-custom-wrapper', `placement--${placement}`, {
|
|
712
|
+
'is--active': customStore.visible
|
|
713
|
+
}],
|
|
714
|
+
style: maxHeight && !['left', 'right'].includes(placement || '')
|
|
715
|
+
? {
|
|
716
|
+
maxHeight: `${maxHeight}px`
|
|
717
|
+
}
|
|
718
|
+
: {}
|
|
719
|
+
}, customStore.visible
|
|
720
|
+
? [
|
|
721
721
|
h('div', {
|
|
722
|
-
ref:
|
|
723
|
-
class: 'vxe-table-custom--
|
|
722
|
+
ref: refBodyWrapperElem,
|
|
723
|
+
class: 'vxe-table-custom-simple--body-wrapper'
|
|
724
724
|
}, [
|
|
725
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
726
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
727
|
+
customStore
|
|
728
|
+
})
|
|
729
|
+
: renderEmptyElement($xeTable),
|
|
725
730
|
h('div', {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
731
|
+
ref: refCustomBodyElem,
|
|
732
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
733
|
+
}, [
|
|
734
|
+
h('div', {
|
|
735
|
+
class: 'vxe-table-custom--header'
|
|
736
|
+
}, headerSlot
|
|
737
|
+
? $xeTable.callSlot(headerSlot, params)
|
|
738
|
+
: [
|
|
739
|
+
h('ul', {
|
|
740
|
+
class: 'vxe-table-custom--panel-list'
|
|
735
741
|
}, [
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
}
|
|
748
|
-
|
|
742
|
+
h('li', {
|
|
743
|
+
class: 'vxe-table-custom--option'
|
|
744
|
+
}, [
|
|
745
|
+
allowVisible
|
|
746
|
+
? h('div', {
|
|
747
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
748
|
+
'is--checked': isAllChecked,
|
|
749
|
+
'is--indeterminate': isAllIndeterminate
|
|
750
|
+
}],
|
|
751
|
+
title: getI18n('vxe.table.allTitle'),
|
|
752
|
+
onClick: allOptionEvent
|
|
753
|
+
}, [
|
|
754
|
+
h('span', {
|
|
755
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
756
|
+
}),
|
|
757
|
+
h('span', {
|
|
758
|
+
class: 'vxe-checkbox--label'
|
|
759
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
760
|
+
])
|
|
761
|
+
: h('span', {
|
|
749
762
|
class: 'vxe-checkbox--label'
|
|
750
|
-
}, getI18n('vxe.
|
|
751
|
-
|
|
752
|
-
: h('span', {
|
|
753
|
-
class: 'vxe-checkbox--label'
|
|
754
|
-
}, getI18n('vxe.table.customTitle'))
|
|
763
|
+
}, getI18n('vxe.table.customTitle'))
|
|
764
|
+
])
|
|
755
765
|
])
|
|
756
|
-
])
|
|
766
|
+
]),
|
|
767
|
+
h('div', {
|
|
768
|
+
class: 'vxe-table-custom--body'
|
|
769
|
+
}, [
|
|
770
|
+
topSlot
|
|
771
|
+
? h('div', {
|
|
772
|
+
class: 'vxe-table-custom--panel-top'
|
|
773
|
+
}, $xeTable.callSlot(topSlot, params))
|
|
774
|
+
: renderEmptyElement($xeTable),
|
|
775
|
+
defaultSlot
|
|
776
|
+
? h('div', {
|
|
777
|
+
class: 'vxe-table-custom--panel-body'
|
|
778
|
+
}, $xeTable.callSlot(defaultSlot, params))
|
|
779
|
+
: h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
|
|
780
|
+
default: () => colVNs
|
|
781
|
+
}),
|
|
782
|
+
bottomSlot
|
|
783
|
+
? h('div', {
|
|
784
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
785
|
+
}, $xeTable.callSlot(bottomSlot, params))
|
|
786
|
+
: renderEmptyElement($xeTable)
|
|
757
787
|
]),
|
|
758
|
-
|
|
759
|
-
class: 'vxe-table-custom--body'
|
|
760
|
-
}, [
|
|
761
|
-
topSlot
|
|
762
|
-
? h('div', {
|
|
763
|
-
class: 'vxe-table-custom--panel-top'
|
|
764
|
-
}, $xeTable.callSlot(topSlot, params))
|
|
765
|
-
: renderEmptyElement($xeTable),
|
|
766
|
-
defaultSlot
|
|
767
|
-
? h('div', {
|
|
768
|
-
class: 'vxe-table-custom--panel-body'
|
|
769
|
-
}, $xeTable.callSlot(defaultSlot, params))
|
|
770
|
-
: h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
|
|
771
|
-
default: () => colVNs
|
|
772
|
-
}),
|
|
773
|
-
bottomSlot
|
|
788
|
+
customOpts.showFooter
|
|
774
789
|
? h('div', {
|
|
775
|
-
class: 'vxe-table-custom--
|
|
776
|
-
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
? $xeTable.callSlot(footerSlot, params)
|
|
784
|
-
: [
|
|
785
|
-
h('div', {
|
|
786
|
-
class: 'vxe-table-custom--footer-buttons'
|
|
787
|
-
}, [
|
|
788
|
-
VxeUIButtonComponent
|
|
789
|
-
? h(VxeUIButtonComponent, {
|
|
790
|
-
mode: 'text',
|
|
791
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
792
|
-
disabled: !isCustomStatus,
|
|
793
|
-
onClick: resetCustomEvent
|
|
794
|
-
})
|
|
795
|
-
: createCommentVNode(),
|
|
796
|
-
immediate
|
|
797
|
-
? (VxeUIButtonComponent
|
|
790
|
+
class: 'vxe-table-custom--footer'
|
|
791
|
+
}, footerSlot
|
|
792
|
+
? $xeTable.callSlot(footerSlot, params)
|
|
793
|
+
: [
|
|
794
|
+
h('div', {
|
|
795
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
796
|
+
}, [
|
|
797
|
+
VxeUIButtonComponent
|
|
798
798
|
? h(VxeUIButtonComponent, {
|
|
799
799
|
mode: 'text',
|
|
800
|
-
content: customOpts.
|
|
801
|
-
|
|
800
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
801
|
+
disabled: !isCustomStatus,
|
|
802
|
+
onClick: resetCustomEvent
|
|
802
803
|
})
|
|
803
|
-
: createCommentVNode()
|
|
804
|
-
|
|
805
|
-
?
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
804
|
+
: createCommentVNode(),
|
|
805
|
+
immediate
|
|
806
|
+
? (VxeUIButtonComponent
|
|
807
|
+
? h(VxeUIButtonComponent, {
|
|
808
|
+
mode: 'text',
|
|
809
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
810
|
+
onClick: cancelCloseEvent
|
|
811
|
+
})
|
|
812
|
+
: createCommentVNode())
|
|
813
|
+
: (VxeUIButtonComponent
|
|
814
|
+
? h(VxeUIButtonComponent, {
|
|
815
|
+
mode: 'text',
|
|
816
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
817
|
+
onClick: cancelCustomEvent
|
|
818
|
+
})
|
|
819
|
+
: createCommentVNode()),
|
|
820
|
+
immediate
|
|
821
|
+
? createCommentVNode()
|
|
822
|
+
: (VxeUIButtonComponent
|
|
823
|
+
? h(VxeUIButtonComponent, {
|
|
824
|
+
mode: 'text',
|
|
825
|
+
status: 'primary',
|
|
826
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
827
|
+
onClick: confirmCustomEvent
|
|
828
|
+
})
|
|
829
|
+
: createCommentVNode())
|
|
830
|
+
])
|
|
821
831
|
])
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
]
|
|
827
|
-
|
|
828
|
-
|
|
832
|
+
: null
|
|
833
|
+
]),
|
|
834
|
+
renderDragTip()
|
|
835
|
+
])
|
|
836
|
+
]
|
|
837
|
+
: [])
|
|
838
|
+
]);
|
|
829
839
|
};
|
|
830
840
|
const renderPopupPanel = () => {
|
|
831
841
|
const $xeGrid = $xeTable.xeGrid;
|
|
@@ -1232,6 +1242,9 @@ export default defineVxeComponent({
|
|
|
1232
1242
|
getComputeMaps: () => computeMaps,
|
|
1233
1243
|
renderVN
|
|
1234
1244
|
};
|
|
1245
|
+
onUnmounted(() => {
|
|
1246
|
+
customPanelInternalData = createInternalData();
|
|
1247
|
+
});
|
|
1235
1248
|
provide('$xeTableCustomPanel', $xeTableCustomPanel);
|
|
1236
1249
|
return $xeTableCustomPanel;
|
|
1237
1250
|
},
|
|
@@ -272,8 +272,8 @@ hooks.add('tableKeyboardModule', {
|
|
|
272
272
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
273
273
|
const mouseOpts = computeMouseOpts.value;
|
|
274
274
|
const editOpts = computeEditOpts.value;
|
|
275
|
-
if (mouseConfig && mouseOpts.area && $xeTable.
|
|
276
|
-
return $xeTable.
|
|
275
|
+
if (mouseConfig && mouseOpts.area && $xeTable.triggerCellAreaModnEvent) {
|
|
276
|
+
return $xeTable.triggerCellAreaModnEvent(evnt, params);
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
279
279
|
if (checkboxConfig && checkboxOpts.range) {
|
package/es/table/src/cell.js
CHANGED
|
@@ -382,6 +382,7 @@ export const Cell = {
|
|
|
382
382
|
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
|
|
383
383
|
const renderOpts = editRender || cellRender;
|
|
384
384
|
const defaultSlot = slots ? slots.default : null;
|
|
385
|
+
const gcSlot = slots ? (slots.groupContent || slots['group-content']) : null;
|
|
385
386
|
let cellValue = '';
|
|
386
387
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
387
388
|
const aggRow = row;
|
|
@@ -410,6 +411,9 @@ export const Cell = {
|
|
|
410
411
|
*/
|
|
411
412
|
totalValue: childCount
|
|
412
413
|
};
|
|
414
|
+
if (gcSlot) {
|
|
415
|
+
return renderCellBaseVNs(params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childCount }, params)));
|
|
416
|
+
}
|
|
413
417
|
if (mode === 'column' ? field === aggRow.groupField : rowGroupNode) {
|
|
414
418
|
cellValue = groupContent;
|
|
415
419
|
if (contentMethod) {
|
package/es/table/src/table.js
CHANGED
|
@@ -2440,7 +2440,7 @@ export default defineVxeComponent({
|
|
|
2440
2440
|
if (mouseConfig && mouseOpts.selected && editStore.selected.row && editStore.selected.column) {
|
|
2441
2441
|
$xeTable.addCellSelectedClass();
|
|
2442
2442
|
}
|
|
2443
|
-
if ($xeGanttView) {
|
|
2443
|
+
if ($xeGanttView && $xeGanttView.handleUpdateStyle) {
|
|
2444
2444
|
$xeGanttView.handleUpdateStyle();
|
|
2445
2445
|
}
|
|
2446
2446
|
return nextTick();
|
|
@@ -3100,7 +3100,7 @@ export default defineVxeComponent({
|
|
|
3100
3100
|
else {
|
|
3101
3101
|
resolve(handleRecalculateStyle(reFull, reWidth, reHeight));
|
|
3102
3102
|
}
|
|
3103
|
-
if ($xeGanttView) {
|
|
3103
|
+
if ($xeGanttView && $xeGanttView.handleLazyRecalculate) {
|
|
3104
3104
|
$xeGanttView.handleLazyRecalculate();
|
|
3105
3105
|
}
|
|
3106
3106
|
internalData.rceTimeout = setTimeout(() => {
|
|
@@ -3353,6 +3353,7 @@ export default defineVxeComponent({
|
|
|
3353
3353
|
}).then(() => {
|
|
3354
3354
|
computeScrollLoad();
|
|
3355
3355
|
}).then(() => {
|
|
3356
|
+
const virtualYOpts = computeVirtualYOpts.value;
|
|
3356
3357
|
// 是否启用了虚拟滚动
|
|
3357
3358
|
if (sYLoad) {
|
|
3358
3359
|
scrollYStore.endIndex = scrollYStore.visibleSize;
|
|
@@ -3361,6 +3362,9 @@ export default defineVxeComponent({
|
|
|
3361
3362
|
if (reactData.expandColumn && expandOpts.mode !== 'fixed') {
|
|
3362
3363
|
errLog('vxe.error.notConflictProp', ['column.type="expand', 'expand-config.mode="fixed"']);
|
|
3363
3364
|
}
|
|
3365
|
+
if (virtualYOpts.mode === 'scroll' && expandOpts.mode === 'fixed') {
|
|
3366
|
+
warnLog('vxe.error.notConflictProp', ['virtual-y-config.mode=scroll', 'expand-config.mode=inside']);
|
|
3367
|
+
}
|
|
3364
3368
|
// if (showOverflow) {
|
|
3365
3369
|
// if (!rowOpts.height) {
|
|
3366
3370
|
// const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false)
|
|
@@ -3705,7 +3709,7 @@ export default defineVxeComponent({
|
|
|
3705
3709
|
// 如果gt为0,则总是启用
|
|
3706
3710
|
const scrollYLoad = (transform || !treeConfig) && !!virtualYOpts.enabled && virtualYOpts.gt > -1 && (virtualYOpts.gt === 0 || virtualYOpts.gt < allList.length);
|
|
3707
3711
|
reactData.scrollYLoad = scrollYLoad;
|
|
3708
|
-
if ($xeGanttView) {
|
|
3712
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYStatus) {
|
|
3709
3713
|
$xeGanttView.handleUpdateSYStatus(scrollYLoad);
|
|
3710
3714
|
}
|
|
3711
3715
|
return scrollYLoad;
|
|
@@ -4967,6 +4971,29 @@ export default defineVxeComponent({
|
|
|
4967
4971
|
}
|
|
4968
4972
|
return [];
|
|
4969
4973
|
},
|
|
4974
|
+
/**
|
|
4975
|
+
* 只对 tree-config 有效,用于树形结构,获取指定行的层级
|
|
4976
|
+
*/
|
|
4977
|
+
getTreeRowLevel(rowOrRowid) {
|
|
4978
|
+
const { treeConfig } = props;
|
|
4979
|
+
const { fullAllDataRowIdData } = internalData;
|
|
4980
|
+
if (rowOrRowid && treeConfig) {
|
|
4981
|
+
let rowid;
|
|
4982
|
+
if (XEUtils.isString(rowOrRowid)) {
|
|
4983
|
+
rowid = rowOrRowid;
|
|
4984
|
+
}
|
|
4985
|
+
else {
|
|
4986
|
+
rowid = getRowid($xeTable, rowOrRowid);
|
|
4987
|
+
}
|
|
4988
|
+
if (rowid) {
|
|
4989
|
+
const rest = fullAllDataRowIdData[rowid];
|
|
4990
|
+
if (rest) {
|
|
4991
|
+
return rest.level;
|
|
4992
|
+
}
|
|
4993
|
+
}
|
|
4994
|
+
}
|
|
4995
|
+
return -1;
|
|
4996
|
+
},
|
|
4970
4997
|
/**
|
|
4971
4998
|
* 只对 tree-config 有效,获取行的父级
|
|
4972
4999
|
*/
|
|
@@ -4983,7 +5010,9 @@ export default defineVxeComponent({
|
|
|
4983
5010
|
}
|
|
4984
5011
|
if (rowid) {
|
|
4985
5012
|
const rest = fullAllDataRowIdData[rowid];
|
|
4986
|
-
|
|
5013
|
+
if (rest) {
|
|
5014
|
+
return rest.parent;
|
|
5015
|
+
}
|
|
4987
5016
|
}
|
|
4988
5017
|
}
|
|
4989
5018
|
return null;
|
|
@@ -5649,7 +5678,7 @@ export default defineVxeComponent({
|
|
|
5649
5678
|
XEUtils.arrayEach(el.querySelectorAll(`[rowid="${getRowid($xeTable, row)}"]`), elem => addClass(elem, 'row--current'));
|
|
5650
5679
|
}
|
|
5651
5680
|
}
|
|
5652
|
-
if ($xeGanttView) {
|
|
5681
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
5653
5682
|
$xeGanttView.handleUpdateCurrentRow(row);
|
|
5654
5683
|
}
|
|
5655
5684
|
return nextTick();
|
|
@@ -5698,7 +5727,7 @@ export default defineVxeComponent({
|
|
|
5698
5727
|
if (el) {
|
|
5699
5728
|
XEUtils.arrayEach(el.querySelectorAll('.row--current'), elem => removeClass(elem, 'row--current'));
|
|
5700
5729
|
}
|
|
5701
|
-
if ($xeGanttView) {
|
|
5730
|
+
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
5702
5731
|
$xeGanttView.handleUpdateCurrentRow();
|
|
5703
5732
|
}
|
|
5704
5733
|
return nextTick();
|
|
@@ -7945,7 +7974,7 @@ export default defineVxeComponent({
|
|
|
7945
7974
|
});
|
|
7946
7975
|
reactData.tableData = tableData;
|
|
7947
7976
|
internalData.visibleDataRowIdData = visibleDataRowIdMaps;
|
|
7948
|
-
if ($xeGanttView) {
|
|
7977
|
+
if ($xeGanttView && $xeGanttView.updateViewData) {
|
|
7949
7978
|
$xeGanttView.updateViewData();
|
|
7950
7979
|
}
|
|
7951
7980
|
return nextTick();
|
|
@@ -10851,7 +10880,7 @@ export default defineVxeComponent({
|
|
|
10851
10880
|
if (isScrollXBig && mouseOpts.area) {
|
|
10852
10881
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
10853
10882
|
}
|
|
10854
|
-
if ($xeGanttView) {
|
|
10883
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSXSpace) {
|
|
10855
10884
|
$xeGanttView.handleUpdateSXSpace();
|
|
10856
10885
|
}
|
|
10857
10886
|
return nextTick().then(() => {
|
|
@@ -10963,7 +10992,7 @@ export default defineVxeComponent({
|
|
|
10963
10992
|
if (isScrollYBig && mouseOpts.area) {
|
|
10964
10993
|
errLog('vxe.error.notProp', ['mouse-config.area']);
|
|
10965
10994
|
}
|
|
10966
|
-
if ($xeGanttView) {
|
|
10995
|
+
if ($xeGanttView && $xeGanttView.handleUpdateSYSpace) {
|
|
10967
10996
|
$xeGanttView.handleUpdateSYSpace();
|
|
10968
10997
|
}
|
|
10969
10998
|
return nextTick().then(() => {
|
|
@@ -11046,7 +11075,7 @@ export default defineVxeComponent({
|
|
|
11046
11075
|
XEUtils.arrayEach(el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), elem => addClass(elem, 'row--hover'));
|
|
11047
11076
|
}
|
|
11048
11077
|
internalData.hoverRow = row;
|
|
11049
|
-
if ($xeGanttView) {
|
|
11078
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
11050
11079
|
$xeGanttView.handleUpdateHoverRow(row);
|
|
11051
11080
|
}
|
|
11052
11081
|
},
|
|
@@ -11057,7 +11086,7 @@ export default defineVxeComponent({
|
|
|
11057
11086
|
XEUtils.arrayEach(el.querySelectorAll('.vxe-body--row.row--hover'), elem => removeClass(elem, 'row--hover'));
|
|
11058
11087
|
}
|
|
11059
11088
|
internalData.hoverRow = null;
|
|
11060
|
-
if ($xeGanttView) {
|
|
11089
|
+
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
11061
11090
|
$xeGanttView.handleUpdateHoverRow();
|
|
11062
11091
|
}
|
|
11063
11092
|
},
|
|
@@ -11891,12 +11920,20 @@ export default defineVxeComponent({
|
|
|
11891
11920
|
tablePrivateMethods.preventEvent(null, 'deactivated', { $table: $xeTable });
|
|
11892
11921
|
});
|
|
11893
11922
|
onMounted(() => {
|
|
11923
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
11894
11924
|
const columnOpts = computeColumnOpts.value;
|
|
11895
11925
|
const rowOpts = computeRowOpts.value;
|
|
11896
11926
|
const customOpts = computeCustomOpts.value;
|
|
11897
11927
|
const aggregateOpts = computeAggregateOpts.value;
|
|
11898
11928
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
11899
11929
|
const { groupFields } = aggregateOpts;
|
|
11930
|
+
if ($xeGantt) {
|
|
11931
|
+
const { refClassifyWrapperElem } = $xeGantt.getRefMaps();
|
|
11932
|
+
const classifyWrapperEl = refClassifyWrapperElem.value;
|
|
11933
|
+
if (classifyWrapperEl) {
|
|
11934
|
+
internalData.teleportToWrapperElem = classifyWrapperEl;
|
|
11935
|
+
}
|
|
11936
|
+
}
|
|
11900
11937
|
if (columnOpts.drag || rowOpts.drag || customOpts.allowSort) {
|
|
11901
11938
|
initTpImg();
|
|
11902
11939
|
}
|
|
@@ -11984,7 +12021,7 @@ export default defineVxeComponent({
|
|
|
11984
12021
|
if (rowOpts.height && !props.showOverflow) {
|
|
11985
12022
|
warnLog('vxe.error.notProp', ['table.show-overflow']);
|
|
11986
12023
|
}
|
|
11987
|
-
if (!$xeTable.
|
|
12024
|
+
if (!$xeTable.triggerCellAreaModnEvent) {
|
|
11988
12025
|
if (props.areaConfig) {
|
|
11989
12026
|
warnLog('vxe.error.notProp', ['area-config']);
|
|
11990
12027
|
}
|