vxe-table 4.13.39 → 4.13.41
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/README.en.md +2 -0
- package/README.ja-JP.md +2 -0
- package/README.md +3 -0
- package/README.zh-TW.md +3 -1
- package/es/grid/src/grid.js +21 -6
- package/es/{iconfont.1749800539928.ttf → iconfont.1750153812846.ttf} +0 -0
- package/es/iconfont.1750153812846.woff +0 -0
- package/es/iconfont.1750153812846.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +29 -4
- package/es/table/module/custom/panel.js +105 -93
- package/es/table/module/export/export-panel.js +3 -2
- package/es/table/module/export/import-panel.js +3 -2
- package/es/table/module/filter/panel.js +3 -2
- package/es/table/module/menu/panel.js +3 -2
- package/es/table/src/body.js +7 -5
- package/es/table/src/cell.js +14 -14
- package/es/table/src/column.js +3 -2
- package/es/table/src/footer.js +3 -2
- package/es/table/src/group.js +3 -2
- package/es/table/src/header.js +3 -2
- package/es/table/src/props.js +28 -7
- package/es/table/src/table.js +64 -47
- package/es/table/style.css +22 -3
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +155 -61
- package/es/ui/index.js +12 -1
- package/es/ui/src/comp.js +2 -0
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +22 -3
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +20 -5
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/{iconfont.1749800539928.ttf → iconfont.1750153812846.ttf} +0 -0
- package/lib/iconfont.1750153812846.woff +0 -0
- package/lib/iconfont.1750153812846.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +350 -150
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +32 -4
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +14 -3
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/export/export-panel.js +2 -1
- package/lib/table/module/export/export-panel.min.js +1 -1
- package/lib/table/module/export/import-panel.js +2 -1
- package/lib/table/module/export/import-panel.min.js +1 -1
- package/lib/table/module/filter/panel.js +2 -1
- package/lib/table/module/filter/panel.min.js +1 -1
- package/lib/table/module/menu/panel.js +2 -1
- package/lib/table/module/menu/panel.min.js +1 -1
- package/lib/table/src/body.js +9 -9
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +16 -16
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -1
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/footer.js +2 -1
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +2 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +2 -1
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/props.js +28 -7
- package/lib/table/src/table.js +13 -11
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +22 -3
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +180 -85
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +12 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +8 -0
- package/lib/ui/src/comp.min.js +1 -0
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +22 -3
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/grid/src/grid.ts +29 -7
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/custom/hook.ts +27 -4
- package/packages/table/module/custom/panel.ts +114 -102
- package/packages/table/module/export/export-panel.ts +3 -2
- package/packages/table/module/export/import-panel.ts +3 -2
- package/packages/table/module/filter/panel.ts +3 -2
- package/packages/table/module/menu/panel.ts +3 -2
- package/packages/table/src/body.ts +10 -8
- package/packages/table/src/cell.ts +14 -14
- package/packages/table/src/column.ts +3 -2
- package/packages/table/src/footer.ts +3 -2
- package/packages/table/src/group.ts +3 -2
- package/packages/table/src/header.ts +3 -2
- package/packages/table/src/props.ts +28 -7
- package/packages/table/src/table.ts +66 -46
- package/packages/toolbar/src/toolbar.ts +157 -58
- package/packages/ui/index.ts +11 -0
- package/packages/ui/src/comp.ts +3 -0
- package/styles/components/icon.scss +13 -1
- package/styles/components/table-module/custom.scss +9 -2
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/es/iconfont.1749800539928.woff +0 -0
- package/es/iconfont.1749800539928.woff2 +0 -0
- package/lib/iconfont.1749800539928.woff +0 -0
- package/lib/iconfont.1749800539928.woff2 +0 -0
|
@@ -5,7 +5,7 @@ const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'saveCustom', 'cance
|
|
|
5
5
|
VxeUI.hooks.add('tableCustomModule', {
|
|
6
6
|
setupTable($xeTable) {
|
|
7
7
|
const { reactData, internalData } = $xeTable;
|
|
8
|
-
const { computeCustomOpts } = $xeTable.getComputeMaps();
|
|
8
|
+
const { computeCustomOpts, computeRowGroupFields } = $xeTable.getComputeMaps();
|
|
9
9
|
const { refElem } = $xeTable.getRefMaps();
|
|
10
10
|
const $xeGrid = $xeTable.xeGrid;
|
|
11
11
|
const calcMaxHeight = () => {
|
|
@@ -61,7 +61,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
61
61
|
return nextTick();
|
|
62
62
|
};
|
|
63
63
|
const saveCustom = () => {
|
|
64
|
-
const { customColumnList } = reactData;
|
|
64
|
+
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
65
65
|
const customOpts = computeCustomOpts.value;
|
|
66
66
|
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
|
|
67
67
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
@@ -95,7 +95,19 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
95
95
|
setTimeout(() => {
|
|
96
96
|
reactData.isDragColMove = false;
|
|
97
97
|
}, 1000);
|
|
98
|
-
return $xeTable.saveCustomStore('confirm')
|
|
98
|
+
return $xeTable.saveCustomStore('confirm').then(() => {
|
|
99
|
+
if ($xeTable.handlePivotTableAggregateData) {
|
|
100
|
+
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
101
|
+
// 改动聚合分组
|
|
102
|
+
if (aggHandleFields.length) {
|
|
103
|
+
$xeTable.setRowGroups(aggHandleFields);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
$xeTable.clearRowGroups();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
99
111
|
};
|
|
100
112
|
const cancelCustom = () => {
|
|
101
113
|
const { customColumnList, customStore } = reactData;
|
|
@@ -168,6 +180,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
168
180
|
saveCustom,
|
|
169
181
|
cancelCustom,
|
|
170
182
|
resetCustom(options) {
|
|
183
|
+
const { rowGroupList } = reactData;
|
|
171
184
|
const { collectColumn } = internalData;
|
|
172
185
|
const customOpts = computeCustomOpts.value;
|
|
173
186
|
const { checkMethod } = customOpts;
|
|
@@ -194,7 +207,19 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
194
207
|
});
|
|
195
208
|
reactData.isCustomStatus = false;
|
|
196
209
|
$xeTable.saveCustomStore('reset');
|
|
197
|
-
return $xeTable.handleCustom()
|
|
210
|
+
return $xeTable.handleCustom().then(() => {
|
|
211
|
+
if ($xeTable.handlePivotTableAggregateData) {
|
|
212
|
+
const rowGroupFields = computeRowGroupFields.value;
|
|
213
|
+
if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
|
|
214
|
+
if (rowGroupFields && rowGroupFields.length) {
|
|
215
|
+
$xeTable.setRowGroups(rowGroupFields);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
$xeTable.clearRowGroups();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
});
|
|
198
223
|
},
|
|
199
224
|
toggleCustomAllCheckbox() {
|
|
200
225
|
const { customStore } = reactData;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, inject, ref, nextTick, TransitionGroup, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
3
|
import { VxeUI } from '../../../ui';
|
|
3
4
|
import { formatText } from '../../../ui/src/utils';
|
|
4
5
|
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom';
|
|
5
6
|
import { errLog } from '../../../ui/src/log';
|
|
6
7
|
import XEUtils from 'xe-utils';
|
|
7
8
|
const { getI18n, getIcon, renderEmptyElement } = VxeUI;
|
|
8
|
-
export default
|
|
9
|
+
export default defineVxeComponent({
|
|
9
10
|
name: 'TableCustomPanel',
|
|
10
11
|
props: {
|
|
11
12
|
customStore: {
|
|
@@ -470,7 +471,9 @@ export default defineComponent({
|
|
|
470
471
|
};
|
|
471
472
|
const renderSimplePanel = () => {
|
|
472
473
|
const $xeGrid = $xeTable.xeGrid;
|
|
474
|
+
const tableProps = $xeTable.props;
|
|
473
475
|
const { customStore } = props;
|
|
476
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
474
477
|
const { isCustomStatus, customColumnList } = reactData;
|
|
475
478
|
const customOpts = computeCustomOpts.value;
|
|
476
479
|
const { immediate } = customOpts;
|
|
@@ -619,107 +622,116 @@ export default defineComponent({
|
|
|
619
622
|
: {}
|
|
620
623
|
}, customStore.visible
|
|
621
624
|
? [
|
|
625
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
626
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
627
|
+
customStore
|
|
628
|
+
})
|
|
629
|
+
: renderEmptyElement($xeTable),
|
|
622
630
|
h('div', {
|
|
623
|
-
class: 'vxe-table-custom--
|
|
624
|
-
},
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
h('
|
|
631
|
-
class: 'vxe-table-custom--
|
|
631
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
632
|
+
}, [
|
|
633
|
+
h('div', {
|
|
634
|
+
class: 'vxe-table-custom--header'
|
|
635
|
+
}, headerSlot
|
|
636
|
+
? $xeTable.callSlot(headerSlot, params)
|
|
637
|
+
: [
|
|
638
|
+
h('ul', {
|
|
639
|
+
class: 'vxe-table-custom--panel-list'
|
|
632
640
|
}, [
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
|
|
641
|
+
h('li', {
|
|
642
|
+
class: 'vxe-table-custom--option'
|
|
643
|
+
}, [
|
|
644
|
+
allowVisible
|
|
645
|
+
? h('div', {
|
|
646
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
647
|
+
'is--checked': isAllChecked,
|
|
648
|
+
'is--indeterminate': isAllIndeterminate
|
|
649
|
+
}],
|
|
650
|
+
title: getI18n('vxe.table.allTitle'),
|
|
651
|
+
onClick: allOptionEvent
|
|
652
|
+
}, [
|
|
653
|
+
h('span', {
|
|
654
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED)]
|
|
655
|
+
}),
|
|
656
|
+
h('span', {
|
|
657
|
+
class: 'vxe-checkbox--label'
|
|
658
|
+
}, getI18n('vxe.toolbar.customAll'))
|
|
659
|
+
])
|
|
660
|
+
: h('span', {
|
|
646
661
|
class: 'vxe-checkbox--label'
|
|
647
|
-
}, getI18n('vxe.
|
|
648
|
-
|
|
649
|
-
: h('span', {
|
|
650
|
-
class: 'vxe-checkbox--label'
|
|
651
|
-
}, getI18n('vxe.table.customTitle'))
|
|
662
|
+
}, getI18n('vxe.table.customTitle'))
|
|
663
|
+
])
|
|
652
664
|
])
|
|
653
|
-
])
|
|
665
|
+
]),
|
|
666
|
+
h('div', {
|
|
667
|
+
ref: bodyElemRef,
|
|
668
|
+
class: 'vxe-table-custom--body'
|
|
669
|
+
}, [
|
|
670
|
+
topSlot
|
|
671
|
+
? h('div', {
|
|
672
|
+
class: 'vxe-table-custom--panel-top'
|
|
673
|
+
}, $xeTable.callSlot(topSlot, params))
|
|
674
|
+
: renderEmptyElement($xeTable),
|
|
675
|
+
defaultSlot
|
|
676
|
+
? h('div', {
|
|
677
|
+
class: 'vxe-table-custom--panel-body'
|
|
678
|
+
}, $xeTable.callSlot(defaultSlot, params))
|
|
679
|
+
: h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
|
|
680
|
+
default: () => colVNs
|
|
681
|
+
}),
|
|
682
|
+
bottomSlot
|
|
683
|
+
? h('div', {
|
|
684
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
685
|
+
}, $xeTable.callSlot(bottomSlot, params))
|
|
686
|
+
: renderEmptyElement($xeTable),
|
|
687
|
+
renderDragTip()
|
|
654
688
|
]),
|
|
655
|
-
|
|
656
|
-
ref: bodyElemRef,
|
|
657
|
-
class: 'vxe-table-custom--body'
|
|
658
|
-
}, [
|
|
659
|
-
topSlot
|
|
660
|
-
? h('div', {
|
|
661
|
-
class: 'vxe-table-custom--panel-top'
|
|
662
|
-
}, $xeTable.callSlot(topSlot, params))
|
|
663
|
-
: renderEmptyElement($xeTable),
|
|
664
|
-
defaultSlot
|
|
665
|
-
? h('div', {
|
|
666
|
-
class: 'vxe-table-custom--panel-body'
|
|
667
|
-
}, $xeTable.callSlot(defaultSlot, params))
|
|
668
|
-
: h(TransitionGroup, Object.assign({ class: 'vxe-table-custom--panel-list', name: 'vxe-table-custom--list', tag: 'ul' }, customWrapperOns), {
|
|
669
|
-
default: () => colVNs
|
|
670
|
-
}),
|
|
671
|
-
bottomSlot
|
|
689
|
+
customOpts.showFooter
|
|
672
690
|
? h('div', {
|
|
673
|
-
class: 'vxe-table-custom--
|
|
674
|
-
},
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}, footerSlot
|
|
682
|
-
? $xeTable.callSlot(footerSlot, params)
|
|
683
|
-
: [
|
|
684
|
-
h('div', {
|
|
685
|
-
class: 'vxe-table-custom--footer-buttons'
|
|
686
|
-
}, [
|
|
687
|
-
VxeUIButtonComponent
|
|
688
|
-
? h(VxeUIButtonComponent, {
|
|
689
|
-
mode: 'text',
|
|
690
|
-
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
691
|
-
disabled: !isCustomStatus,
|
|
692
|
-
onClick: resetCustomEvent
|
|
693
|
-
})
|
|
694
|
-
: createCommentVNode(),
|
|
695
|
-
immediate
|
|
696
|
-
? (VxeUIButtonComponent
|
|
697
|
-
? h(VxeUIButtonComponent, {
|
|
698
|
-
mode: 'text',
|
|
699
|
-
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
700
|
-
onClick: cancelCloseEvent
|
|
701
|
-
})
|
|
702
|
-
: createCommentVNode())
|
|
703
|
-
: (VxeUIButtonComponent
|
|
691
|
+
class: 'vxe-table-custom--footer'
|
|
692
|
+
}, footerSlot
|
|
693
|
+
? $xeTable.callSlot(footerSlot, params)
|
|
694
|
+
: [
|
|
695
|
+
h('div', {
|
|
696
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
697
|
+
}, [
|
|
698
|
+
VxeUIButtonComponent
|
|
704
699
|
? h(VxeUIButtonComponent, {
|
|
705
700
|
mode: 'text',
|
|
706
|
-
content: customOpts.
|
|
707
|
-
|
|
701
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
702
|
+
disabled: !isCustomStatus,
|
|
703
|
+
onClick: resetCustomEvent
|
|
708
704
|
})
|
|
709
|
-
: createCommentVNode()
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
705
|
+
: createCommentVNode(),
|
|
706
|
+
immediate
|
|
707
|
+
? (VxeUIButtonComponent
|
|
708
|
+
? h(VxeUIButtonComponent, {
|
|
709
|
+
mode: 'text',
|
|
710
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
711
|
+
onClick: cancelCloseEvent
|
|
712
|
+
})
|
|
713
|
+
: createCommentVNode())
|
|
714
|
+
: (VxeUIButtonComponent
|
|
715
|
+
? h(VxeUIButtonComponent, {
|
|
716
|
+
mode: 'text',
|
|
717
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
718
|
+
onClick: cancelCustomEvent
|
|
719
|
+
})
|
|
720
|
+
: createCommentVNode()),
|
|
721
|
+
immediate
|
|
722
|
+
? createCommentVNode()
|
|
723
|
+
: (VxeUIButtonComponent
|
|
724
|
+
? h(VxeUIButtonComponent, {
|
|
725
|
+
mode: 'text',
|
|
726
|
+
status: 'primary',
|
|
727
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
728
|
+
onClick: confirmCustomEvent
|
|
729
|
+
})
|
|
730
|
+
: createCommentVNode())
|
|
731
|
+
])
|
|
720
732
|
])
|
|
721
|
-
|
|
722
|
-
|
|
733
|
+
: null
|
|
734
|
+
])
|
|
723
735
|
]
|
|
724
736
|
: []);
|
|
725
737
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, createCommentVNode, ref, computed, reactive, inject, nextTick } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
3
|
import { VxeUI } from '../../../ui';
|
|
3
4
|
import XEUtils from 'xe-utils';
|
|
4
5
|
import { formatText } from '../../../ui/src/utils';
|
|
5
6
|
import { errLog } from '../../../ui/src/log';
|
|
6
7
|
const { getI18n, getIcon } = VxeUI;
|
|
7
|
-
export default
|
|
8
|
+
export default defineVxeComponent({
|
|
8
9
|
name: 'VxeTableExportPanel',
|
|
9
10
|
props: {
|
|
10
11
|
defaultOptions: Object,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, computed, inject, reactive, nextTick, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
3
|
import { VxeUI } from '../../../ui';
|
|
3
4
|
import XEUtils from 'xe-utils';
|
|
4
5
|
import { parseFile } from '../../../ui/src/utils';
|
|
5
6
|
import { errLog } from '../../../ui/src/log';
|
|
6
7
|
const { getI18n, getIcon } = VxeUI;
|
|
7
|
-
export default
|
|
8
|
+
export default defineVxeComponent({
|
|
8
9
|
name: 'VxeTableImportPanel',
|
|
9
10
|
props: {
|
|
10
11
|
defaultOptions: Object,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, ref, computed, inject, Teleport } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
3
|
import { VxeUI } from '../../../ui';
|
|
3
4
|
import { formatText, isEnableConf } from '../../../ui/src/utils';
|
|
4
5
|
import { getPropClass } from '../../../ui/src/dom';
|
|
5
6
|
import { getSlotVNs } from '../../../ui/src/vn';
|
|
6
7
|
import XEUtils from 'xe-utils';
|
|
7
8
|
const { getI18n, getIcon, renderer } = VxeUI;
|
|
8
|
-
export default
|
|
9
|
+
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTableFilterPanel',
|
|
10
11
|
props: {
|
|
11
12
|
filterStore: Object
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Teleport, inject, ref, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp';
|
|
2
3
|
import { VxeUI } from '../../../ui';
|
|
3
4
|
import { getFuncText } from '../../../ui/src/utils';
|
|
4
5
|
import XEUtils from 'xe-utils';
|
|
5
6
|
const { getIcon } = VxeUI;
|
|
6
|
-
export default
|
|
7
|
+
export default defineVxeComponent({
|
|
7
8
|
name: 'VxeTableMenuPanel',
|
|
8
9
|
setup(props, context) {
|
|
9
10
|
const xID = XEUtils.uniqueId();
|
package/es/table/src/body.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
3
|
import XEUtils from 'xe-utils';
|
|
3
4
|
import { VxeUI } from '../../ui';
|
|
4
5
|
import { getOffsetSize, calcTreeLine, getRowid, createHandleGetRowId, getCellRestHeight } from './util';
|
|
@@ -7,7 +8,7 @@ import { isEnableConf } from '../../ui/src/utils';
|
|
|
7
8
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
9
|
const { getI18n, renderer, renderEmptyElement } = VxeUI;
|
|
9
10
|
const renderType = 'body';
|
|
10
|
-
export default
|
|
11
|
+
export default defineVxeComponent({
|
|
11
12
|
name: 'VxeTableBody',
|
|
12
13
|
props: {
|
|
13
14
|
tableData: Array,
|
|
@@ -541,7 +542,7 @@ export default defineComponent({
|
|
|
541
542
|
const { showOverflow } = expandColumn || {};
|
|
542
543
|
const colid = expandColumn.id;
|
|
543
544
|
const colRest = fullColumnIdData[colid] || {};
|
|
544
|
-
const hasEllipsis =
|
|
545
|
+
const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
545
546
|
let columnIndex = -1;
|
|
546
547
|
let $columnIndex = -1;
|
|
547
548
|
let _columnIndex = -1;
|
|
@@ -714,14 +715,15 @@ export default defineComponent({
|
|
|
714
715
|
}
|
|
715
716
|
let emptyContent;
|
|
716
717
|
const emptySlot = slots ? slots.empty : null;
|
|
718
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid };
|
|
717
719
|
if (emptySlot) {
|
|
718
|
-
emptyContent = $xeTable.callSlot(emptySlot,
|
|
720
|
+
emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
|
|
719
721
|
}
|
|
720
722
|
else {
|
|
721
723
|
const compConf = emptyOpts.name ? renderer.get(emptyOpts.name) : null;
|
|
722
724
|
const rtEmptyView = compConf ? (compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty) : null;
|
|
723
725
|
if (rtEmptyView) {
|
|
724
|
-
emptyContent = getSlotVNs(rtEmptyView(emptyOpts,
|
|
726
|
+
emptyContent = getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
725
727
|
}
|
|
726
728
|
else {
|
|
727
729
|
emptyContent = tableProps.emptyText || getI18n('vxe.table.emptyText');
|
package/es/table/src/cell.js
CHANGED
|
@@ -367,20 +367,6 @@ export const Cell = {
|
|
|
367
367
|
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
|
|
368
368
|
const renderOpts = editRender || cellRender;
|
|
369
369
|
const defaultSlot = slots ? slots.default : null;
|
|
370
|
-
if (defaultSlot) {
|
|
371
|
-
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
372
|
-
}
|
|
373
|
-
if (renderOpts) {
|
|
374
|
-
const compConf = renderer.get(renderOpts.name);
|
|
375
|
-
if (compConf) {
|
|
376
|
-
const rtCell = compConf.renderTableCell || compConf.renderCell;
|
|
377
|
-
const rtDefault = compConf.renderTableDefault || compConf.renderDefault;
|
|
378
|
-
const renderFn = editRender ? rtCell : rtDefault;
|
|
379
|
-
if (renderFn) {
|
|
380
|
-
return renderCellBaseVNs(params, getSlotVNs(renderFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
370
|
let cellValue = '';
|
|
385
371
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
386
372
|
const aggRow = row;
|
|
@@ -429,6 +415,20 @@ export const Cell = {
|
|
|
429
415
|
}
|
|
430
416
|
}
|
|
431
417
|
else {
|
|
418
|
+
if (defaultSlot) {
|
|
419
|
+
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
420
|
+
}
|
|
421
|
+
if (renderOpts) {
|
|
422
|
+
const compConf = renderer.get(renderOpts.name);
|
|
423
|
+
if (compConf) {
|
|
424
|
+
const rtCell = compConf.renderTableCell || compConf.renderCell;
|
|
425
|
+
const rtDefault = compConf.renderTableDefault || compConf.renderDefault;
|
|
426
|
+
const renderFn = editRender ? rtCell : rtDefault;
|
|
427
|
+
if (renderFn) {
|
|
428
|
+
return renderCellBaseVNs(params, getSlotVNs(renderFn(renderOpts, Object.assign({ $type: editRender ? 'edit' : 'cell' }, params))));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
432
|
cellValue = $table.getCellLabel(row, column);
|
|
433
433
|
}
|
|
434
434
|
const cellPlaceholder = editRender ? editRender.placeholder : '';
|
package/es/table/src/column.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, onUnmounted, inject, ref, provide, onMounted, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
3
|
import { watchColumn, assembleColumn, destroyColumn } from './util';
|
|
3
4
|
import Cell from './cell';
|
|
4
5
|
export const columnProps = {
|
|
@@ -126,7 +127,7 @@ export const columnProps = {
|
|
|
126
127
|
// 额外的参数
|
|
127
128
|
params: Object
|
|
128
129
|
};
|
|
129
|
-
export default
|
|
130
|
+
export default defineVxeComponent({
|
|
130
131
|
name: 'VxeColumn',
|
|
131
132
|
props: columnProps,
|
|
132
133
|
setup(props, { slots }) {
|
package/es/table/src/footer.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransitionGroup, h, ref, inject, nextTick, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
3
|
import XEUtils from 'xe-utils';
|
|
3
4
|
import { VxeUI } from '../../ui';
|
|
4
5
|
import { updateCellTitle, getPropClass } from '../../ui/src/dom';
|
|
5
6
|
import { getCellHeight } from './util';
|
|
6
7
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
7
8
|
const renderType = 'footer';
|
|
8
|
-
export default
|
|
9
|
+
export default defineVxeComponent({
|
|
9
10
|
name: 'VxeTableFooter',
|
|
10
11
|
props: {
|
|
11
12
|
footerTableData: {
|
package/es/table/src/group.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, onUnmounted, provide, inject, ref, onMounted, createCommentVNode } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
3
|
import { columnProps } from './column';
|
|
3
4
|
import { watchColumn, assembleColumn, destroyColumn } from './util';
|
|
4
5
|
import Cell from './cell';
|
|
5
|
-
export default
|
|
6
|
+
export default defineVxeComponent({
|
|
6
7
|
name: 'VxeColgroup',
|
|
7
8
|
props: columnProps,
|
|
8
9
|
setup(props, { slots }) {
|
package/es/table/src/header.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransitionGroup, h, ref, inject, nextTick, watch, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
3
|
import XEUtils from 'xe-utils';
|
|
3
4
|
import { VxeUI } from '../../ui';
|
|
4
5
|
import { getCellHeight, convertHeaderColumnToRows } from './util';
|
|
5
6
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
6
7
|
const renderType = 'header';
|
|
7
|
-
export default
|
|
8
|
+
export default defineVxeComponent({
|
|
8
9
|
name: 'VxeTableHeader',
|
|
9
10
|
props: {
|
|
10
11
|
tableData: Array,
|
package/es/table/src/props.js
CHANGED
|
@@ -153,11 +153,20 @@ export default {
|
|
|
153
153
|
default: () => getConfig().table.showFooterOverflow
|
|
154
154
|
},
|
|
155
155
|
/** 高级属性 */
|
|
156
|
-
|
|
156
|
+
/**
|
|
157
|
+
* (即将废弃)columnKey 已废弃,被 column-config.useKey 替换
|
|
158
|
+
* @deprecated
|
|
159
|
+
*/
|
|
157
160
|
columnKey: Boolean,
|
|
158
|
-
|
|
161
|
+
/**
|
|
162
|
+
* (即将废弃)rowKey 已废弃,被 row-config.useKey 替换
|
|
163
|
+
* @deprecated
|
|
164
|
+
*/
|
|
159
165
|
rowKey: Boolean,
|
|
160
|
-
|
|
166
|
+
/**
|
|
167
|
+
* (即将废弃)rowId 已废弃,被 row-config.keyField 替换
|
|
168
|
+
* @deprecated
|
|
169
|
+
*/
|
|
161
170
|
rowId: {
|
|
162
171
|
type: String,
|
|
163
172
|
default: () => getConfig().table.rowId
|
|
@@ -194,11 +203,17 @@ export default {
|
|
|
194
203
|
rowConfig: Object,
|
|
195
204
|
// 数据聚合配置项
|
|
196
205
|
aggregateConfig: Object,
|
|
197
|
-
|
|
206
|
+
/**
|
|
207
|
+
* 已废弃,被 aggregateConfig 替换
|
|
208
|
+
* @deprecated
|
|
209
|
+
*/
|
|
198
210
|
rowGroupConfig: Object,
|
|
199
211
|
// 当前行配置项
|
|
200
212
|
currentRowConfig: Object,
|
|
201
|
-
|
|
213
|
+
/**
|
|
214
|
+
* 已废弃,被 rowDragConfig 替换
|
|
215
|
+
* @deprecated
|
|
216
|
+
*/
|
|
202
217
|
dragConfig: Object,
|
|
203
218
|
// 行拖拽排序配置项
|
|
204
219
|
rowDragConfig: Object,
|
|
@@ -252,9 +267,15 @@ export default {
|
|
|
252
267
|
emptyRender: Object,
|
|
253
268
|
// 自定义列配置项
|
|
254
269
|
customConfig: Object,
|
|
255
|
-
|
|
270
|
+
/**
|
|
271
|
+
* (即将废弃)横向虚拟滚动配置项
|
|
272
|
+
* @deprecated
|
|
273
|
+
*/
|
|
256
274
|
scrollX: Object,
|
|
257
|
-
|
|
275
|
+
/**
|
|
276
|
+
* (即将废弃)纵向虚拟滚动配置项
|
|
277
|
+
* @deprecated
|
|
278
|
+
*/
|
|
258
279
|
scrollY: Object,
|
|
259
280
|
// 横向虚拟滚动配置项
|
|
260
281
|
virtualXConfig: Object,
|