vxe-table 4.19.21 → 4.19.23
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/dist/all.esm.js +682 -359
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/{iconfont.1782656047498.ttf → iconfont.1783046321610.ttf} +0 -0
- package/es/iconfont.1783046321610.woff +0 -0
- package/es/iconfont.1783046321610.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +16 -3
- package/es/locale/lang/de-DE.js +16 -3
- package/es/locale/lang/en-US.js +20 -7
- package/es/locale/lang/es-ES.js +16 -3
- package/es/locale/lang/fr-FR.js +16 -3
- package/es/locale/lang/hu-HU.js +16 -3
- package/es/locale/lang/hy-AM.js +16 -3
- package/es/locale/lang/id-ID.js +16 -3
- package/es/locale/lang/it-IT.js +15 -2
- package/es/locale/lang/ja-JP.js +16 -3
- package/es/locale/lang/ko-KR.js +16 -3
- package/es/locale/lang/ms-MY.js +16 -3
- package/es/locale/lang/nb-NO.js +16 -3
- package/es/locale/lang/pt-BR.js +16 -3
- package/es/locale/lang/ru-RU.js +16 -3
- package/es/locale/lang/th-TH.js +16 -3
- package/es/locale/lang/ug-CN.js +16 -3
- package/es/locale/lang/uk-UA.js +16 -3
- package/es/locale/lang/uz-UZ.js +16 -3
- package/es/locale/lang/vi-VN.js +15 -2
- package/es/locale/lang/zh-CHT.js +18 -5
- package/es/locale/lang/zh-CN.js +18 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/hook.js +114 -37
- package/es/table/module/custom/panel.js +405 -257
- package/es/table/module/edit/hook.js +0 -1
- package/es/table/src/columnInfo.js +14 -8
- package/es/table/src/emits.js +8 -0
- package/es/table/src/table.js +81 -46
- package/es/table/src/util.js +32 -1
- package/es/table/style.css +96 -49
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +16 -4
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +96 -49
- package/es/vxe-table/style.min.css +1 -1
- package/lib/{iconfont.1782656047498.ttf → iconfont.1783046321610.ttf} +0 -0
- package/lib/iconfont.1783046321610.woff +0 -0
- package/lib/iconfont.1783046321610.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +561 -206
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +16 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +16 -3
- package/lib/locale/lang/de-DE.js +16 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +16 -3
- package/lib/locale/lang/en-US.js +20 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +20 -7
- package/lib/locale/lang/es-ES.js +16 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +16 -3
- package/lib/locale/lang/fr-FR.js +16 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +16 -3
- package/lib/locale/lang/hu-HU.js +16 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +16 -3
- package/lib/locale/lang/hy-AM.js +16 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +16 -3
- package/lib/locale/lang/id-ID.js +16 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +16 -3
- package/lib/locale/lang/it-IT.js +15 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +15 -2
- package/lib/locale/lang/ja-JP.js +16 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +16 -3
- package/lib/locale/lang/ko-KR.js +16 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +16 -3
- package/lib/locale/lang/ms-MY.js +16 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +16 -3
- package/lib/locale/lang/nb-NO.js +16 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +16 -3
- package/lib/locale/lang/pt-BR.js +16 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +16 -3
- package/lib/locale/lang/ru-RU.js +16 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +16 -3
- package/lib/locale/lang/th-TH.js +16 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +16 -3
- package/lib/locale/lang/ug-CN.js +16 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +16 -3
- package/lib/locale/lang/uk-UA.js +16 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +16 -3
- package/lib/locale/lang/uz-UZ.js +16 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +16 -3
- package/lib/locale/lang/vi-VN.js +15 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +15 -2
- package/lib/locale/lang/zh-CHT.js +18 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +18 -5
- package/lib/locale/lang/zh-CN.js +18 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +18 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/hook.js +120 -34
- package/lib/table/module/custom/hook.min.js +1 -1
- package/lib/table/module/custom/panel.js +340 -141
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/hook.js +0 -1
- package/lib/table/module/edit/hook.min.js +1 -1
- package/lib/table/src/columnInfo.js +17 -7
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/emits.js +1 -1
- package/lib/table/src/emits.min.js +1 -1
- package/lib/table/src/table.js +11 -11
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +38 -1
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +96 -49
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +16 -4
- 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 +96 -49
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +16 -3
- package/packages/locale/lang/de-DE.ts +16 -3
- package/packages/locale/lang/en-US.ts +20 -7
- package/packages/locale/lang/es-ES.ts +16 -3
- package/packages/locale/lang/fr-FR.ts +16 -3
- package/packages/locale/lang/hu-HU.ts +16 -3
- package/packages/locale/lang/hy-AM.ts +16 -3
- package/packages/locale/lang/id-ID.ts +16 -3
- package/packages/locale/lang/it-IT.ts +15 -2
- package/packages/locale/lang/ja-JP.ts +16 -3
- package/packages/locale/lang/ko-KR.ts +16 -3
- package/packages/locale/lang/ms-MY.ts +16 -3
- package/packages/locale/lang/nb-NO.ts +16 -3
- package/packages/locale/lang/pt-BR.ts +16 -3
- package/packages/locale/lang/ru-RU.ts +16 -3
- package/packages/locale/lang/th-TH.ts +16 -3
- package/packages/locale/lang/ug-CN.ts +16 -3
- package/packages/locale/lang/uk-UA.ts +16 -3
- package/packages/locale/lang/uz-UZ.ts +16 -3
- package/packages/locale/lang/vi-VN.ts +15 -2
- package/packages/locale/lang/zh-CHT.ts +18 -5
- package/packages/locale/lang/zh-CN.ts +18 -5
- package/packages/table/module/custom/hook.ts +113 -36
- package/packages/table/module/custom/panel.ts +488 -286
- package/packages/table/module/edit/hook.ts +0 -1
- package/packages/table/src/columnInfo.ts +14 -8
- package/packages/table/src/emits.ts +8 -0
- package/packages/table/src/table.ts +91 -47
- package/packages/table/src/util.ts +35 -1
- package/packages/ui/index.ts +15 -3
- package/styles/components/icon.scss +29 -2
- package/styles/components/table-module/custom.scss +88 -67
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +13 -1
- package/es/iconfont.1782656047498.woff +0 -0
- package/es/iconfont.1782656047498.woff2 +0 -0
- package/lib/iconfont.1782656047498.woff +0 -0
- package/lib/iconfont.1782656047498.woff2 +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -44,7 +44,7 @@ function eqEmptyValue(cellValue) {
|
|
|
44
44
|
return cellValue === '' || XEUtils.eqNull(cellValue);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const version = "4.19.
|
|
47
|
+
const version = "4.19.23";
|
|
48
48
|
VxeUI.version = version;
|
|
49
49
|
VxeUI.tableVersion = version;
|
|
50
50
|
VxeUI.setConfig({
|
|
@@ -155,6 +155,7 @@ VxeUI.setConfig({
|
|
|
155
155
|
allowResizable: true,
|
|
156
156
|
allowFixed: true,
|
|
157
157
|
allowSort: true,
|
|
158
|
+
allowAlign: true,
|
|
158
159
|
showSortDragButton: true,
|
|
159
160
|
showFooter: true,
|
|
160
161
|
placement: 'top-right',
|
|
@@ -163,9 +164,11 @@ VxeUI.setConfig({
|
|
|
163
164
|
visible: true,
|
|
164
165
|
resizable: true,
|
|
165
166
|
sort: true,
|
|
166
|
-
fixed: true
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
fixed: true,
|
|
168
|
+
align: true,
|
|
169
|
+
headerAlign: true,
|
|
170
|
+
footerAlign: true,
|
|
171
|
+
aggFunc: true
|
|
169
172
|
},
|
|
170
173
|
// autoAggGroupValues: false,
|
|
171
174
|
// checkMethod () {},
|
|
@@ -388,6 +391,15 @@ VxeUI.setIcon({
|
|
|
388
391
|
TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
|
|
389
392
|
TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
|
|
390
393
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
394
|
+
TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
|
|
395
|
+
TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
|
|
396
|
+
TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
|
|
397
|
+
TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
|
|
398
|
+
TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
|
|
399
|
+
TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
|
|
400
|
+
TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
|
|
401
|
+
TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
|
|
402
|
+
TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
|
|
391
403
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
392
404
|
TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
|
|
393
405
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
@@ -743,7 +755,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
743
755
|
}
|
|
744
756
|
|
|
745
757
|
const { log } = VxeUI;
|
|
746
|
-
const tableVersion = `table v${"4.19.
|
|
758
|
+
const tableVersion = `table v${"4.19.23"}`;
|
|
747
759
|
function createComponentLog(name) {
|
|
748
760
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
749
761
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -766,7 +778,7 @@ class ColumnInfo {
|
|
|
766
778
|
const $xeGrid = $xeTable.xeGrid;
|
|
767
779
|
const $xeGantt = $xeTable.xeGantt;
|
|
768
780
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
769
|
-
const { type, field, width, visible, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
|
|
781
|
+
const { type, field, width, visible, fixed, align, headerAlign, footerAlign, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
|
|
770
782
|
const colId = colConfs.colId || XEUtils.uniqueId('col_');
|
|
771
783
|
const defaultVisible = XEUtils.isBoolean(visible) ? visible : true;
|
|
772
784
|
const defaultRenderWidth = width && isPx(width) && width !== 'auto' ? Math.max(0, XEUtils.toInteger(width)) : 0;
|
|
@@ -828,10 +840,10 @@ class ColumnInfo {
|
|
|
828
840
|
minWidth: colConfs.minWidth,
|
|
829
841
|
maxWidth: colConfs.maxWidth,
|
|
830
842
|
resizable: colConfs.resizable,
|
|
831
|
-
fixed
|
|
832
|
-
align
|
|
833
|
-
headerAlign
|
|
834
|
-
footerAlign
|
|
843
|
+
fixed,
|
|
844
|
+
align,
|
|
845
|
+
headerAlign,
|
|
846
|
+
footerAlign,
|
|
835
847
|
showOverflow: colConfs.showOverflow,
|
|
836
848
|
showHeaderOverflow: colConfs.showHeaderOverflow,
|
|
837
849
|
showFooterOverflow: colConfs.showFooterOverflow,
|
|
@@ -868,7 +880,7 @@ class ColumnInfo {
|
|
|
868
880
|
titleHelp: colConfs.titleHelp,
|
|
869
881
|
titlePrefix: colConfs.titlePrefix,
|
|
870
882
|
titleSuffix: colConfs.titleSuffix,
|
|
871
|
-
aggFunc
|
|
883
|
+
aggFunc,
|
|
872
884
|
copyMethod: colConfs.copyMethod,
|
|
873
885
|
cutMethod: colConfs.cutMethod,
|
|
874
886
|
pasteMethod: colConfs.pasteMethod,
|
|
@@ -882,8 +894,11 @@ class ColumnInfo {
|
|
|
882
894
|
defaultParentId: null,
|
|
883
895
|
halfVisible: false,
|
|
884
896
|
defaultVisible: defaultVisible,
|
|
885
|
-
defaultFixed:
|
|
886
|
-
|
|
897
|
+
defaultFixed: fixed,
|
|
898
|
+
defaultAlign: align,
|
|
899
|
+
defaultHeaderAlign: headerAlign,
|
|
900
|
+
defaultFooterAlign: footerAlign,
|
|
901
|
+
defaultAggFunc: aggFunc,
|
|
887
902
|
checked: false,
|
|
888
903
|
halfChecked: false,
|
|
889
904
|
disabled: false,
|
|
@@ -902,6 +917,9 @@ class ColumnInfo {
|
|
|
902
917
|
renderAggFn: '',
|
|
903
918
|
renderAggDigits: null,
|
|
904
919
|
renderAggFormat: null,
|
|
920
|
+
renderAlign: '',
|
|
921
|
+
renderHeaderAlign: '',
|
|
922
|
+
renderFooterAlign: '',
|
|
905
923
|
renderFixed: '',
|
|
906
924
|
renderVisible: false,
|
|
907
925
|
renderWidth: defaultRenderWidth,
|
|
@@ -1165,7 +1183,8 @@ function createReactData$2() {
|
|
|
1165
1183
|
activeWrapper: false,
|
|
1166
1184
|
visible: false,
|
|
1167
1185
|
maxHeight: null,
|
|
1168
|
-
|
|
1186
|
+
defPopupStyle: {},
|
|
1187
|
+
panePopupStyle: {},
|
|
1169
1188
|
oldSortMaps: {},
|
|
1170
1189
|
oldFixedMaps: {},
|
|
1171
1190
|
oldVisibleMaps: {}
|
|
@@ -1965,6 +1984,36 @@ function colToVisible($xeTable, isForce, column, row) {
|
|
|
1965
1984
|
}
|
|
1966
1985
|
return Promise.resolve();
|
|
1967
1986
|
}
|
|
1987
|
+
function hangleBolleanDefaultValue(currVal, defVal) {
|
|
1988
|
+
return XEUtils.isBoolean(currVal) ? currVal : defVal;
|
|
1989
|
+
}
|
|
1990
|
+
function handleCustomStoreConfig($xeTable) {
|
|
1991
|
+
const { computeCustomOpts } = $xeTable.getComputeMaps();
|
|
1992
|
+
const customOpts = computeCustomOpts.value;
|
|
1993
|
+
const { storage, storeOptions } = customOpts;
|
|
1994
|
+
const isAllCustom = storage === true;
|
|
1995
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
1996
|
+
const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
|
|
1997
|
+
const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
|
|
1998
|
+
const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
|
|
1999
|
+
const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
|
|
2000
|
+
const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
|
|
2001
|
+
const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
|
|
2002
|
+
const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
|
|
2003
|
+
const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
2004
|
+
const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
2005
|
+
return {
|
|
2006
|
+
isCustomAlign,
|
|
2007
|
+
isCustomHeaderAlign,
|
|
2008
|
+
isCustomFooterAlign,
|
|
2009
|
+
isCustomResizable,
|
|
2010
|
+
isCustomVisible,
|
|
2011
|
+
isCustomFixed,
|
|
2012
|
+
isCustomSort,
|
|
2013
|
+
isCustomAggGroup,
|
|
2014
|
+
isCustomAggFunc
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
1968
2017
|
|
|
1969
2018
|
function getOnName(type) {
|
|
1970
2019
|
return 'on' + type.substring(0, 1).toLocaleUpperCase() + type.substring(1);
|
|
@@ -3876,10 +3925,18 @@ const tableEmits = [
|
|
|
3876
3925
|
'scroll',
|
|
3877
3926
|
'scroll-boundary',
|
|
3878
3927
|
'custom',
|
|
3928
|
+
'custom-open',
|
|
3929
|
+
'custom-close',
|
|
3930
|
+
'custom-cancel',
|
|
3931
|
+
'custom-reset',
|
|
3932
|
+
'custom-confirm',
|
|
3879
3933
|
'custom-visible-change',
|
|
3880
3934
|
'custom-visible-all',
|
|
3881
3935
|
'custom-fixed-change',
|
|
3882
3936
|
'custom-sort-change',
|
|
3937
|
+
'custom-align-change',
|
|
3938
|
+
'custom-header-align-change',
|
|
3939
|
+
'custom-footer-align-change',
|
|
3883
3940
|
'change-fnr', // 废弃
|
|
3884
3941
|
'open-fnr',
|
|
3885
3942
|
'show-fnr',
|
|
@@ -5755,23 +5812,30 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
5755
5812
|
$xeTable.saveCustom();
|
|
5756
5813
|
$xeTable.closeCustom();
|
|
5757
5814
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
5815
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event);
|
|
5758
5816
|
$xeTable.emitCustomEvent('close', $event);
|
|
5817
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
5759
5818
|
};
|
|
5760
5819
|
const cancelCloseEvent = ({ $event }) => {
|
|
5761
5820
|
$xeTable.closeCustom();
|
|
5762
5821
|
$xeTable.emitCustomEvent('close', $event);
|
|
5822
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
5763
5823
|
};
|
|
5764
5824
|
const cancelCustomEvent = ({ $event }) => {
|
|
5765
5825
|
$xeTable.cancelCustom();
|
|
5766
5826
|
$xeTable.closeCustom();
|
|
5767
5827
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
5828
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event);
|
|
5768
5829
|
$xeTable.emitCustomEvent('close', $event);
|
|
5830
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
5769
5831
|
};
|
|
5770
5832
|
const handleResetCustomEvent = (evnt) => {
|
|
5771
5833
|
$xeTable.resetCustom(true);
|
|
5772
5834
|
$xeTable.closeCustom();
|
|
5773
5835
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
5836
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt);
|
|
5774
5837
|
$xeTable.emitCustomEvent('close', evnt);
|
|
5838
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
5775
5839
|
};
|
|
5776
5840
|
const resetCustomEvent = ({ $event }) => {
|
|
5777
5841
|
if (VxeUI.modal) {
|
|
@@ -5881,6 +5945,20 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
5881
5945
|
$xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt);
|
|
5882
5946
|
}
|
|
5883
5947
|
};
|
|
5948
|
+
const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
|
|
5949
|
+
const customOpts = computeCustomOpts.value;
|
|
5950
|
+
if (customOpts.immediate) {
|
|
5951
|
+
column[colProperty] = targetAlign;
|
|
5952
|
+
column[renderProperty] = targetAlign;
|
|
5953
|
+
tableReactData.isCustomStatus = true;
|
|
5954
|
+
$xeTable.handleCustom();
|
|
5955
|
+
$xeTable.saveCustomStore(`update:${colProperty}`);
|
|
5956
|
+
}
|
|
5957
|
+
else {
|
|
5958
|
+
column[renderProperty] = targetAlign;
|
|
5959
|
+
}
|
|
5960
|
+
$xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
|
|
5961
|
+
};
|
|
5884
5962
|
const allOptionEvent = (evnt) => {
|
|
5885
5963
|
const { customStore } = tableReactData;
|
|
5886
5964
|
const isAll = !customStore.isAll;
|
|
@@ -6336,7 +6414,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6336
6414
|
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
|
|
6337
6415
|
const customOpts = computeCustomOpts.value;
|
|
6338
6416
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
6339
|
-
const {
|
|
6417
|
+
const { defPopupStyle } = customStore;
|
|
6340
6418
|
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
6341
6419
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
6342
6420
|
const vSize = computeSize.value;
|
|
@@ -6494,9 +6572,9 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6494
6572
|
!parentItem && allowFixed
|
|
6495
6573
|
? h('div', {
|
|
6496
6574
|
class: 'vxe-table-custom--fixed-option'
|
|
6497
|
-
},
|
|
6498
|
-
|
|
6499
|
-
|
|
6575
|
+
}, VxeUIButtonComponent
|
|
6576
|
+
? [
|
|
6577
|
+
h(VxeUIButtonComponent, {
|
|
6500
6578
|
mode: 'text',
|
|
6501
6579
|
icon: column.renderFixed === 'left' ? getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
6502
6580
|
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
@@ -6505,10 +6583,8 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6505
6583
|
onClick: ({ $event }) => {
|
|
6506
6584
|
changeFixedOption(column, 'left', $event);
|
|
6507
6585
|
}
|
|
6508
|
-
})
|
|
6509
|
-
|
|
6510
|
-
VxeUIButtonComponent
|
|
6511
|
-
? h(VxeUIButtonComponent, {
|
|
6586
|
+
}),
|
|
6587
|
+
h(VxeUIButtonComponent, {
|
|
6512
6588
|
mode: 'text',
|
|
6513
6589
|
icon: column.renderFixed === 'right' ? getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
6514
6590
|
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
@@ -6518,8 +6594,8 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6518
6594
|
changeFixedOption(column, 'right', $event);
|
|
6519
6595
|
}
|
|
6520
6596
|
})
|
|
6521
|
-
|
|
6522
|
-
|
|
6597
|
+
]
|
|
6598
|
+
: [])
|
|
6523
6599
|
: renderEmptyElement$6($xeTable)
|
|
6524
6600
|
]));
|
|
6525
6601
|
}
|
|
@@ -6531,7 +6607,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6531
6607
|
[`size--${vSize}`]: vSize,
|
|
6532
6608
|
'is--active': customStore.visible
|
|
6533
6609
|
}],
|
|
6534
|
-
style:
|
|
6610
|
+
style: defPopupStyle
|
|
6535
6611
|
}, customStore.visible
|
|
6536
6612
|
? [
|
|
6537
6613
|
h('div', {
|
|
@@ -6652,44 +6728,18 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6652
6728
|
]
|
|
6653
6729
|
: []);
|
|
6654
6730
|
};
|
|
6655
|
-
const
|
|
6656
|
-
const
|
|
6657
|
-
const
|
|
6658
|
-
const { customStore } = props;
|
|
6659
|
-
const { treeConfig, rowGroupConfig, aggregateConfig, resizable: allResizable } = tableProps;
|
|
6660
|
-
const { isCustomStatus, customColumnList } = tableReactData;
|
|
6731
|
+
const renderPopupBodys = () => {
|
|
6732
|
+
const { resizable: allResizable } = tableProps;
|
|
6733
|
+
const { customColumnList } = tableReactData;
|
|
6661
6734
|
const customOpts = computeCustomOpts.value;
|
|
6662
6735
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
6663
|
-
const
|
|
6664
|
-
const { placement: aggPlacement } = aggregateOpts;
|
|
6665
|
-
const { mode, immediate, showSortDragButton, showSortMoveButton, showSortPutButton, modalOptions, drawerOptions, allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
6736
|
+
const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
6666
6737
|
const columnOpts = computeColumnOpts.value;
|
|
6667
|
-
const { maxFixedSize } = columnOpts;
|
|
6668
6738
|
const resizableOpts = computeResizableOpts.value;
|
|
6669
6739
|
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
|
|
6670
|
-
const modalOpts = Object.assign({}, modalOptions);
|
|
6671
|
-
const drawerOpts = Object.assign({}, drawerOptions);
|
|
6672
6740
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
6673
6741
|
const { isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
6674
|
-
const slots = customOpts.slots || {};
|
|
6675
|
-
const headerSlot = slots.header;
|
|
6676
|
-
const topSlot = slots.top;
|
|
6677
|
-
const bottomSlot = slots.bottom;
|
|
6678
|
-
const defaultSlot = slots.default;
|
|
6679
|
-
const footerSlot = slots.footer;
|
|
6680
6742
|
const trVNs = [];
|
|
6681
|
-
const isAllChecked = customStore.isAll;
|
|
6682
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
6683
|
-
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
6684
|
-
const params = {
|
|
6685
|
-
$table: $xeTable,
|
|
6686
|
-
$grid: $xeGrid,
|
|
6687
|
-
$gantt: $xeGantt,
|
|
6688
|
-
columns: customColumnList,
|
|
6689
|
-
isAllChecked,
|
|
6690
|
-
isAllIndeterminate,
|
|
6691
|
-
isCustomStatus
|
|
6692
|
-
};
|
|
6693
6743
|
XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
6694
6744
|
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
|
|
6695
6745
|
if (isVisible) {
|
|
@@ -6721,6 +6771,243 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6721
6771
|
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
|
|
6722
6772
|
const isHidden = !isChecked;
|
|
6723
6773
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
6774
|
+
const alignList = [
|
|
6775
|
+
{ icon: getIcon$6().TABLE_CUSTOM_ALIGN_LEFT, value: 'left', title: getI18n$a('vxe.custom.setting.anLeftTitle'), disabled: isHidden },
|
|
6776
|
+
{ icon: getIcon$6().TABLE_CUSTOM_ALIGN_CENTER, value: 'center', title: getI18n$a('vxe.custom.setting.anCenterTitle'), disabled: isHidden },
|
|
6777
|
+
{ icon: getIcon$6().TABLE_CUSTOM_ALIGN_RIGHT, value: 'right', title: getI18n$a('vxe.custom.setting.anRightTitle'), disabled: isHidden }
|
|
6778
|
+
];
|
|
6779
|
+
const tdVNs = [];
|
|
6780
|
+
if (allowVisible) {
|
|
6781
|
+
tdVNs.push(h('td', {
|
|
6782
|
+
key: 'av',
|
|
6783
|
+
class: 'vxe-table-custom-popup--column-td col--visible'
|
|
6784
|
+
}, [
|
|
6785
|
+
h('div', {
|
|
6786
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
6787
|
+
'is--checked': isChecked,
|
|
6788
|
+
'is--indeterminate': isIndeterminate,
|
|
6789
|
+
'is--disabled': isDisabled
|
|
6790
|
+
}],
|
|
6791
|
+
title: getI18n$a('vxe.custom.setting.colVisible'),
|
|
6792
|
+
onClick: (evnt) => {
|
|
6793
|
+
if (!isDisabled) {
|
|
6794
|
+
changeCheckboxOption(column, evnt);
|
|
6795
|
+
}
|
|
6796
|
+
}
|
|
6797
|
+
}, [
|
|
6798
|
+
h('span', {
|
|
6799
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
|
|
6800
|
+
})
|
|
6801
|
+
])
|
|
6802
|
+
]));
|
|
6803
|
+
}
|
|
6804
|
+
tdVNs.push(h('td', {
|
|
6805
|
+
key: 'at',
|
|
6806
|
+
class: 'vxe-table-custom-popup--column-td col--name'
|
|
6807
|
+
}, [
|
|
6808
|
+
h('div', {
|
|
6809
|
+
class: 'vxe-table-custom-popup--name'
|
|
6810
|
+
}, [
|
|
6811
|
+
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
6812
|
+
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
6813
|
+
? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
6814
|
+
'is--disabled': isHidden
|
|
6815
|
+
}], title: getI18n$a('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
6816
|
+
? {}
|
|
6817
|
+
: {
|
|
6818
|
+
onMousedown: sortMousedownEvent,
|
|
6819
|
+
onMouseup: sortMouseupEvent
|
|
6820
|
+
})), [
|
|
6821
|
+
h('i', {
|
|
6822
|
+
class: getIcon$6().TABLE_CUSTOM_SORT
|
|
6823
|
+
})
|
|
6824
|
+
])
|
|
6825
|
+
: h('div', {
|
|
6826
|
+
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
6827
|
+
}))
|
|
6828
|
+
: renderEmptyElement$6($xeTable),
|
|
6829
|
+
column.type === 'html'
|
|
6830
|
+
? h('div', {
|
|
6831
|
+
key: '1',
|
|
6832
|
+
class: 'vxe-table-custom-popup--title',
|
|
6833
|
+
innerHTML: colTitle
|
|
6834
|
+
})
|
|
6835
|
+
: h('div', {
|
|
6836
|
+
key: '0',
|
|
6837
|
+
class: 'vxe-table-custom-popup--title',
|
|
6838
|
+
title: colTitle
|
|
6839
|
+
}, colTitle),
|
|
6840
|
+
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
6841
|
+
? h('div', {
|
|
6842
|
+
class: 'vxe-table-custom-popup--move-btn'
|
|
6843
|
+
}, VxeUIButtonComponent
|
|
6844
|
+
? [
|
|
6845
|
+
showSortMoveButton
|
|
6846
|
+
? h(VxeUIButtonComponent, {
|
|
6847
|
+
mode: 'text',
|
|
6848
|
+
icon: 'vxe-icon-arrows-up',
|
|
6849
|
+
title: getI18n$a('vxe.custom.setting.moveUpTitle'),
|
|
6850
|
+
disabled: index <= 0,
|
|
6851
|
+
onClick(evntParame) {
|
|
6852
|
+
sortMoveUpEvent(evntParame, column);
|
|
6853
|
+
}
|
|
6854
|
+
})
|
|
6855
|
+
: renderEmptyElement$6($xeTable),
|
|
6856
|
+
showSortMoveButton
|
|
6857
|
+
? h(VxeUIButtonComponent, {
|
|
6858
|
+
mode: 'text',
|
|
6859
|
+
icon: 'vxe-icon-arrows-down',
|
|
6860
|
+
title: getI18n$a('vxe.custom.setting.moveDnTitle'),
|
|
6861
|
+
disabled: index >= items.length - 1,
|
|
6862
|
+
onClick(evntParame) {
|
|
6863
|
+
sortMoveDnEvent(evntParame, column);
|
|
6864
|
+
}
|
|
6865
|
+
})
|
|
6866
|
+
: renderEmptyElement$6($xeTable),
|
|
6867
|
+
showSortPutButton && !parentItem
|
|
6868
|
+
? h(VxeUIButtonComponent, {
|
|
6869
|
+
mode: 'text',
|
|
6870
|
+
icon: 'vxe-icon-top',
|
|
6871
|
+
title: getI18n$a('vxe.custom.setting.putTopTitle'),
|
|
6872
|
+
disabled: index <= 0,
|
|
6873
|
+
onClick(evntParame) {
|
|
6874
|
+
sortMoveTopEvent(evntParame, column);
|
|
6875
|
+
}
|
|
6876
|
+
})
|
|
6877
|
+
: renderEmptyElement$6($xeTable),
|
|
6878
|
+
showSortPutButton && !parentItem
|
|
6879
|
+
? h(VxeUIButtonComponent, {
|
|
6880
|
+
mode: 'text',
|
|
6881
|
+
icon: 'vxe-icon-bottom',
|
|
6882
|
+
title: getI18n$a('vxe.custom.setting.putBottomTitle'),
|
|
6883
|
+
disabled: index >= items.length - 1,
|
|
6884
|
+
onClick(evntParame) {
|
|
6885
|
+
sortMoveBottomEvent(evntParame, column);
|
|
6886
|
+
}
|
|
6887
|
+
})
|
|
6888
|
+
: renderEmptyElement$6($xeTable)
|
|
6889
|
+
]
|
|
6890
|
+
: [])
|
|
6891
|
+
: renderEmptyElement$6($xeTable)
|
|
6892
|
+
])
|
|
6893
|
+
]));
|
|
6894
|
+
if (allowResizable) {
|
|
6895
|
+
tdVNs.push(h('td', {
|
|
6896
|
+
key: 'aw',
|
|
6897
|
+
class: 'vxe-table-custom-popup--column-td col--resizable'
|
|
6898
|
+
}, [
|
|
6899
|
+
((column.children && column.children.length) ||
|
|
6900
|
+
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
6901
|
+
? h('span', '-')
|
|
6902
|
+
: (VxeUINumberInputComponent
|
|
6903
|
+
? h(VxeUINumberInputComponent, {
|
|
6904
|
+
type: 'integer',
|
|
6905
|
+
immediate: false,
|
|
6906
|
+
disabled: isHidden,
|
|
6907
|
+
modelValue: column.renderResizeWidth,
|
|
6908
|
+
min: customMinWidth || undefined,
|
|
6909
|
+
max: customMaxWidth || undefined,
|
|
6910
|
+
'onUpdate:modelValue'(value) {
|
|
6911
|
+
const width = Math.max(0, Number(value));
|
|
6912
|
+
column.renderResizeWidth = width;
|
|
6913
|
+
},
|
|
6914
|
+
onChange() {
|
|
6915
|
+
changeColumnWidth(column);
|
|
6916
|
+
}
|
|
6917
|
+
})
|
|
6918
|
+
: renderEmptyElement$6($xeTable))
|
|
6919
|
+
]));
|
|
6920
|
+
}
|
|
6921
|
+
if (allowFixed) {
|
|
6922
|
+
tdVNs.push(h('td', {
|
|
6923
|
+
key: 'af',
|
|
6924
|
+
class: 'vxe-table-custom-popup--column-td col--fixed'
|
|
6925
|
+
}, parentItem
|
|
6926
|
+
? [h('span', '-')]
|
|
6927
|
+
: (VxeUIRadioGroupComponent
|
|
6928
|
+
? [
|
|
6929
|
+
h(VxeUIButtonComponent, {
|
|
6930
|
+
icon: column.renderFixed === 'left' ? getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
6931
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
6932
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
6933
|
+
title: getI18n$a(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
|
|
6934
|
+
onClick: ({ $event }) => {
|
|
6935
|
+
changeFixedOption(column, 'left', $event);
|
|
6936
|
+
}
|
|
6937
|
+
}),
|
|
6938
|
+
h(VxeUIButtonComponent, {
|
|
6939
|
+
icon: column.renderFixed === 'right' ? getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon$6().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
6940
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
6941
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
6942
|
+
title: getI18n$a(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
|
|
6943
|
+
onClick: ({ $event }) => {
|
|
6944
|
+
changeFixedOption(column, 'right', $event);
|
|
6945
|
+
}
|
|
6946
|
+
})
|
|
6947
|
+
]
|
|
6948
|
+
: [])));
|
|
6949
|
+
}
|
|
6950
|
+
if (allowAlign) {
|
|
6951
|
+
tdVNs.push(h('td', {
|
|
6952
|
+
key: 'aa',
|
|
6953
|
+
class: 'vxe-table-custom-popup--column-td col--align'
|
|
6954
|
+
}, VxeUIRadioGroupComponent
|
|
6955
|
+
? [
|
|
6956
|
+
h(VxeUIRadioGroupComponent, {
|
|
6957
|
+
modelValue: column.renderAlign || '',
|
|
6958
|
+
type: 'button',
|
|
6959
|
+
strict: false,
|
|
6960
|
+
disabled: isHidden,
|
|
6961
|
+
options: alignList,
|
|
6962
|
+
onChange({ value, $event }) {
|
|
6963
|
+
changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
|
|
6964
|
+
}
|
|
6965
|
+
})
|
|
6966
|
+
]
|
|
6967
|
+
: []));
|
|
6968
|
+
}
|
|
6969
|
+
if (allowHeaderAlign) {
|
|
6970
|
+
tdVNs.push(h('td', {
|
|
6971
|
+
key: 'aha',
|
|
6972
|
+
class: 'vxe-table-custom-popup--column-td col--header-align'
|
|
6973
|
+
}, isColGroup
|
|
6974
|
+
? [h('span', '-')]
|
|
6975
|
+
: (VxeUIRadioGroupComponent
|
|
6976
|
+
? [
|
|
6977
|
+
h(VxeUIRadioGroupComponent, {
|
|
6978
|
+
modelValue: column.renderHeaderAlign || '',
|
|
6979
|
+
type: 'button',
|
|
6980
|
+
strict: false,
|
|
6981
|
+
disabled: isHidden,
|
|
6982
|
+
options: alignList,
|
|
6983
|
+
onChange({ value, $event }) {
|
|
6984
|
+
changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
|
|
6985
|
+
}
|
|
6986
|
+
})
|
|
6987
|
+
]
|
|
6988
|
+
: [])));
|
|
6989
|
+
}
|
|
6990
|
+
if (allowFooterAlign) {
|
|
6991
|
+
tdVNs.push(h('td', {
|
|
6992
|
+
key: 'afa',
|
|
6993
|
+
class: 'vxe-table-custom-popup--column-td col--footer-align'
|
|
6994
|
+
}, isColGroup
|
|
6995
|
+
? [h('span', '-')]
|
|
6996
|
+
: (VxeUIRadioGroupComponent
|
|
6997
|
+
? [
|
|
6998
|
+
h(VxeUIRadioGroupComponent, {
|
|
6999
|
+
modelValue: column.renderFooterAlign || '',
|
|
7000
|
+
type: 'button',
|
|
7001
|
+
strict: false,
|
|
7002
|
+
disabled: isHidden,
|
|
7003
|
+
options: alignList,
|
|
7004
|
+
onChange({ value, $event }) {
|
|
7005
|
+
changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
|
|
7006
|
+
}
|
|
7007
|
+
})
|
|
7008
|
+
]
|
|
7009
|
+
: [])));
|
|
7010
|
+
}
|
|
6724
7011
|
trVNs.push(h('tr', {
|
|
6725
7012
|
key: column.id,
|
|
6726
7013
|
colid: column.id,
|
|
@@ -6730,177 +7017,139 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6730
7017
|
onDragstart: sortDragstartEvent,
|
|
6731
7018
|
onDragend: sortDragendEvent,
|
|
6732
7019
|
onDragover: sortDragoverEvent
|
|
6733
|
-
},
|
|
6734
|
-
allowVisible
|
|
6735
|
-
? h('td', {
|
|
6736
|
-
class: 'vxe-table-custom-popup--column-item col--visible'
|
|
6737
|
-
}, [
|
|
6738
|
-
h('div', {
|
|
6739
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
6740
|
-
'is--checked': isChecked,
|
|
6741
|
-
'is--indeterminate': isIndeterminate,
|
|
6742
|
-
'is--disabled': isDisabled
|
|
6743
|
-
}],
|
|
6744
|
-
title: getI18n$a('vxe.custom.setting.colVisible'),
|
|
6745
|
-
onClick: (evnt) => {
|
|
6746
|
-
if (!isDisabled) {
|
|
6747
|
-
changeCheckboxOption(column, evnt);
|
|
6748
|
-
}
|
|
6749
|
-
}
|
|
6750
|
-
}, [
|
|
6751
|
-
h('span', {
|
|
6752
|
-
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
|
|
6753
|
-
})
|
|
6754
|
-
])
|
|
6755
|
-
])
|
|
6756
|
-
: renderEmptyElement$6($xeTable),
|
|
6757
|
-
h('td', {
|
|
6758
|
-
class: 'vxe-table-custom-popup--column-item col--name'
|
|
6759
|
-
}, [
|
|
6760
|
-
h('div', {
|
|
6761
|
-
class: 'vxe-table-custom-popup--name'
|
|
6762
|
-
}, [
|
|
6763
|
-
(allowSort && showSortDragButton) || (allowGroup || allowValues)
|
|
6764
|
-
? (showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
6765
|
-
? h('div', Object.assign({ class: ['vxe-table-custom-popup--column-sort-btn', {
|
|
6766
|
-
'is--disabled': isHidden
|
|
6767
|
-
}], title: getI18n$a('vxe.custom.setting.sortHelpTip') }, (isHidden
|
|
6768
|
-
? {}
|
|
6769
|
-
: {
|
|
6770
|
-
onMousedown: sortMousedownEvent,
|
|
6771
|
-
onMouseup: sortMouseupEvent
|
|
6772
|
-
})), [
|
|
6773
|
-
h('i', {
|
|
6774
|
-
class: getIcon$6().TABLE_CUSTOM_SORT
|
|
6775
|
-
})
|
|
6776
|
-
])
|
|
6777
|
-
: h('div', {
|
|
6778
|
-
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
6779
|
-
}))
|
|
6780
|
-
: renderEmptyElement$6($xeTable),
|
|
6781
|
-
column.type === 'html'
|
|
6782
|
-
? h('div', {
|
|
6783
|
-
key: '1',
|
|
6784
|
-
class: 'vxe-table-custom-popup--title',
|
|
6785
|
-
innerHTML: colTitle
|
|
6786
|
-
})
|
|
6787
|
-
: h('div', {
|
|
6788
|
-
key: '0',
|
|
6789
|
-
class: 'vxe-table-custom-popup--title',
|
|
6790
|
-
title: colTitle
|
|
6791
|
-
}, colTitle),
|
|
6792
|
-
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
6793
|
-
? h('div', {
|
|
6794
|
-
class: 'vxe-table-custom-popup--move-btn'
|
|
6795
|
-
}, VxeUIButtonComponent
|
|
6796
|
-
? [
|
|
6797
|
-
showSortMoveButton
|
|
6798
|
-
? h(VxeUIButtonComponent, {
|
|
6799
|
-
mode: 'text',
|
|
6800
|
-
content: getI18n$a('vxe.custom.setting.moveUp'),
|
|
6801
|
-
title: getI18n$a('vxe.custom.setting.moveUpTitle'),
|
|
6802
|
-
disabled: index <= 0,
|
|
6803
|
-
onClick(evntParame) {
|
|
6804
|
-
sortMoveUpEvent(evntParame, column);
|
|
6805
|
-
}
|
|
6806
|
-
})
|
|
6807
|
-
: renderEmptyElement$6($xeTable),
|
|
6808
|
-
showSortMoveButton
|
|
6809
|
-
? h(VxeUIButtonComponent, {
|
|
6810
|
-
mode: 'text',
|
|
6811
|
-
content: getI18n$a('vxe.custom.setting.moveDn'),
|
|
6812
|
-
title: getI18n$a('vxe.custom.setting.moveDnTitle'),
|
|
6813
|
-
disabled: index >= items.length - 1,
|
|
6814
|
-
onClick(evntParame) {
|
|
6815
|
-
sortMoveDnEvent(evntParame, column);
|
|
6816
|
-
}
|
|
6817
|
-
})
|
|
6818
|
-
: renderEmptyElement$6($xeTable),
|
|
6819
|
-
showSortPutButton && !parentItem
|
|
6820
|
-
? h(VxeUIButtonComponent, {
|
|
6821
|
-
mode: 'text',
|
|
6822
|
-
content: getI18n$a('vxe.custom.setting.putTop'),
|
|
6823
|
-
title: getI18n$a('vxe.custom.setting.putTopTitle'),
|
|
6824
|
-
disabled: index <= 0,
|
|
6825
|
-
onClick(evntParame) {
|
|
6826
|
-
sortMoveTopEvent(evntParame, column);
|
|
6827
|
-
}
|
|
6828
|
-
})
|
|
6829
|
-
: renderEmptyElement$6($xeTable),
|
|
6830
|
-
showSortPutButton && !parentItem
|
|
6831
|
-
? h(VxeUIButtonComponent, {
|
|
6832
|
-
mode: 'text',
|
|
6833
|
-
content: getI18n$a('vxe.custom.setting.putBottom'),
|
|
6834
|
-
title: getI18n$a('vxe.custom.setting.putBottomTitle'),
|
|
6835
|
-
disabled: index >= items.length - 1,
|
|
6836
|
-
onClick(evntParame) {
|
|
6837
|
-
sortMoveBottomEvent(evntParame, column);
|
|
6838
|
-
}
|
|
6839
|
-
})
|
|
6840
|
-
: renderEmptyElement$6($xeTable)
|
|
6841
|
-
]
|
|
6842
|
-
: [])
|
|
6843
|
-
: renderEmptyElement$6($xeTable)
|
|
6844
|
-
])
|
|
6845
|
-
]),
|
|
6846
|
-
allowResizable
|
|
6847
|
-
? h('td', {
|
|
6848
|
-
class: 'vxe-table-custom-popup--column-item col--resizable'
|
|
6849
|
-
}, [
|
|
6850
|
-
((column.children && column.children.length) ||
|
|
6851
|
-
!(XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable)))
|
|
6852
|
-
? h('span', '-')
|
|
6853
|
-
: (VxeUINumberInputComponent
|
|
6854
|
-
? h(VxeUINumberInputComponent, {
|
|
6855
|
-
type: 'integer',
|
|
6856
|
-
immediate: false,
|
|
6857
|
-
disabled: isHidden,
|
|
6858
|
-
modelValue: column.renderResizeWidth,
|
|
6859
|
-
min: customMinWidth || undefined,
|
|
6860
|
-
max: customMaxWidth || undefined,
|
|
6861
|
-
'onUpdate:modelValue'(value) {
|
|
6862
|
-
const width = Math.max(0, Number(value));
|
|
6863
|
-
column.renderResizeWidth = width;
|
|
6864
|
-
},
|
|
6865
|
-
onChange() {
|
|
6866
|
-
changeColumnWidth(column);
|
|
6867
|
-
}
|
|
6868
|
-
})
|
|
6869
|
-
: renderEmptyElement$6($xeTable))
|
|
6870
|
-
])
|
|
6871
|
-
: renderEmptyElement$6($xeTable),
|
|
6872
|
-
allowFixed
|
|
6873
|
-
? h('td', {
|
|
6874
|
-
class: 'vxe-table-custom-popup--column-item col--fixed'
|
|
6875
|
-
}, [
|
|
6876
|
-
parentItem
|
|
6877
|
-
? h('span', '-')
|
|
6878
|
-
: (VxeUIRadioGroupComponent
|
|
6879
|
-
? h(VxeUIRadioGroupComponent, {
|
|
6880
|
-
modelValue: column.renderFixed || '',
|
|
6881
|
-
type: 'button',
|
|
6882
|
-
size: 'mini',
|
|
6883
|
-
disabled: isHidden,
|
|
6884
|
-
options: [
|
|
6885
|
-
{ label: getI18n$a('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
|
|
6886
|
-
{ label: getI18n$a('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
|
|
6887
|
-
{ label: getI18n$a('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
|
|
6888
|
-
],
|
|
6889
|
-
onChange({ label, $event }) {
|
|
6890
|
-
changeFixedOption(column, label, $event);
|
|
6891
|
-
}
|
|
6892
|
-
})
|
|
6893
|
-
: renderEmptyElement$6($xeTable))
|
|
6894
|
-
])
|
|
6895
|
-
: renderEmptyElement$6($xeTable)
|
|
6896
|
-
]));
|
|
7020
|
+
}, tdVNs));
|
|
6897
7021
|
}
|
|
6898
7022
|
});
|
|
7023
|
+
return trVNs;
|
|
7024
|
+
};
|
|
7025
|
+
const renderPopupPanel = () => {
|
|
7026
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
7027
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
7028
|
+
const { customStore } = props;
|
|
7029
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
7030
|
+
const { isCustomStatus, customColumnList } = tableReactData;
|
|
7031
|
+
const vSize = computeSize.value;
|
|
7032
|
+
const customOpts = computeCustomOpts.value;
|
|
7033
|
+
const aggregateOpts = computeAggregateOpts.value;
|
|
7034
|
+
const { panePopupStyle } = customStore;
|
|
7035
|
+
const { placement: aggPlacement } = aggregateOpts;
|
|
7036
|
+
const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
|
|
7037
|
+
const columnOpts = computeColumnOpts.value;
|
|
7038
|
+
const { maxFixedSize } = columnOpts;
|
|
7039
|
+
const modalOpts = Object.assign({}, modalOptions);
|
|
7040
|
+
const drawerOpts = Object.assign({}, drawerOptions);
|
|
7041
|
+
const slots = customOpts.slots || {};
|
|
7042
|
+
const headerSlot = slots.header;
|
|
7043
|
+
const topSlot = slots.top;
|
|
7044
|
+
const bottomSlot = slots.bottom;
|
|
7045
|
+
const defaultSlot = slots.default;
|
|
7046
|
+
const footerSlot = slots.footer;
|
|
7047
|
+
const isAllChecked = customStore.isAll;
|
|
7048
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
7049
|
+
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
7050
|
+
const params = {
|
|
7051
|
+
$table: $xeTable,
|
|
7052
|
+
$grid: $xeGrid,
|
|
7053
|
+
$gantt: $xeGantt,
|
|
7054
|
+
columns: customColumnList,
|
|
7055
|
+
isAllChecked,
|
|
7056
|
+
isAllIndeterminate,
|
|
7057
|
+
isCustomStatus
|
|
7058
|
+
};
|
|
7059
|
+
const colVNs = [];
|
|
7060
|
+
const headVNs = [];
|
|
7061
|
+
if (allowVisible) {
|
|
7062
|
+
colVNs.push(h('col', {
|
|
7063
|
+
key: 'av',
|
|
7064
|
+
class: 'vxe-table-custom-popup--column-col col--checkbox'
|
|
7065
|
+
}));
|
|
7066
|
+
headVNs.push(h('th', {
|
|
7067
|
+
key: 'av',
|
|
7068
|
+
class: 'vxe-table-custom-popup--column-th col--checkbox'
|
|
7069
|
+
}, [
|
|
7070
|
+
h('div', {
|
|
7071
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
7072
|
+
'is--checked': isAllChecked,
|
|
7073
|
+
'is--indeterminate': isAllIndeterminate
|
|
7074
|
+
}],
|
|
7075
|
+
title: getI18n$a('vxe.table.allTitle'),
|
|
7076
|
+
onClick: allOptionEvent
|
|
7077
|
+
}, [
|
|
7078
|
+
h('span', {
|
|
7079
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
|
|
7080
|
+
})
|
|
7081
|
+
// h('span', {
|
|
7082
|
+
// class: 'vxe-checkbox--label'
|
|
7083
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
7084
|
+
])
|
|
7085
|
+
]));
|
|
7086
|
+
}
|
|
7087
|
+
colVNs.push(h('col', {
|
|
7088
|
+
key: 'at',
|
|
7089
|
+
class: 'vxe-table-custom-popup--column-col col--title'
|
|
7090
|
+
}));
|
|
7091
|
+
headVNs.push(h('th', {
|
|
7092
|
+
key: 'at',
|
|
7093
|
+
class: 'vxe-table-custom-popup--column-th col--title'
|
|
7094
|
+
}, getI18n$a('vxe.custom.setting.colTitle')));
|
|
7095
|
+
if (allowResizable) {
|
|
7096
|
+
colVNs.push(h('col', {
|
|
7097
|
+
key: 'aw',
|
|
7098
|
+
class: 'vxe-table-custom-popup--column-col col--width'
|
|
7099
|
+
}));
|
|
7100
|
+
headVNs.push(h('th', {
|
|
7101
|
+
key: 'aw',
|
|
7102
|
+
class: 'vxe-table-custom-popup--column-th col--width'
|
|
7103
|
+
}, getI18n$a('vxe.custom.setting.colResizable')));
|
|
7104
|
+
}
|
|
7105
|
+
if (allowFixed) {
|
|
7106
|
+
colVNs.push(h('col', {
|
|
7107
|
+
key: 'af',
|
|
7108
|
+
class: 'vxe-table-custom-popup--column-col col--fixed'
|
|
7109
|
+
}));
|
|
7110
|
+
headVNs.push(h('th', {
|
|
7111
|
+
key: 'af',
|
|
7112
|
+
class: 'vxe-table-custom-popup--column-th col--fixed'
|
|
7113
|
+
}, getI18n$a(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
|
|
7114
|
+
}
|
|
7115
|
+
if (allowAlign) {
|
|
7116
|
+
colVNs.push(h('col', {
|
|
7117
|
+
key: 'aa',
|
|
7118
|
+
class: 'vxe-table-custom-popup--column-col col--align'
|
|
7119
|
+
}));
|
|
7120
|
+
headVNs.push(h('th', {
|
|
7121
|
+
key: 'aa',
|
|
7122
|
+
class: 'vxe-table-custom-popup--column-th col--align'
|
|
7123
|
+
}, getI18n$a('vxe.custom.setting.colAlign')));
|
|
7124
|
+
}
|
|
7125
|
+
if (allowHeaderAlign) {
|
|
7126
|
+
colVNs.push(h('col', {
|
|
7127
|
+
key: 'aha',
|
|
7128
|
+
class: 'vxe-table-custom-popup--column-col col--header-align'
|
|
7129
|
+
}));
|
|
7130
|
+
headVNs.push(h('th', {
|
|
7131
|
+
key: 'aha',
|
|
7132
|
+
class: 'vxe-table-custom-popup--column-th col--header-align'
|
|
7133
|
+
}, getI18n$a('vxe.custom.setting.colHeadAlign')));
|
|
7134
|
+
}
|
|
7135
|
+
if (allowFooterAlign) {
|
|
7136
|
+
colVNs.push(h('col', {
|
|
7137
|
+
key: 'afa',
|
|
7138
|
+
class: 'vxe-table-custom-popup--column-col col--footer-align'
|
|
7139
|
+
}));
|
|
7140
|
+
headVNs.push(h('th', {
|
|
7141
|
+
key: 'afa',
|
|
7142
|
+
class: 'vxe-table-custom-popup--column-th col--footer-align'
|
|
7143
|
+
}, getI18n$a('vxe.custom.setting.colFootAlign')));
|
|
7144
|
+
}
|
|
6899
7145
|
const scopedSlots = {
|
|
6900
7146
|
default: () => {
|
|
6901
7147
|
return h('div', {
|
|
6902
7148
|
ref: refBodyWrapperElem,
|
|
6903
|
-
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}
|
|
7149
|
+
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
|
|
7150
|
+
[`size--${vSize}`]: vSize
|
|
7151
|
+
}],
|
|
7152
|
+
style: panePopupStyle
|
|
6904
7153
|
}, defaultSlot
|
|
6905
7154
|
? $xeTable.callSlot(defaultSlot, params)
|
|
6906
7155
|
: [
|
|
@@ -6922,62 +7171,16 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
6922
7171
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
6923
7172
|
}, [
|
|
6924
7173
|
h('table', {}, [
|
|
6925
|
-
h('colgroup', {},
|
|
6926
|
-
allowVisible
|
|
6927
|
-
? h('col', {
|
|
6928
|
-
class: 'vxe-table-custom-popup--table-col-seq'
|
|
6929
|
-
})
|
|
6930
|
-
: renderEmptyElement$6($xeTable),
|
|
6931
|
-
h('col', {
|
|
6932
|
-
class: 'vxe-table-custom-popup--table-col-title'
|
|
6933
|
-
}),
|
|
6934
|
-
allowResizable
|
|
6935
|
-
? h('col', {
|
|
6936
|
-
class: 'vxe-table-custom-popup--table-col-width'
|
|
6937
|
-
})
|
|
6938
|
-
: renderEmptyElement$6($xeTable),
|
|
6939
|
-
allowFixed
|
|
6940
|
-
? h('col', {
|
|
6941
|
-
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
6942
|
-
})
|
|
6943
|
-
: renderEmptyElement$6($xeTable)
|
|
6944
|
-
]),
|
|
7174
|
+
h('colgroup', {}, colVNs),
|
|
6945
7175
|
h('thead', {}, [
|
|
6946
|
-
h('tr', {},
|
|
6947
|
-
allowVisible
|
|
6948
|
-
? h('th', {}, [
|
|
6949
|
-
h('div', {
|
|
6950
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
6951
|
-
'is--checked': isAllChecked,
|
|
6952
|
-
'is--indeterminate': isAllIndeterminate
|
|
6953
|
-
}],
|
|
6954
|
-
title: getI18n$a('vxe.table.allTitle'),
|
|
6955
|
-
onClick: allOptionEvent
|
|
6956
|
-
}, [
|
|
6957
|
-
h('span', {
|
|
6958
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon$6().TABLE_CHECKBOX_INDETERMINATE : (isAllChecked ? getIcon$6().TABLE_CHECKBOX_CHECKED : getIcon$6().TABLE_CHECKBOX_UNCHECKED)]
|
|
6959
|
-
}),
|
|
6960
|
-
h('span', {
|
|
6961
|
-
class: 'vxe-checkbox--label'
|
|
6962
|
-
}, getI18n$a('vxe.toolbar.customAll'))
|
|
6963
|
-
])
|
|
6964
|
-
])
|
|
6965
|
-
: renderEmptyElement$6($xeTable),
|
|
6966
|
-
h('th', {}, getI18n$a('vxe.custom.setting.colTitle')),
|
|
6967
|
-
allowResizable
|
|
6968
|
-
? h('th', {}, getI18n$a('vxe.custom.setting.colResizable'))
|
|
6969
|
-
: renderEmptyElement$6($xeTable),
|
|
6970
|
-
allowFixed
|
|
6971
|
-
? h('th', {}, getI18n$a(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize]))
|
|
6972
|
-
: renderEmptyElement$6($xeTable)
|
|
6973
|
-
])
|
|
7176
|
+
h('tr', {}, headVNs)
|
|
6974
7177
|
]),
|
|
6975
7178
|
h(TransitionGroup, {
|
|
6976
7179
|
class: 'vxe-table-custom--panel-list',
|
|
6977
7180
|
tag: 'tbody',
|
|
6978
7181
|
name: 'vxe-table-custom--list'
|
|
6979
7182
|
}, {
|
|
6980
|
-
default: () =>
|
|
7183
|
+
default: () => renderPopupBodys()
|
|
6981
7184
|
})
|
|
6982
7185
|
])
|
|
6983
7186
|
]),
|
|
@@ -7012,6 +7215,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
7012
7215
|
immediate
|
|
7013
7216
|
? (VxeUIButtonComponent
|
|
7014
7217
|
? h(VxeUIButtonComponent, {
|
|
7218
|
+
status: 'primary',
|
|
7015
7219
|
content: customOpts.closeButtonText || getI18n$a('vxe.table.customClose'),
|
|
7016
7220
|
onClick: cancelCloseEvent
|
|
7017
7221
|
})
|
|
@@ -7063,8 +7267,8 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
7063
7267
|
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
7064
7268
|
modelValue: customStore.visible,
|
|
7065
7269
|
title: modalOpts.title || getI18n$a('vxe.custom.cstmTitle'),
|
|
7066
|
-
width: modalOpts.width || Math.min(
|
|
7067
|
-
minWidth: modalOpts.minWidth ||
|
|
7270
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
7271
|
+
minWidth: modalOpts.minWidth || 800,
|
|
7068
7272
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
7069
7273
|
minHeight: modalOpts.minHeight || 400,
|
|
7070
7274
|
showZoom: modalOpts.showZoom,
|
|
@@ -7073,6 +7277,7 @@ var TableCustomPanelComponent = defineVxeComponent({
|
|
|
7073
7277
|
mask: modalOpts.mask,
|
|
7074
7278
|
lockView: modalOpts.lockView,
|
|
7075
7279
|
resize: modalOpts.resize,
|
|
7280
|
+
transfer: modalOpts.transfer,
|
|
7076
7281
|
escClosable: !!modalOpts.escClosable,
|
|
7077
7282
|
maskClosable: !!modalOpts.maskClosable,
|
|
7078
7283
|
destroyOnClose: true,
|
|
@@ -9695,7 +9900,6 @@ hooks$5.add('tableEditModule', {
|
|
|
9695
9900
|
return handleInsertRowAt(records, targetRowOrRowid, true);
|
|
9696
9901
|
},
|
|
9697
9902
|
insertChild(records, parentRowOrParentId) {
|
|
9698
|
-
window.aa = internalData;
|
|
9699
9903
|
return handleInsertChildRowAt(records, parentRowOrParentId, null);
|
|
9700
9904
|
},
|
|
9701
9905
|
insertChildAt(records, parentRowOrParentId, targetRow) {
|
|
@@ -13117,6 +13321,7 @@ hooks$2.add('tableValidatorModule', {
|
|
|
13117
13321
|
});
|
|
13118
13322
|
|
|
13119
13323
|
const tableCustomMethodKeys = ['openCustom', 'closeCustom', 'getCustomVisible', 'toggleCustom', 'saveCustom', 'cancelCustom', 'resetCustom', 'toggleCustomAllCheckbox', 'setCustomAllCheckbox'];
|
|
13324
|
+
const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
|
|
13120
13325
|
VxeUI.hooks.add('tableCustomModule', {
|
|
13121
13326
|
setupTable($xeTable) {
|
|
13122
13327
|
const { reactData, internalData } = $xeTable;
|
|
@@ -13130,14 +13335,15 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13130
13335
|
const customOpts = computeCustomOpts.value;
|
|
13131
13336
|
const { mode, placement, popupOptions } = customOpts;
|
|
13132
13337
|
const showSimple = !(mode === 'modal' || mode === 'drawer');
|
|
13133
|
-
const { transfer, maxHeight } = popupOptions || {};
|
|
13338
|
+
const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {};
|
|
13134
13339
|
const customSimpleMode = computeCustomSimpleMode.value;
|
|
13135
13340
|
const showCustomSimpleOutside = customSimpleMode === 'outside';
|
|
13136
13341
|
const bodyEl = document.documentElement;
|
|
13137
13342
|
let wrapperEl = refElem.value;
|
|
13138
13343
|
let popupTop = 0;
|
|
13139
13344
|
let popupMaxHeight = 0;
|
|
13140
|
-
const
|
|
13345
|
+
const defPupStys = {};
|
|
13346
|
+
const panePupStys = {};
|
|
13141
13347
|
if ($xeGantt) {
|
|
13142
13348
|
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
13143
13349
|
const ganttContainerElem = refGanttContainerElem.value;
|
|
@@ -13170,24 +13376,41 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13170
13376
|
}
|
|
13171
13377
|
if (!placement || !(['left', 'right', 'bottom-left', 'bottom-right'].includes(placement))) {
|
|
13172
13378
|
if (popupTop) {
|
|
13173
|
-
|
|
13379
|
+
defPupStys.top = toCssUnit(popupTop);
|
|
13174
13380
|
}
|
|
13175
13381
|
}
|
|
13176
13382
|
if (showSimple && transfer) {
|
|
13177
13383
|
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
13178
|
-
|
|
13384
|
+
defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
13179
13385
|
}
|
|
13180
13386
|
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
13181
|
-
|
|
13387
|
+
defPupStys.left = toCssUnit(tableRect.left);
|
|
13182
13388
|
}
|
|
13183
13389
|
else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
13184
|
-
|
|
13390
|
+
defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
|
|
13391
|
+
}
|
|
13392
|
+
}
|
|
13393
|
+
// 同步表格的css变量到弹窗中
|
|
13394
|
+
const bodyComputeStyle = getComputedStyle(bodyEl);
|
|
13395
|
+
const tableComputeStyle = getComputedStyle(wrapperEl);
|
|
13396
|
+
customColumnCssKeys.forEach(key => {
|
|
13397
|
+
const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
|
|
13398
|
+
const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
|
|
13399
|
+
if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
|
|
13400
|
+
panePupStys[currCssKey] = currCssVal;
|
|
13185
13401
|
}
|
|
13402
|
+
});
|
|
13403
|
+
if (minWidth) {
|
|
13404
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth);
|
|
13405
|
+
}
|
|
13406
|
+
if (maxWidth) {
|
|
13407
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth);
|
|
13186
13408
|
}
|
|
13187
13409
|
if (popupMxHeight) {
|
|
13188
|
-
|
|
13410
|
+
defPupStys.maxHeight = toCssUnit(popupMxHeight);
|
|
13189
13411
|
}
|
|
13190
|
-
customStore.
|
|
13412
|
+
customStore.defPopupStyle = defPupStys;
|
|
13413
|
+
customStore.panePopupStyle = panePupStys;
|
|
13191
13414
|
customStore.maxHeight = popupMxHeight;
|
|
13192
13415
|
return nextTick();
|
|
13193
13416
|
};
|
|
@@ -13236,6 +13459,9 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13236
13459
|
column.renderFixed = column.fixed;
|
|
13237
13460
|
column.renderVisible = column.visible;
|
|
13238
13461
|
column.renderResizeWidth = column.renderWidth;
|
|
13462
|
+
column.renderAlign = column.align;
|
|
13463
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
13464
|
+
column.renderFooterAlign = column.footerAlign;
|
|
13239
13465
|
sortMaps[colid] = column.renderSortNumber;
|
|
13240
13466
|
fixedMaps[colid] = column.fixed;
|
|
13241
13467
|
visibleMaps[colid] = column.visible;
|
|
@@ -13264,39 +13490,59 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13264
13490
|
}
|
|
13265
13491
|
return openCustom();
|
|
13266
13492
|
};
|
|
13267
|
-
const saveCustom = () => {
|
|
13493
|
+
const saveCustom = (isDirectly) => {
|
|
13268
13494
|
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
13269
13495
|
const customOpts = computeCustomOpts.value;
|
|
13270
|
-
const { allowVisible, allowSort, allowFixed, allowResizable, allowGroup, allowValues } = customOpts;
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
if (allowSort) {
|
|
13278
|
-
const sortIndex = index + 1;
|
|
13279
|
-
column.renderSortNumber = sortIndex;
|
|
13496
|
+
const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts;
|
|
13497
|
+
if (isDirectly) {
|
|
13498
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
13499
|
+
if (allowResizable) {
|
|
13500
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
13501
|
+
column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth));
|
|
13502
|
+
}
|
|
13280
13503
|
}
|
|
13281
|
-
|
|
13282
|
-
|
|
13504
|
+
});
|
|
13505
|
+
}
|
|
13506
|
+
else {
|
|
13507
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
13508
|
+
if (parentColumn) {
|
|
13509
|
+
// 更新子列信息
|
|
13510
|
+
column.fixed = parentColumn.fixed;
|
|
13283
13511
|
}
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13512
|
+
else {
|
|
13513
|
+
if (allowSort) {
|
|
13514
|
+
const sortIndex = index + 1;
|
|
13515
|
+
column.renderSortNumber = sortIndex;
|
|
13516
|
+
}
|
|
13517
|
+
if (allowFixed) {
|
|
13518
|
+
column.fixed = column.renderFixed;
|
|
13290
13519
|
}
|
|
13291
13520
|
}
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13521
|
+
if (allowResizable) {
|
|
13522
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
13523
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
13524
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
13525
|
+
column.renderWidth = column.renderResizeWidth;
|
|
13526
|
+
}
|
|
13527
|
+
}
|
|
13528
|
+
}
|
|
13529
|
+
if (allowVisible) {
|
|
13530
|
+
column.visible = column.renderVisible;
|
|
13531
|
+
}
|
|
13532
|
+
if (allowAlign) {
|
|
13533
|
+
column.align = column.renderAlign;
|
|
13534
|
+
}
|
|
13535
|
+
if (allowHeaderAlign) {
|
|
13536
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
13537
|
+
}
|
|
13538
|
+
if (allowFooterAlign) {
|
|
13539
|
+
column.footerAlign = column.renderFooterAlign;
|
|
13540
|
+
}
|
|
13541
|
+
if (allowGroup && allowValues) {
|
|
13542
|
+
column.aggFunc = column.renderAggFn;
|
|
13543
|
+
}
|
|
13544
|
+
});
|
|
13545
|
+
}
|
|
13300
13546
|
reactData.isCustomStatus = true;
|
|
13301
13547
|
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
13302
13548
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
@@ -13322,7 +13568,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13322
13568
|
const { customColumnList, customStore } = reactData;
|
|
13323
13569
|
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore;
|
|
13324
13570
|
const customOpts = computeCustomOpts.value;
|
|
13325
|
-
const { allowVisible, allowSort, allowFixed, allowResizable } = customOpts;
|
|
13571
|
+
const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts;
|
|
13326
13572
|
XEUtils.eachTree(customColumnList, column => {
|
|
13327
13573
|
const colid = column.getKey();
|
|
13328
13574
|
const visible = !!oldVisibleMaps[colid];
|
|
@@ -13341,6 +13587,15 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13341
13587
|
if (allowResizable) {
|
|
13342
13588
|
column.renderResizeWidth = column.renderWidth;
|
|
13343
13589
|
}
|
|
13590
|
+
if (allowAlign) {
|
|
13591
|
+
column.align = column.renderAlign;
|
|
13592
|
+
}
|
|
13593
|
+
if (allowHeaderAlign) {
|
|
13594
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
13595
|
+
}
|
|
13596
|
+
if (allowFooterAlign) {
|
|
13597
|
+
column.footerAlign = column.renderFooterAlign;
|
|
13598
|
+
}
|
|
13344
13599
|
}, { children: 'children' });
|
|
13345
13600
|
return nextTick();
|
|
13346
13601
|
};
|
|
@@ -13403,7 +13658,10 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13403
13658
|
resizable: options === true,
|
|
13404
13659
|
fixed: options === true,
|
|
13405
13660
|
sort: options === true,
|
|
13406
|
-
aggFunc: options === true
|
|
13661
|
+
aggFunc: options === true,
|
|
13662
|
+
align: options === true,
|
|
13663
|
+
headerAlign: options === true,
|
|
13664
|
+
footerAlign: options === true
|
|
13407
13665
|
}, options);
|
|
13408
13666
|
const allCols = [];
|
|
13409
13667
|
XEUtils.eachTree(collectColumn, (column) => {
|
|
@@ -13412,6 +13670,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13412
13670
|
}
|
|
13413
13671
|
if (opts.fixed) {
|
|
13414
13672
|
column.fixed = column.defaultFixed;
|
|
13673
|
+
column.renderFixed = column.defaultFixed;
|
|
13415
13674
|
}
|
|
13416
13675
|
if (opts.sort) {
|
|
13417
13676
|
column.renderSortNumber = column.sortNumber;
|
|
@@ -13420,6 +13679,18 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13420
13679
|
if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
|
|
13421
13680
|
column.visible = column.defaultVisible;
|
|
13422
13681
|
}
|
|
13682
|
+
if (opts.align) {
|
|
13683
|
+
column.align = column.defaultAlign;
|
|
13684
|
+
column.renderAlign = column.defaultAlign;
|
|
13685
|
+
}
|
|
13686
|
+
if (opts.headerAlign) {
|
|
13687
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
13688
|
+
column.renderHeaderAlign = column.defaultHeaderAlign;
|
|
13689
|
+
}
|
|
13690
|
+
if (opts.footerAlign) {
|
|
13691
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
13692
|
+
column.renderFooterAlign = column.defaultFooterAlign;
|
|
13693
|
+
}
|
|
13423
13694
|
if (opts.aggFunc) {
|
|
13424
13695
|
column.aggFunc = column.defaultAggFunc;
|
|
13425
13696
|
column.renderAggFn = column.defaultAggFunc;
|
|
@@ -13478,11 +13749,13 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13478
13749
|
if (customStore.visible) {
|
|
13479
13750
|
closeCustom();
|
|
13480
13751
|
emitCustomEvent('close', evnt);
|
|
13752
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
13481
13753
|
}
|
|
13482
13754
|
else {
|
|
13483
13755
|
customStore.btnEl = evnt.target;
|
|
13484
13756
|
openCustom();
|
|
13485
13757
|
emitCustomEvent('open', evnt);
|
|
13758
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
13486
13759
|
}
|
|
13487
13760
|
},
|
|
13488
13761
|
customOpenEvent(evnt) {
|
|
@@ -13493,6 +13766,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13493
13766
|
customStore.btnEl = evnt.target;
|
|
13494
13767
|
$xeTable.openCustom();
|
|
13495
13768
|
$xeTable.emitCustomEvent('open', evnt);
|
|
13769
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
13496
13770
|
}
|
|
13497
13771
|
},
|
|
13498
13772
|
customCloseEvent(evnt) {
|
|
@@ -13502,6 +13776,7 @@ VxeUI.hooks.add('tableCustomModule', {
|
|
|
13502
13776
|
customStore.activeBtn = false;
|
|
13503
13777
|
$xeTable.closeCustom();
|
|
13504
13778
|
$xeTable.emitCustomEvent('close', evnt);
|
|
13779
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
13505
13780
|
}
|
|
13506
13781
|
},
|
|
13507
13782
|
handleUpdateCustomColumn,
|
|
@@ -15748,9 +16023,6 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
15748
16023
|
internalData.currKeyField = keyField;
|
|
15749
16024
|
internalData.isCurrDeepKey = hasDeepKey(keyField);
|
|
15750
16025
|
};
|
|
15751
|
-
const hangleStorageDefaultValue = (value, isAll) => {
|
|
15752
|
-
return XEUtils.isBoolean(value) ? value : isAll;
|
|
15753
|
-
};
|
|
15754
16026
|
const getNextSortOrder = (column) => {
|
|
15755
16027
|
const sortOpts = computeSortOpts.value;
|
|
15756
16028
|
const { orders = [] } = sortOpts;
|
|
@@ -16406,19 +16678,18 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16406
16678
|
const handleCustomRestore = (storeData) => {
|
|
16407
16679
|
const { aggregateConfig, rowGroupConfig } = props;
|
|
16408
16680
|
const { collectColumn } = internalData;
|
|
16409
|
-
const
|
|
16410
|
-
|
|
16411
|
-
const isAllCustom = storage === true;
|
|
16412
|
-
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
16413
|
-
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
16414
|
-
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
16415
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
16416
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
16417
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
16418
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
16419
|
-
let { resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
|
|
16681
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
16682
|
+
let { alignData, headerAlignData, footerAlignData, resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
|
|
16420
16683
|
// 处理还原
|
|
16421
|
-
if ((
|
|
16684
|
+
if ((isCustomAlign && alignData) ||
|
|
16685
|
+
(isCustomHeaderAlign && headerAlignData) ||
|
|
16686
|
+
(isCustomFooterAlign && footerAlignData) ||
|
|
16687
|
+
(isCustomResizable && resizableData) ||
|
|
16688
|
+
(isCustomSort && sortData) ||
|
|
16689
|
+
(isCustomVisible && visibleData) ||
|
|
16690
|
+
(isCustomFixed && fixedData) ||
|
|
16691
|
+
(isCustomAggGroup && aggGroupData) ||
|
|
16692
|
+
(isCustomAggFunc && aggFuncData)) {
|
|
16422
16693
|
const sortColMaps = {};
|
|
16423
16694
|
if (isCustomSort && sortData) {
|
|
16424
16695
|
// 转换兼容老版本数据,即将废弃兼容
|
|
@@ -16501,16 +16772,19 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
16501
16772
|
const { customConfig } = props;
|
|
16502
16773
|
const tableId = computeTableId.value;
|
|
16503
16774
|
const customOpts = computeCustomOpts.value;
|
|
16504
|
-
const { storage, restoreStore
|
|
16505
|
-
const
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16775
|
+
const { storage, restoreStore } = customOpts;
|
|
16776
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
16777
|
+
if (storage &&
|
|
16778
|
+
(customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
|
|
16779
|
+
(isCustomAlign ||
|
|
16780
|
+
isCustomHeaderAlign ||
|
|
16781
|
+
isCustomFooterAlign ||
|
|
16782
|
+
isCustomResizable ||
|
|
16783
|
+
isCustomVisible ||
|
|
16784
|
+
isCustomFixed ||
|
|
16785
|
+
isCustomSort ||
|
|
16786
|
+
isCustomAggGroup ||
|
|
16787
|
+
isCustomAggFunc)) {
|
|
16514
16788
|
if (!tableId) {
|
|
16515
16789
|
errLog$2('vxe.error.reqProp', ['id']);
|
|
16516
16790
|
return;
|
|
@@ -22894,6 +23168,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22894
23168
|
if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
|
|
22895
23169
|
column.visible = column.defaultVisible;
|
|
22896
23170
|
}
|
|
23171
|
+
column.align = column.defaultAlign;
|
|
23172
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
23173
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
22897
23174
|
column.aggFunc = column.defaultAggFunc;
|
|
22898
23175
|
column.renderAggFn = column.defaultAggFunc;
|
|
22899
23176
|
column.renderResizeWidth = column.renderWidth;
|
|
@@ -22935,15 +23212,11 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22935
23212
|
const customOpts = computeCustomOpts.value;
|
|
22936
23213
|
const { isRowGroupStatus, rowGroupList } = reactData;
|
|
22937
23214
|
const { fullColumnFieldData, collectColumn } = internalData;
|
|
22938
|
-
const { storage, checkMethod
|
|
22939
|
-
const
|
|
22940
|
-
const
|
|
22941
|
-
const
|
|
22942
|
-
const
|
|
22943
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
22944
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
22945
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
22946
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
23215
|
+
const { storage, checkMethod } = customOpts;
|
|
23216
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
23217
|
+
const alignData = {};
|
|
23218
|
+
const headerAlignData = {};
|
|
23219
|
+
const footerAlignData = {};
|
|
22947
23220
|
const resizableData = {};
|
|
22948
23221
|
const sortData = [];
|
|
22949
23222
|
const visibleData = {};
|
|
@@ -22951,6 +23224,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22951
23224
|
const aggGroupData = {};
|
|
22952
23225
|
const aggFuncData = {};
|
|
22953
23226
|
const storeData = {
|
|
23227
|
+
alignData: undefined,
|
|
23228
|
+
headerAlignData: undefined,
|
|
23229
|
+
footerAlignData: undefined,
|
|
22954
23230
|
resizableData: undefined,
|
|
22955
23231
|
sortData: undefined,
|
|
22956
23232
|
visibleData: undefined,
|
|
@@ -22964,6 +23240,9 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
22964
23240
|
}
|
|
22965
23241
|
return storeData;
|
|
22966
23242
|
}
|
|
23243
|
+
let hasAlign = 0;
|
|
23244
|
+
let hasHeaderAlign = 0;
|
|
23245
|
+
let hasFooterAlign = 0;
|
|
22967
23246
|
let hasResizable = 0;
|
|
22968
23247
|
let hasSort = 0;
|
|
22969
23248
|
let hasFixed = 0;
|
|
@@ -23004,6 +23283,18 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
23004
23283
|
fixedData[colKey] = column.fixed;
|
|
23005
23284
|
}
|
|
23006
23285
|
}
|
|
23286
|
+
if (isCustomAlign && column.align) {
|
|
23287
|
+
hasAlign = 1;
|
|
23288
|
+
alignData[colKey] = column.align;
|
|
23289
|
+
}
|
|
23290
|
+
if (isCustomHeaderAlign && column.headerAlign) {
|
|
23291
|
+
hasHeaderAlign = 1;
|
|
23292
|
+
headerAlignData[colKey] = column.headerAlign;
|
|
23293
|
+
}
|
|
23294
|
+
if (isCustomFooterAlign && column.footerAlign) {
|
|
23295
|
+
hasFooterAlign = 1;
|
|
23296
|
+
footerAlignData[colKey] = column.footerAlign;
|
|
23297
|
+
}
|
|
23007
23298
|
if (isCustomResizable && column.resizeWidth) {
|
|
23008
23299
|
hasResizable = 1;
|
|
23009
23300
|
resizableData[colKey] = column.renderWidth;
|
|
@@ -23023,6 +23314,15 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
23023
23314
|
aggFuncData[colKey] = column.aggFunc;
|
|
23024
23315
|
}
|
|
23025
23316
|
});
|
|
23317
|
+
if (hasAlign) {
|
|
23318
|
+
storeData.alignData = alignData;
|
|
23319
|
+
}
|
|
23320
|
+
if (hasHeaderAlign) {
|
|
23321
|
+
storeData.headerAlignData = headerAlignData;
|
|
23322
|
+
}
|
|
23323
|
+
if (hasFooterAlign) {
|
|
23324
|
+
storeData.footerAlignData = footerAlignData;
|
|
23325
|
+
}
|
|
23026
23326
|
if (hasResizable) {
|
|
23027
23327
|
storeData.resizableData = resizableData;
|
|
23028
23328
|
}
|
|
@@ -24064,12 +24364,16 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24064
24364
|
// 如果为 null 使用默认逻辑
|
|
24065
24365
|
if (XEUtils.eqNull(customContent)) {
|
|
24066
24366
|
isShow = isOver;
|
|
24367
|
+
content = cellText;
|
|
24067
24368
|
}
|
|
24068
24369
|
else if (customContent !== '' && customContent !== false) {
|
|
24069
24370
|
// 如果为 '' | false 则不显示
|
|
24070
24371
|
isShow = true;
|
|
24372
|
+
content = customContent;
|
|
24373
|
+
}
|
|
24374
|
+
else {
|
|
24375
|
+
content = cellText;
|
|
24071
24376
|
}
|
|
24072
|
-
content = cellText;
|
|
24073
24377
|
}
|
|
24074
24378
|
if (isShow && content) {
|
|
24075
24379
|
const tipContent = formatText(content);
|
|
@@ -24898,26 +25202,32 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
24898
25202
|
const { customConfig } = props;
|
|
24899
25203
|
const tableId = computeTableId.value;
|
|
24900
25204
|
const customOpts = computeCustomOpts.value;
|
|
24901
|
-
const { updateStore, storage
|
|
24902
|
-
const
|
|
24903
|
-
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
24904
|
-
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
24905
|
-
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
24906
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
24907
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
24908
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
24909
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
25205
|
+
const { updateStore, storage } = customOpts;
|
|
25206
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
24910
25207
|
if (type !== 'reset') {
|
|
24911
25208
|
// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
24912
25209
|
reactData.isCustomStatus = true;
|
|
24913
25210
|
}
|
|
24914
|
-
if (storage &&
|
|
25211
|
+
if (storage &&
|
|
25212
|
+
(customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
|
|
25213
|
+
(isCustomAlign ||
|
|
25214
|
+
isCustomHeaderAlign ||
|
|
25215
|
+
isCustomFooterAlign ||
|
|
25216
|
+
isCustomResizable ||
|
|
25217
|
+
isCustomVisible ||
|
|
25218
|
+
isCustomFixed ||
|
|
25219
|
+
isCustomSort ||
|
|
25220
|
+
isCustomAggGroup ||
|
|
25221
|
+
isCustomAggFunc)) {
|
|
24915
25222
|
if (!tableId) {
|
|
24916
25223
|
errLog$2('vxe.error.reqProp', ['id']);
|
|
24917
25224
|
return nextTick();
|
|
24918
25225
|
}
|
|
24919
25226
|
const storeData = type === 'reset'
|
|
24920
25227
|
? {
|
|
25228
|
+
alignData: {},
|
|
25229
|
+
headerAlignData: {},
|
|
25230
|
+
footerAlignData: {},
|
|
24921
25231
|
resizableData: {},
|
|
24922
25232
|
sortData: [],
|
|
24923
25233
|
visibleData: {},
|
|
@@ -32077,10 +32387,16 @@ var zhCN = {
|
|
|
32077
32387
|
colResizable: '列宽(像素)',
|
|
32078
32388
|
colVisible: '是否显示',
|
|
32079
32389
|
colFixed: '冻结列',
|
|
32080
|
-
colFixedMax: '
|
|
32081
|
-
|
|
32082
|
-
|
|
32083
|
-
|
|
32390
|
+
colFixedMax: '冻结列({0})',
|
|
32391
|
+
colAlign: '对齐方式',
|
|
32392
|
+
colHeadAlign: '表头对齐方式',
|
|
32393
|
+
colFootAlign: '表尾对齐方式',
|
|
32394
|
+
fixedLeft: '左',
|
|
32395
|
+
fixedUnset: '无',
|
|
32396
|
+
fixedRight: '右',
|
|
32397
|
+
alignLeft: '左',
|
|
32398
|
+
alignCenter: '中',
|
|
32399
|
+
alignRight: '右',
|
|
32084
32400
|
moveUp: '上移',
|
|
32085
32401
|
moveDn: '下移',
|
|
32086
32402
|
putTop: '置顶',
|
|
@@ -32088,7 +32404,10 @@ var zhCN = {
|
|
|
32088
32404
|
moveUpTitle: '点击向上移动',
|
|
32089
32405
|
moveDnTitle: '点击向下移动',
|
|
32090
32406
|
putTopTitle: '点击置顶',
|
|
32091
|
-
putBottomTitle: '点击置尾'
|
|
32407
|
+
putBottomTitle: '点击置尾',
|
|
32408
|
+
anLeftTitle: '左对齐',
|
|
32409
|
+
anCenterTitle: '居中',
|
|
32410
|
+
anRightTitle: '右对齐'
|
|
32092
32411
|
}
|
|
32093
32412
|
},
|
|
32094
32413
|
import: {
|
|
@@ -32189,6 +32508,10 @@ var zhCN = {
|
|
|
32189
32508
|
fixedRight: '冻结在右侧',
|
|
32190
32509
|
cancelFixed: '取消冻结列'
|
|
32191
32510
|
},
|
|
32511
|
+
iconPicker: {
|
|
32512
|
+
search: '搜索',
|
|
32513
|
+
emptyText: '暂无数据'
|
|
32514
|
+
},
|
|
32192
32515
|
datePicker: {
|
|
32193
32516
|
yearTitle: '{0} 年'
|
|
32194
32517
|
},
|