vxe-table 3.21.22 → 3.21.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/es/{iconfont.1782890276645.ttf → iconfont.1783046294821.ttf} +0 -0
- package/es/iconfont.1783046294821.woff +0 -0
- package/es/iconfont.1783046294821.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +12 -3
- package/es/locale/lang/de-DE.js +12 -3
- package/es/locale/lang/en-US.js +16 -7
- package/es/locale/lang/es-ES.js +12 -3
- package/es/locale/lang/fr-FR.js +12 -3
- package/es/locale/lang/hu-HU.js +12 -3
- package/es/locale/lang/hy-AM.js +12 -3
- package/es/locale/lang/id-ID.js +12 -3
- package/es/locale/lang/it-IT.js +11 -2
- package/es/locale/lang/ja-JP.js +12 -3
- package/es/locale/lang/ko-KR.js +12 -3
- package/es/locale/lang/ms-MY.js +12 -3
- package/es/locale/lang/nb-NO.js +12 -3
- package/es/locale/lang/pt-BR.js +12 -3
- package/es/locale/lang/ru-RU.js +12 -3
- package/es/locale/lang/th-TH.js +12 -3
- package/es/locale/lang/ug-CN.js +12 -3
- package/es/locale/lang/uk-UA.js +12 -3
- package/es/locale/lang/uz-UZ.js +12 -3
- package/es/locale/lang/vi-VN.js +11 -2
- package/es/locale/lang/zh-CHT.js +14 -5
- package/es/locale/lang/zh-CN.js +14 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +84 -13
- package/es/table/module/custom/panel.js +485 -312
- package/es/table/src/columnInfo.js +13 -7
- package/es/table/src/methods.js +100 -59
- package/es/table/src/util.js +31 -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.1782890276645.ttf → iconfont.1783046294821.ttf} +0 -0
- package/lib/iconfont.1783046294821.woff +0 -0
- package/lib/iconfont.1783046294821.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +557 -194
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +12 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +12 -3
- package/lib/locale/lang/de-DE.js +12 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +12 -3
- package/lib/locale/lang/en-US.js +16 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +16 -7
- package/lib/locale/lang/es-ES.js +12 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +12 -3
- package/lib/locale/lang/fr-FR.js +12 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +12 -3
- package/lib/locale/lang/hu-HU.js +12 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +12 -3
- package/lib/locale/lang/hy-AM.js +12 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +12 -3
- package/lib/locale/lang/id-ID.js +12 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +12 -3
- package/lib/locale/lang/it-IT.js +11 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +11 -2
- package/lib/locale/lang/ja-JP.js +12 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +12 -3
- package/lib/locale/lang/ko-KR.js +12 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +12 -3
- package/lib/locale/lang/ms-MY.js +12 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +12 -3
- package/lib/locale/lang/nb-NO.js +12 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +12 -3
- package/lib/locale/lang/pt-BR.js +12 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +12 -3
- package/lib/locale/lang/ru-RU.js +12 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +12 -3
- package/lib/locale/lang/th-TH.js +12 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +12 -3
- package/lib/locale/lang/ug-CN.js +12 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +12 -3
- package/lib/locale/lang/uk-UA.js +12 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +12 -3
- package/lib/locale/lang/uz-UZ.js +12 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +12 -3
- package/lib/locale/lang/vi-VN.js +11 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +11 -2
- package/lib/locale/lang/zh-CHT.js +14 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +14 -5
- package/lib/locale/lang/zh-CN.js +14 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +14 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +91 -11
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +376 -158
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/columnInfo.js +16 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +9 -8
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +35 -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 +12 -3
- package/packages/locale/lang/de-DE.ts +12 -3
- package/packages/locale/lang/en-US.ts +16 -7
- package/packages/locale/lang/es-ES.ts +12 -3
- package/packages/locale/lang/fr-FR.ts +12 -3
- package/packages/locale/lang/hu-HU.ts +12 -3
- package/packages/locale/lang/hy-AM.ts +12 -3
- package/packages/locale/lang/id-ID.ts +12 -3
- package/packages/locale/lang/it-IT.ts +11 -2
- package/packages/locale/lang/ja-JP.ts +12 -3
- package/packages/locale/lang/ko-KR.ts +12 -3
- package/packages/locale/lang/ms-MY.ts +12 -3
- package/packages/locale/lang/nb-NO.ts +12 -3
- package/packages/locale/lang/pt-BR.ts +12 -3
- package/packages/locale/lang/ru-RU.ts +12 -3
- package/packages/locale/lang/th-TH.ts +12 -3
- package/packages/locale/lang/ug-CN.ts +12 -3
- package/packages/locale/lang/uk-UA.ts +12 -3
- package/packages/locale/lang/uz-UZ.ts +12 -3
- package/packages/locale/lang/vi-VN.ts +11 -2
- package/packages/locale/lang/zh-CHT.ts +14 -5
- package/packages/locale/lang/zh-CN.ts +14 -5
- package/packages/table/module/custom/mixin.ts +85 -14
- package/packages/table/module/custom/panel.ts +538 -307
- package/packages/table/src/columnInfo.ts +13 -7
- package/packages/table/src/methods.ts +116 -60
- package/packages/table/src/util.ts +34 -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 +11 -0
- package/es/iconfont.1782890276645.woff +0 -0
- package/es/iconfont.1782890276645.woff2 +0 -0
- package/lib/iconfont.1782890276645.woff +0 -0
- package/lib/iconfont.1782890276645.woff2 +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.23";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -3423,6 +3423,7 @@ core_.VxeUI.setConfig({
|
|
|
3423
3423
|
allowResizable: true,
|
|
3424
3424
|
allowFixed: true,
|
|
3425
3425
|
allowSort: true,
|
|
3426
|
+
allowAlign: true,
|
|
3426
3427
|
showSortDragButton: true,
|
|
3427
3428
|
showFooter: true,
|
|
3428
3429
|
placement: 'top-right',
|
|
@@ -3431,9 +3432,11 @@ core_.VxeUI.setConfig({
|
|
|
3431
3432
|
visible: true,
|
|
3432
3433
|
resizable: true,
|
|
3433
3434
|
sort: true,
|
|
3434
|
-
fixed: true
|
|
3435
|
-
|
|
3436
|
-
|
|
3435
|
+
fixed: true,
|
|
3436
|
+
align: true,
|
|
3437
|
+
headerAlign: true,
|
|
3438
|
+
footerAlign: true,
|
|
3439
|
+
aggFunc: true
|
|
3437
3440
|
},
|
|
3438
3441
|
// autoAggGroupValues: false,
|
|
3439
3442
|
// checkMethod () {},
|
|
@@ -3656,6 +3659,15 @@ core_.VxeUI.setIcon({
|
|
|
3656
3659
|
TABLE_RADIO_UNCHECKED: iconPrefix + 'radio-unchecked',
|
|
3657
3660
|
TABLE_RADIO_DISABLED_UNCHECKED: iconPrefix + 'radio-unchecked-fill',
|
|
3658
3661
|
TABLE_CUSTOM_SORT: iconPrefix + 'drag-handle',
|
|
3662
|
+
TABLE_CUSTOM_FIXED_LEFT: iconPrefix + 'fixed-left',
|
|
3663
|
+
TABLE_CUSTOM_FIXED_RIGHT: iconPrefix + 'fixed-right',
|
|
3664
|
+
TABLE_CUSTOM_ALIGN_LEFT: iconPrefix + 'align-left',
|
|
3665
|
+
TABLE_CUSTOM_ALIGN_CENTER: iconPrefix + 'align-center',
|
|
3666
|
+
TABLE_CUSTOM_ALIGN_RIGHT: iconPrefix + 'align-right',
|
|
3667
|
+
TABLE_CUSTOM_MOVE_UP: iconPrefix + 'arrows-up',
|
|
3668
|
+
TABLE_CUSTOM_MOVE_DN: iconPrefix + 'arrows-down',
|
|
3669
|
+
TABLE_CUSTOM_PUT_TOP: iconPrefix + 'top',
|
|
3670
|
+
TABLE_CUSTOM_PUT_BOTTOM: iconPrefix + 'bottom',
|
|
3659
3671
|
TABLE_MENU_OPTIONS: iconPrefix + 'arrow-right',
|
|
3660
3672
|
TABLE_MENU_OPTION_LOADING: iconPrefix + 'repeat roll',
|
|
3661
3673
|
TABLE_DRAG_ROW: iconPrefix + 'drag-handle',
|
|
@@ -4074,7 +4086,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
4074
4086
|
const {
|
|
4075
4087
|
log: log_log
|
|
4076
4088
|
} = core_.VxeUI;
|
|
4077
|
-
const tableVersion = `table v${"3.21.
|
|
4089
|
+
const tableVersion = `table v${"3.21.23"}`;
|
|
4078
4090
|
function createComponentLog(name) {
|
|
4079
4091
|
const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
|
|
4080
4092
|
const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
|
|
@@ -4120,6 +4132,10 @@ class ColumnInfo {
|
|
|
4120
4132
|
field,
|
|
4121
4133
|
width,
|
|
4122
4134
|
visible,
|
|
4135
|
+
fixed,
|
|
4136
|
+
align,
|
|
4137
|
+
headerAlign,
|
|
4138
|
+
footerAlign,
|
|
4123
4139
|
aggFunc,
|
|
4124
4140
|
formatter,
|
|
4125
4141
|
filterMultiple,
|
|
@@ -4196,10 +4212,10 @@ class ColumnInfo {
|
|
|
4196
4212
|
minWidth: colConfs.minWidth,
|
|
4197
4213
|
maxWidth: colConfs.maxWidth,
|
|
4198
4214
|
resizable: colConfs.resizable,
|
|
4199
|
-
fixed
|
|
4200
|
-
align
|
|
4201
|
-
headerAlign
|
|
4202
|
-
footerAlign
|
|
4215
|
+
fixed,
|
|
4216
|
+
align,
|
|
4217
|
+
headerAlign,
|
|
4218
|
+
footerAlign,
|
|
4203
4219
|
showOverflow: colConfs.showOverflow,
|
|
4204
4220
|
showHeaderOverflow: colConfs.showHeaderOverflow,
|
|
4205
4221
|
showFooterOverflow: colConfs.showFooterOverflow,
|
|
@@ -4240,7 +4256,7 @@ class ColumnInfo {
|
|
|
4240
4256
|
titleHelp: colConfs.titleHelp,
|
|
4241
4257
|
titlePrefix: colConfs.titlePrefix,
|
|
4242
4258
|
titleSuffix: colConfs.titleSuffix,
|
|
4243
|
-
aggFunc
|
|
4259
|
+
aggFunc,
|
|
4244
4260
|
copyMethod: colConfs.copyMethod,
|
|
4245
4261
|
cutMethod: colConfs.cutMethod,
|
|
4246
4262
|
pasteMethod: colConfs.pasteMethod,
|
|
@@ -4254,7 +4270,10 @@ class ColumnInfo {
|
|
|
4254
4270
|
defaultParentId: null,
|
|
4255
4271
|
halfVisible: false,
|
|
4256
4272
|
defaultVisible: defaultVisible,
|
|
4257
|
-
defaultFixed:
|
|
4273
|
+
defaultFixed: fixed,
|
|
4274
|
+
defaultAlign: align,
|
|
4275
|
+
defaultHeaderAlign: headerAlign,
|
|
4276
|
+
defaultFooterAlign: footerAlign,
|
|
4258
4277
|
defaultAggFunc: colConfs.aggFunc,
|
|
4259
4278
|
checked: false,
|
|
4260
4279
|
halfChecked: false,
|
|
@@ -4278,6 +4297,9 @@ class ColumnInfo {
|
|
|
4278
4297
|
renderAggFn: '',
|
|
4279
4298
|
renderAggDigits: null,
|
|
4280
4299
|
renderAggFormat: null,
|
|
4300
|
+
renderAlign: '',
|
|
4301
|
+
renderHeaderAlign: '',
|
|
4302
|
+
renderFooterAlign: '',
|
|
4281
4303
|
renderFixed: '',
|
|
4282
4304
|
renderVisible: false,
|
|
4283
4305
|
renderWidth: defaultRenderWidth,
|
|
@@ -4566,7 +4588,8 @@ function createReactData() {
|
|
|
4566
4588
|
activeWrapper: false,
|
|
4567
4589
|
visible: false,
|
|
4568
4590
|
maxHeight: null,
|
|
4569
|
-
|
|
4591
|
+
defPopupStyle: {},
|
|
4592
|
+
panePopupStyle: {},
|
|
4570
4593
|
oldSortMaps: {},
|
|
4571
4594
|
oldFixedMaps: {},
|
|
4572
4595
|
oldVisibleMaps: {}
|
|
@@ -5417,6 +5440,38 @@ function colToVisible($xeTable, isForce, column, row) {
|
|
|
5417
5440
|
}
|
|
5418
5441
|
return Promise.resolve();
|
|
5419
5442
|
}
|
|
5443
|
+
function hangleBolleanDefaultValue(currVal, defVal) {
|
|
5444
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(currVal) ? currVal : defVal;
|
|
5445
|
+
}
|
|
5446
|
+
function handleCustomStoreConfig($xeTable) {
|
|
5447
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
5448
|
+
const {
|
|
5449
|
+
storage,
|
|
5450
|
+
storeOptions
|
|
5451
|
+
} = customOpts;
|
|
5452
|
+
const isAllCustom = storage === true;
|
|
5453
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
5454
|
+
const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
|
|
5455
|
+
const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
|
|
5456
|
+
const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
|
|
5457
|
+
const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
|
|
5458
|
+
const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
|
|
5459
|
+
const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
|
|
5460
|
+
const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
|
|
5461
|
+
const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
5462
|
+
const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
5463
|
+
return {
|
|
5464
|
+
isCustomAlign,
|
|
5465
|
+
isCustomHeaderAlign,
|
|
5466
|
+
isCustomFooterAlign,
|
|
5467
|
+
isCustomResizable,
|
|
5468
|
+
isCustomVisible,
|
|
5469
|
+
isCustomFixed,
|
|
5470
|
+
isCustomSort,
|
|
5471
|
+
isCustomAggGroup,
|
|
5472
|
+
isCustomAggFunc
|
|
5473
|
+
};
|
|
5474
|
+
}
|
|
5420
5475
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js
|
|
5421
5476
|
var es_iterator_every = __webpack_require__(1148);
|
|
5422
5477
|
;// ./packages/ui/src/vn.ts
|
|
@@ -7726,13 +7781,13 @@ function getCrossTableDragRowInfo($xeTable) {
|
|
|
7726
7781
|
return crossTableDragRowInfo;
|
|
7727
7782
|
}
|
|
7728
7783
|
;// ./packages/table/src/methods.ts
|
|
7729
|
-
const{warnLog: methods_warnLog,errLog: methods_errLog}=createComponentLog('table');const{getConfig: methods_getConfig,getI18n: methods_getI18n,renderer: methods_renderer,formats: methods_formats,interceptor: methods_interceptor,createEvent,globalEvents: methods_globalEvents,GLOBAL_EVENT_KEYS}=core_.VxeUI;const supportMaxRow=5e6;const customStorageKey='VXE_CUSTOM_STORE';const maxYHeight=5e6;const maxXWidth=5e6;const sourceType='table';let crossTableDragRowObj=null;function eqCellValue(newRow,oldRow,field){const val1=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(newRow,field);const val2=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oldRow,field);let result=false;if(eqEmptyValue(val1)&&eqEmptyValue(val2)){result=true;}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val1)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val1)){result=''+val1===''+val2;}else{result=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1,val2);}return{newValue:val1,oldValue:val2,result};}function
|
|
7730
|
-
if(isCustomResizable&&resizableData||isCustomSort&&sortData||isCustomVisible&&visibleData||isCustomFixed&&fixedData||isCustomAggGroup&&aggGroupData||isCustomAggFunc&&aggFuncData){const sortColMaps={};if(isCustomSort&&sortData){// 转换兼容老版本数据,即将废弃兼容
|
|
7784
|
+
const{warnLog: methods_warnLog,errLog: methods_errLog}=createComponentLog('table');const{getConfig: methods_getConfig,getI18n: methods_getI18n,renderer: methods_renderer,formats: methods_formats,interceptor: methods_interceptor,createEvent,globalEvents: methods_globalEvents,GLOBAL_EVENT_KEYS}=core_.VxeUI;const supportMaxRow=5e6;const customStorageKey='VXE_CUSTOM_STORE';const maxYHeight=5e6;const maxXWidth=5e6;const sourceType='table';let crossTableDragRowObj=null;function eqCellValue(newRow,oldRow,field){const val1=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(newRow,field);const val2=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oldRow,field);let result=false;if(eqEmptyValue(val1)&&eqEmptyValue(val2)){result=true;}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val1)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val1)){result=''+val1===''+val2;}else{result=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1,val2);}return{newValue:val1,oldValue:val2,result};}function getNextSortOrder($xeTable,column){const sortOpts=$xeTable.computeSortOpts;const{orders=[]}=sortOpts;const currOrder=column.order||null;const oIndex=orders.indexOf(currOrder)+1;return orders[oIndex<orders.length?oIndex:0];}const getCustomStorageMap=id=>{const version=methods_getConfig().version;const rest=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(customStorageKey)||'');const maps=rest&&rest._v===version?rest:{_v:version};return(id?maps[id]:maps)||{};};const setCustomStorageMap=(id,data)=>{const version=methods_getConfig().version;const maps=getCustomStorageMap();maps[id]=data||undefined;maps._v=version;localStorage.setItem(customStorageKey,external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(maps));};const getRecoverRowMaps=($xeTable,keyMaps)=>{const internalData=$xeTable;const{fullAllDataRowIdData}=internalData;const restKeys={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(keyMaps,(row,rowid)=>{if(fullAllDataRowIdData[rowid]){restKeys[rowid]=row;}});return restKeys;};function handleReserveRow($xeTable,reserveRowMap){const internalData=$xeTable;const{fullDataRowIdData}=internalData;const reserveList=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(reserveRowMap,(item,rowid)=>{if(fullDataRowIdData[rowid]&&reserveList.indexOf(fullDataRowIdData[rowid].row)===-1){reserveList.push(fullDataRowIdData[rowid].row);}});return reserveList;}function handleVirtualXVisible($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{isScrollXBig,scrollXWidth}=reactData;const{elemStore,visibleColumn,fullColumnIdData}=internalData;const leftFixedWidth=$xeTable.computeLeftFixedWidth;const rightFixedWidth=$xeTable.computeRightFixedWidth;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){const clientWidth=bodyScrollElem.clientWidth;let scrollLeft=bodyScrollElem.scrollLeft;if(isScrollXBig){scrollLeft=Math.ceil((scrollXWidth-clientWidth)*Math.min(1,scrollLeft/(maxXWidth-clientWidth)));}const startLeft=scrollLeft+leftFixedWidth;const endLeft=scrollLeft+clientWidth-rightFixedWidth;let leftIndex=0;let rightIndex=visibleColumn.length;while(leftIndex<rightIndex){const cIndex=Math.floor((leftIndex+rightIndex)/2);const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};if(colRest.oLeft<=startLeft){leftIndex=cIndex+1;}else{rightIndex=cIndex;}}let visibleSize=0;const toVisibleIndex=leftIndex===visibleColumn.length?leftIndex:Math.max(0,leftIndex<visibleColumn.length?leftIndex-2:0);for(let cIndex=toVisibleIndex,cLen=visibleColumn.length;cIndex<cLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};visibleSize++;if(colRest.oLeft>endLeft||visibleSize>=60){break;}}return{toVisibleIndex:Math.max(0,toVisibleIndex),visibleSize:Math.max(6,visibleSize)};}return{toVisibleIndex:0,visibleSize:6};}function handleCustomRestore($xeTable,storeData){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const{collectColumn}=internalData;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);let{alignData,headerAlignData,footerAlignData,resizableData,sortData,visibleData,fixedData,aggGroupData,aggFuncData}=storeData;// 处理还原
|
|
7785
|
+
if(isCustomAlign&&alignData||isCustomHeaderAlign&&headerAlignData||isCustomFooterAlign&&footerAlignData||isCustomResizable&&resizableData||isCustomSort&&sortData||isCustomVisible&&visibleData||isCustomFixed&&fixedData||isCustomAggGroup&&aggGroupData||isCustomAggFunc&&aggFuncData){const sortColMaps={};if(isCustomSort&&sortData){// 转换兼容老版本数据,即将废弃兼容
|
|
7731
7786
|
if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortData)){const sortRests=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(sortData,(index,colKey)=>{sortRests.push({key:colKey,index});});sortData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(sortRests,{field:'index',order:'asc'}).map(item=>({k:item.key}));}let colNum=1;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sortData,(sObj,index,sOjs,path,pSObj)=>{sortColMaps[sObj.k]={key:sObj.k,sNum:colNum++,pKey:pSObj?pSObj.k:null};},{children:'c'});}const colKeyMaps={};const allCols=[];const aggGroupConfs=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();// 支持一级
|
|
7732
7787
|
if(!parentColumn){if(isCustomFixed&&fixedData&&fixedData[colKey]!==undefined){column.fixed=fixedData[colKey];}}if(isCustomResizable&&resizableData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizableData[colKey])){column.resizeWidth=resizableData[colKey];}if(isCustomVisible&&visibleData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visibleData[colKey])){column.visible=visibleData[colKey];}if(isCustomAggFunc&&aggFuncData&&(aggregateConfig||rowGroupConfig)&&aggFuncData[colKey]){column.aggFunc=aggFuncData[colKey];}if(isCustomAggGroup&&aggGroupData&&aggGroupData[colKey]){aggGroupConfs.push({field:column.field});}colKeyMaps[colKey]=column;allCols.push(column);});if((aggregateConfig||rowGroupConfig)&&aggGroupConfs.length){const groupRest=handleGroupData($xeTable,internalData.tableFullData,aggGroupConfs);internalData.tableFullTreeData=[];internalData.tableFullGroupData=groupRest.treeData;reactData.isRowGroupStatus=true;reactData.rowGroupList=aggGroupConfs;$xeTable.cacheRowMap(false);}// 如果自定义了顺序
|
|
7733
7788
|
if(isCustomSort&&sortData){allCols.forEach(column=>{const colKey=column.getKey();const scItem=sortColMaps[colKey];if(scItem){const parentColumn=scItem.pKey?colKeyMaps[scItem.pKey]:null;column.parentId=parentColumn?parentColumn.id:null;column.renderSortNumber=scItem.sNum;}});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;}reactData.isCustomStatus=true;}else{reactData.isCustomStatus=false;}}/**
|
|
7734
7789
|
* 还原自定义列操作状态
|
|
7735
|
-
*/function restoreCustomStorage($xeTable){const props=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{storage,restoreStore
|
|
7790
|
+
*/function restoreCustomStorage($xeTable){const props=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{storage,restoreStore}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomAlign||isCustomHeaderAlign||isCustomFooterAlign||isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){methods_errLog('vxe.error.reqProp',['id']);return;}const storeData=getCustomStorageMap(tableId);if(restoreStore){return Promise.resolve(restoreStore({$table:$xeTable,id:tableId,type:'restore',storeData})).then(storeData=>{if(!storeData){return;}return handleCustomRestore($xeTable,storeData);}).catch(e=>e);}else{return handleCustomRestore($xeTable,storeData);}}}/**
|
|
7736
7791
|
* 更新数据列的 Map
|
|
7737
7792
|
* 牺牲数据组装的耗时,用来换取使用过程中的流畅
|
|
7738
7793
|
*/function cacheColumnMap($xeTable){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{treeConfig,showOverflow}=props;const{tableFullColumn,collectColumn}=internalData;const fullColIdData=internalData.fullColumnIdData={};const fullColFieldData=internalData.fullColumnFieldData={};const mouseOpts=$xeTable.computeMouseOpts;const expandOpts=$xeTable.computeExpandOpts;const columnOpts=$xeTable.computeColumnOpts;const columnDragOpts=$xeTable.computeColumnDragOpts;const virtualYOpts=$xeTable.computeVirtualYOpts;const{isCrossDrag,isSelfToChildDrag}=columnDragOpts;const customOpts=$xeTable.computeCustomOpts;const treeOpts=$xeTable.computeTreeOpts;const{storage}=customOpts;const rowOpts=$xeTable.computeRowOpts;const isGroup=collectColumn.some(hasChildrenList);let isAllOverflow=!!showOverflow;let rowGroupColumn;let expandColumn;let treeNodeColumn;let checkboxColumn;let radioColumn;let htmlColumn;let hasFixed;const handleFunc=(column,index,items,path,parentColumn)=>{const{id:colid,field,fixed,type,treeNode,rowGroupNode}=column;const rest={$index:-1,_index:-1,column,colid,index,items,parent:parentColumn||null,width:0,oLeft:0};if(field){if(fullColFieldData[field]){methods_errLog('vxe.error.colRepet',['field',field]);}fullColFieldData[field]=rest;}else{if(storage&&!type){methods_errLog('vxe.error.reqSupportProp',['storage',`[${type?`type=${type}`:`title=${column.getTitle()}`}]field=?`]);}if(columnOpts.drag&&(isCrossDrag||isSelfToChildDrag)){methods_errLog('vxe.error.reqSupportProp',['column-drag-config.isCrossDrag | column-drag-config.isSelfToChildDrag',`${column.getTitle()||type||''} -> field=?`]);}}if(!hasFixed&&fixed){hasFixed=fixed;}if(!htmlColumn&&type==='html'){htmlColumn=column;}if(treeNode){if(treeNodeColumn){methods_warnLog('vxe.error.colRepet',['tree-node',treeNode]);}if(!treeNodeColumn){treeNodeColumn=column;}}if(rowGroupNode){if(treeNodeColumn){methods_warnLog('vxe.error.colRepet',['row-group-node',rowGroupNode]);}if(!rowGroupColumn){rowGroupColumn=column;}}if(type==='expand'){if(expandColumn){methods_warnLog('vxe.error.colRepet',['type',type]);}if(!expandColumn){expandColumn=column;}}if(type==='checkbox'){if(checkboxColumn){methods_warnLog('vxe.error.colRepet',['type',type]);}if(!checkboxColumn){checkboxColumn=column;}}else if(type==='radio'){if(radioColumn){methods_warnLog('vxe.error.colRepet',['type',type]);}if(!radioColumn){radioColumn=column;}}if(isAllOverflow&&column.showOverflow===false){isAllOverflow=false;}if(fullColIdData[colid]){methods_errLog('vxe.error.colRepet',['colId',colid]);}fullColIdData[colid]=rest;};if(isGroup){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn,nodes)=>{column.level=nodes.length;handleFunc(column,index,items,path,parentColumn);});}else{tableFullColumn.forEach(handleFunc);}if(expandColumn){if(expandOpts.mode!=='fixed'&&virtualYOpts.enabled){methods_warnLog('vxe.error.notConflictProp',['column.type="expand','virtual-y-config.enabled=false']);}if(expandOpts.mode!=='fixed'&&mouseOpts.area){methods_errLog('vxe.error.errConflicts',['mouse-config.area','column.type=expand']);}if(expandOpts.mode!=='inside'&&treeConfig&&!treeOpts.transform){methods_errLog('vxe.error.notConflictProp',['tree-config.transform=false','expand-config.mode=inside']);}// if (props.spanMethod) {
|
|
@@ -8177,20 +8232,21 @@ if(!targetColumn.fixed&&isMaxFixedColumn){if(core_.VxeUI.modal){core_.VxeUI.moda
|
|
|
8177
8232
|
* @private
|
|
8178
8233
|
*/handleCustom(){const $xeTable=this;const props=$xeTable;const{mouseConfig}=props;if(mouseConfig){if($xeTable.clearSelected){$xeTable.clearSelected();}if($xeTable.clearCellAreas){$xeTable.clearCellAreas();$xeTable.clearCopyCellArea();}}$xeTable.analyColumnWidth();return $xeTable.refreshColumn(true);},/**
|
|
8179
8234
|
* 还原自定义列操作状态
|
|
8180
|
-
*/restoreCustomStorage(){const $xeTable=this;const props=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{storage,restoreStore
|
|
8235
|
+
*/restoreCustomStorage(){const $xeTable=this;const props=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{storage,restoreStore}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomAlign||isCustomHeaderAlign||isCustomFooterAlign||isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){methods_errLog('vxe.error.reqProp',['id']);return;}const storeData=getCustomStorageMap(tableId);if(restoreStore){return Promise.resolve(restoreStore({$table:$xeTable,id:tableId,type:'restore',storeData})).then(storeData=>{if(!storeData){return;}return handleCustomRestore($xeTable,storeData);}).catch(e=>e);}else{return handleCustomRestore($xeTable,storeData);}}},/**
|
|
8181
8236
|
* 用于 custom-config,用于手动恢复自定义列设置信息,恢复表格重置为初始状态
|
|
8182
8237
|
* @param storeData
|
|
8183
8238
|
* @returns
|
|
8184
8239
|
*/setCustomStoreData(storeData){const $xeTable=this;const reactData=$xeTable;const internalData=$xeTable;if(!storeData){return $xeTable.$nextTick();}const customOpts=$xeTable.computeCustomOpts;const{checkMethod}=customOpts;// 重置状态
|
|
8185
8240
|
clearTableAllStatus($xeTable);// 恢复列
|
|
8186
|
-
const allCols=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.collectColumn,column=>{column.resizeWidth=0;column.fixed=column.defaultFixed;column.renderSortNumber=column.sortNumber;column.parentId=column.defaultParentId;if(!checkMethod||checkMethod({$table:$xeTable,column})){column.visible=column.defaultVisible;}column.aggFunc=column.defaultAggFunc;column.renderAggFn=column.defaultAggFunc;column.renderResizeWidth=column.renderWidth;allCols.push(column);});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy($xeTable);return Promise.resolve(handleCustomRestore($xeTable,storeData)).then(()=>{return buildColumnInfo($xeTable);}).then(()=>{// 恢复数据聚合分组
|
|
8241
|
+
const allCols=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(internalData.collectColumn,column=>{column.resizeWidth=0;column.fixed=column.defaultFixed;column.renderSortNumber=column.sortNumber;column.parentId=column.defaultParentId;if(!checkMethod||checkMethod({$table:$xeTable,column})){column.visible=column.defaultVisible;}column.align=column.defaultAlign;column.headerAlign=column.defaultHeaderAlign;column.footerAlign=column.defaultFooterAlign;column.aggFunc=column.defaultAggFunc;column.renderAggFn=column.defaultAggFunc;column.renderResizeWidth=column.renderWidth;allCols.push(column);});const newCollectCols=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toArrayTree(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(allCols,'renderSortNumber'),{key:'id',parentKey:'parentId',children:'children'});internalData.collectColumn=newCollectCols;internalData.tableFullColumn=getColumnList(newCollectCols);reactData.updateColFlag++;reactData.isColLoading=true;initColumnHierarchy($xeTable);return Promise.resolve(handleCustomRestore($xeTable,storeData)).then(()=>{return buildColumnInfo($xeTable);}).then(()=>{// 恢复数据聚合分组
|
|
8187
8242
|
const{isRowGroupStatus,rowGroupList}=reactData;if(isRowGroupStatus&&!!$xeTable.handlePivotTableAggData){const rowGroupFields=$xeTable.computeRowGroupFields;if(rowGroupFields?rowGroupFields.length:rowGroupList.length){if(rowGroupFields&&rowGroupFields.length){$xeTable.setRowGroups(rowGroupFields);}else{$xeTable.clearRowGroups();}}else{$xeTable.handleUpdateAggData();}}});},/**
|
|
8188
8243
|
* 用于 custom-config,用于获取自定义列设置信息,用于自定义保持
|
|
8189
8244
|
* @returns
|
|
8190
|
-
*/getCustomStoreData(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{id}=props;const customOpts=$xeTable.computeCustomOpts;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod
|
|
8191
|
-
if(isCustomFixed&&(column.fixed||'')!==(column.defaultFixed||'')){hasFixed=1;fixedData[colKey]=column.fixed;}}if(isCustomResizable&&column.resizeWidth){hasResizable=1;resizableData[colKey]=column.renderWidth;}if(isCustomVisible&&(!checkMethod||checkMethod({$table:$xeTable,column}))){if(!column.visible&&column.defaultVisible){hasVisible=1;visibleData[colKey]=false;}else if(column.visible&&!column.defaultVisible){hasVisible=1;visibleData[colKey]=true;}}if(isCustomAggFunc&&(column.aggFunc||'')!==(column.defaultAggFunc||'')){hasAggFunc=1;aggFuncData[colKey]=column.aggFunc;}});if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}if(isCustomAggGroup&&isRowGroupStatus){rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){aggGroupData[colRest.column.getKey()]=true;}});storeData.aggGroupData=aggGroupData;}if(hasAggFunc){storeData.aggFuncData=aggFuncData;}return storeData;},/**
|
|
8245
|
+
*/getCustomStoreData(){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{id}=props;const customOpts=$xeTable.computeCustomOpts;const{isRowGroupStatus,rowGroupList}=reactData;const{fullColumnFieldData,collectColumn}=internalData;const{storage,checkMethod}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);const alignData={};const headerAlignData={};const footerAlignData={};const resizableData={};const sortData=[];const visibleData={};const fixedData={};const aggGroupData={};const aggFuncData={};const storeData={alignData:undefined,headerAlignData:undefined,footerAlignData:undefined,resizableData:undefined,sortData:undefined,visibleData:undefined,fixedData:undefined,aggGroupData:undefined,aggFuncData:undefined};if(!id){if(storage){methods_errLog('vxe.error.reqProp',['id']);}return storeData;}let hasAlign=0;let hasHeaderAlign=0;let hasFooterAlign=0;let hasResizable=0;let hasSort=0;let hasFixed=0;let hasVisible=0;let hasAggFunc=0;const sortMaps={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();if(!colKey){methods_errLog('vxe.error.reqProp',[`${column.getTitle()||column.type||''} -> column.field=?`]);return;}if(parentColumn){if(isCustomSort){const pColKey=parentColumn.getKey();const psObj=sortMaps[pColKey];hasSort=1;if(psObj){const sObj={k:colKey};sortMaps[colKey]=sObj;if(!psObj.c){psObj.c=[];}psObj.c.push(sObj);}}}else{if(isCustomSort){hasSort=1;const sObj={k:colKey};sortMaps[colKey]=sObj;sortData.push(sObj);}// 只支持一级
|
|
8246
|
+
if(isCustomFixed&&(column.fixed||'')!==(column.defaultFixed||'')){hasFixed=1;fixedData[colKey]=column.fixed;}}if(isCustomAlign&&column.align){hasAlign=1;alignData[colKey]=column.align;}if(isCustomHeaderAlign&&column.headerAlign){hasHeaderAlign=1;headerAlignData[colKey]=column.headerAlign;}if(isCustomFooterAlign&&column.footerAlign){hasFooterAlign=1;footerAlignData[colKey]=column.footerAlign;}if(isCustomResizable&&column.resizeWidth){hasResizable=1;resizableData[colKey]=column.renderWidth;}if(isCustomVisible&&(!checkMethod||checkMethod({$table:$xeTable,column}))){if(!column.visible&&column.defaultVisible){hasVisible=1;visibleData[colKey]=false;}else if(column.visible&&!column.defaultVisible){hasVisible=1;visibleData[colKey]=true;}}if(isCustomAggFunc&&(column.aggFunc||'')!==(column.defaultAggFunc||'')){hasAggFunc=1;aggFuncData[colKey]=column.aggFunc;}});if(hasAlign){storeData.alignData=alignData;}if(hasHeaderAlign){storeData.headerAlignData=headerAlignData;}if(hasFooterAlign){storeData.footerAlignData=footerAlignData;}if(hasResizable){storeData.resizableData=resizableData;}if(hasSort){storeData.sortData=sortData;}if(hasFixed){storeData.fixedData=fixedData;}if(hasVisible){storeData.visibleData=visibleData;}if(isCustomAggGroup&&isRowGroupStatus){rowGroupList.forEach(aggConf=>{const colRest=fullColumnFieldData[aggConf.field];if(colRest){aggGroupData[colRest.column.getKey()]=true;}});storeData.aggGroupData=aggGroupData;}if(hasAggFunc){storeData.aggFuncData=aggFuncData;}return storeData;},/**
|
|
8192
8247
|
* @private
|
|
8193
|
-
*/saveCustomStore(type){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{updateStore,storage
|
|
8248
|
+
*/saveCustomStore(type){const $xeTable=this;const props=$xeTable;const reactData=$xeTable;const{customConfig}=props;const tableId=$xeTable.computeTableId;const customOpts=$xeTable.computeCustomOpts;const{updateStore,storage}=customOpts;const{isCustomAlign,isCustomHeaderAlign,isCustomFooterAlign,isCustomResizable,isCustomVisible,isCustomFixed,isCustomSort,isCustomAggGroup,isCustomAggFunc}=handleCustomStoreConfig($xeTable);if(type!=='reset'){// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
8249
|
+
reactData.isCustomStatus=true;}if(storage&&(customConfig?isEnableConf(customOpts):customOpts.enabled)&&(isCustomAlign||isCustomHeaderAlign||isCustomFooterAlign||isCustomResizable||isCustomVisible||isCustomFixed||isCustomSort||isCustomAggGroup||isCustomAggFunc)){if(!tableId){methods_errLog('vxe.error.reqProp',['id']);return $xeTable.$nextTick();}const storeData=type==='reset'?{alignData:{},headerAlignData:{},footerAlignData:{},resizableData:{},sortData:[],visibleData:{},fixedData:{},aggGroupData:{},aggFuncData:{}}:$xeTable.getCustomStoreData();if(updateStore){return updateStore({$table:$xeTable,id:tableId,type,storeData});}else{setCustomStorageMap(tableId,type==='reset'?null:storeData);}}return $xeTable.$nextTick();},handleUpdateDataQueue(){const $xeTable=this;const reactData=$xeTable;reactData.upDataFlag++;},handleRefreshColumnQueue(){const $xeTable=this;const reactData=$xeTable;reactData.reColumnFlag++;},handleFilterOptions(column){const $xeTable=this;const reactData=$xeTable;if(column){const{filterStore}=reactData;const{filterRender,filters}=column;const filterOptions=filters||[];const compConf=isEnableConf(filterRender)?methods_renderer.get(filterRender.name):null;const frMethod=column.filterRecoverMethod||(compConf?compConf.tableFilterRecoverMethod||compConf.filterRecoverMethod:null);filterStore.column=column;// 复原状态
|
|
8194
8250
|
filterOptions.forEach(option=>{const{_checked,checked}=option;option._checked=checked;if(!checked&&_checked!==checked){if(frMethod){frMethod({option,column,$table:$xeTable});}}});$xeTable.checkFilterOptions();}},/**
|
|
8195
8251
|
* 刷新列配置
|
|
8196
8252
|
*/refreshColumn(initSort){const $xeTable=this;if(initSort){handleUpdateColumn($xeTable);}return parseColumns($xeTable,true).then(()=>{return this.refreshScroll();}).then(()=>{return handleLazyRecalculate($xeTable,false,true,true);});},/**
|
|
@@ -11075,6 +11131,25 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11075
11131
|
}, evnt);
|
|
11076
11132
|
}
|
|
11077
11133
|
},
|
|
11134
|
+
changeAlignOption(column, targetAlign, colProperty, renderProperty, eName, evnt) {
|
|
11135
|
+
const $xeTableCustomPanel = this;
|
|
11136
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
11137
|
+
const tableReactData = $xeTable;
|
|
11138
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
11139
|
+
if (customOpts.immediate) {
|
|
11140
|
+
column[colProperty] = targetAlign;
|
|
11141
|
+
column[renderProperty] = targetAlign;
|
|
11142
|
+
tableReactData.isCustomStatus = true;
|
|
11143
|
+
$xeTable.handleCustom();
|
|
11144
|
+
$xeTable.saveCustomStore(`update:${colProperty}`);
|
|
11145
|
+
} else {
|
|
11146
|
+
column[renderProperty] = targetAlign;
|
|
11147
|
+
}
|
|
11148
|
+
$xeTable.dispatchEvent(eName, {
|
|
11149
|
+
column,
|
|
11150
|
+
[colProperty]: targetAlign
|
|
11151
|
+
}, evnt);
|
|
11152
|
+
},
|
|
11078
11153
|
allOptionEvent(evnt) {
|
|
11079
11154
|
const $xeTableCustomPanel = this;
|
|
11080
11155
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -11589,7 +11664,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11589
11664
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11590
11665
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11591
11666
|
const {
|
|
11592
|
-
|
|
11667
|
+
defPopupStyle
|
|
11593
11668
|
} = customStore;
|
|
11594
11669
|
const {
|
|
11595
11670
|
immediate,
|
|
@@ -11765,7 +11840,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11765
11840
|
}
|
|
11766
11841
|
}) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable), !parentItem && allowFixed ? h('div', {
|
|
11767
11842
|
class: 'vxe-table-custom--fixed-option'
|
|
11768
|
-
}, [h(VxeUIButtonComponent, {
|
|
11843
|
+
}, VxeUIButtonComponent ? [h(VxeUIButtonComponent, {
|
|
11769
11844
|
props: {
|
|
11770
11845
|
mode: 'text',
|
|
11771
11846
|
icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
@@ -11795,7 +11870,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11795
11870
|
$xeTableCustomPanel.changeFixedOption(column, 'right', $event);
|
|
11796
11871
|
}
|
|
11797
11872
|
}
|
|
11798
|
-
})]) : panel_renderEmptyElement($xeTable)]));
|
|
11873
|
+
})] : []) : panel_renderEmptyElement($xeTable)]));
|
|
11799
11874
|
}
|
|
11800
11875
|
});
|
|
11801
11876
|
return h('div', {
|
|
@@ -11805,7 +11880,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11805
11880
|
[`size--${vSize}`]: vSize,
|
|
11806
11881
|
'is--active': customStore.visible
|
|
11807
11882
|
}],
|
|
11808
|
-
style:
|
|
11883
|
+
style: defPopupStyle
|
|
11809
11884
|
}, customStore.visible ? [h('div', {
|
|
11810
11885
|
ref: 'refBodyWrapperElem',
|
|
11811
11886
|
class: 'vxe-table-custom-simple--body-wrapper'
|
|
@@ -11894,48 +11969,33 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11894
11969
|
}
|
|
11895
11970
|
})])]) : null]), $xeTableCustomPanel.renderDragTip(h)])] : []);
|
|
11896
11971
|
},
|
|
11897
|
-
|
|
11898
|
-
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
11899
|
-
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
11972
|
+
renderPopupBodys(h) {
|
|
11900
11973
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
11901
11974
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
11975
|
+
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
11902
11976
|
const $xeTableCustomPanel = this;
|
|
11903
|
-
const props = $xeTableCustomPanel;
|
|
11904
11977
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
11905
11978
|
const tableProps = $xeTable;
|
|
11906
11979
|
const tableReactData = $xeTable;
|
|
11907
|
-
const $xeGrid = $xeTable.$xeGrid;
|
|
11908
|
-
const $xeGantt = $xeTable.$xeGantt;
|
|
11909
|
-
const {
|
|
11910
|
-
customStore
|
|
11911
|
-
} = props;
|
|
11912
11980
|
const {
|
|
11913
|
-
treeConfig,
|
|
11914
|
-
rowGroupConfig,
|
|
11915
|
-
aggregateConfig,
|
|
11916
11981
|
resizable: allResizable
|
|
11917
11982
|
} = tableProps;
|
|
11918
11983
|
const {
|
|
11919
|
-
isCustomStatus,
|
|
11920
11984
|
customColumnList
|
|
11921
11985
|
} = tableReactData;
|
|
11922
11986
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11923
11987
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11924
|
-
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
11925
11988
|
const {
|
|
11926
|
-
placement: aggPlacement
|
|
11927
|
-
} = aggregateOpts;
|
|
11928
|
-
const {
|
|
11929
|
-
mode,
|
|
11930
11989
|
immediate,
|
|
11931
11990
|
showSortDragButton,
|
|
11932
11991
|
showSortMoveButton,
|
|
11933
11992
|
showSortPutButton,
|
|
11934
|
-
modalOptions,
|
|
11935
|
-
drawerOptions,
|
|
11936
11993
|
allowVisible,
|
|
11937
11994
|
allowSort,
|
|
11938
11995
|
allowFixed,
|
|
11996
|
+
allowAlign,
|
|
11997
|
+
allowHeaderAlign,
|
|
11998
|
+
allowFooterAlign,
|
|
11939
11999
|
allowResizable,
|
|
11940
12000
|
allowGroup,
|
|
11941
12001
|
allowValues,
|
|
@@ -11943,40 +12003,17 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11943
12003
|
visibleMethod
|
|
11944
12004
|
} = customOpts;
|
|
11945
12005
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
11946
|
-
const {
|
|
11947
|
-
maxFixedSize
|
|
11948
|
-
} = columnOpts;
|
|
11949
12006
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
11950
12007
|
const {
|
|
11951
12008
|
minWidth: reMinWidth,
|
|
11952
12009
|
maxWidth: reMaxWidth
|
|
11953
12010
|
} = resizableOpts;
|
|
11954
|
-
const modalOpts = Object.assign({}, modalOptions);
|
|
11955
|
-
const drawerOpts = Object.assign({}, drawerOptions);
|
|
11956
12011
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
11957
12012
|
const {
|
|
11958
12013
|
isCrossDrag,
|
|
11959
12014
|
isPeerDrag
|
|
11960
12015
|
} = columnDragOpts;
|
|
11961
|
-
const slots = customOpts.slots || {};
|
|
11962
|
-
const headerSlot = slots.header;
|
|
11963
|
-
const topSlot = slots.top;
|
|
11964
|
-
const bottomSlot = slots.bottom;
|
|
11965
|
-
const defaultSlot = slots.default;
|
|
11966
|
-
const footerSlot = slots.footer;
|
|
11967
12016
|
const trVNs = [];
|
|
11968
|
-
const isAllChecked = customStore.isAll;
|
|
11969
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
11970
|
-
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
11971
|
-
const params = {
|
|
11972
|
-
$table: $xeTable,
|
|
11973
|
-
$grid: $xeGrid,
|
|
11974
|
-
$gantt: $xeGantt,
|
|
11975
|
-
columns: customColumnList,
|
|
11976
|
-
isAllChecked,
|
|
11977
|
-
isAllIndeterminate,
|
|
11978
|
-
isCustomStatus
|
|
11979
|
-
};
|
|
11980
12017
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
11981
12018
|
const isVisible = visibleMethod ? visibleMethod({
|
|
11982
12019
|
$table: $xeTable,
|
|
@@ -12014,41 +12051,50 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12014
12051
|
}) : false;
|
|
12015
12052
|
const isHidden = !isChecked;
|
|
12016
12053
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
}
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
'
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12054
|
+
const alignList = [{
|
|
12055
|
+
icon: panel_getIcon().TABLE_CUSTOM_ALIGN_LEFT,
|
|
12056
|
+
value: 'left',
|
|
12057
|
+
title: panel_getI18n('vxe.custom.setting.anLeftTitle'),
|
|
12058
|
+
disabled: isHidden
|
|
12059
|
+
}, {
|
|
12060
|
+
icon: panel_getIcon().TABLE_CUSTOM_ALIGN_CENTER,
|
|
12061
|
+
value: 'center',
|
|
12062
|
+
title: panel_getI18n('vxe.custom.setting.anCenterTitle'),
|
|
12063
|
+
disabled: isHidden
|
|
12064
|
+
}, {
|
|
12065
|
+
icon: panel_getIcon().TABLE_CUSTOM_ALIGN_RIGHT,
|
|
12066
|
+
value: 'right',
|
|
12067
|
+
title: panel_getI18n('vxe.custom.setting.anRightTitle'),
|
|
12068
|
+
disabled: isHidden
|
|
12069
|
+
}];
|
|
12070
|
+
const tdVNs = [];
|
|
12071
|
+
if (allowVisible) {
|
|
12072
|
+
tdVNs.push(h('td', {
|
|
12073
|
+
key: 'av',
|
|
12074
|
+
class: 'vxe-table-custom-popup--column-td col--visible'
|
|
12075
|
+
}, [h('div', {
|
|
12076
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
12077
|
+
'is--checked': isChecked,
|
|
12078
|
+
'is--indeterminate': isIndeterminate,
|
|
12079
|
+
'is--disabled': isDisabled
|
|
12080
|
+
}],
|
|
12081
|
+
attrs: {
|
|
12082
|
+
title: panel_getI18n('vxe.custom.setting.colVisible')
|
|
12083
|
+
},
|
|
12084
|
+
on: {
|
|
12085
|
+
click: evnt => {
|
|
12086
|
+
if (!isDisabled) {
|
|
12087
|
+
$xeTableCustomPanel.changeCheckboxOption(column, evnt);
|
|
12088
|
+
}
|
|
12045
12089
|
}
|
|
12046
12090
|
}
|
|
12047
|
-
}
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
}
|
|
12051
|
-
|
|
12091
|
+
}, [h('span', {
|
|
12092
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
12093
|
+
})])]));
|
|
12094
|
+
}
|
|
12095
|
+
tdVNs.push(h('td', {
|
|
12096
|
+
key: 'at',
|
|
12097
|
+
class: 'vxe-table-custom-popup--column-td col--name'
|
|
12052
12098
|
}, [h('div', {
|
|
12053
12099
|
class: 'vxe-table-custom-popup--name'
|
|
12054
12100
|
}, [allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h('div', {
|
|
@@ -12083,7 +12129,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12083
12129
|
}, VxeUIButtonComponent ? [showSortMoveButton ? h(VxeUIButtonComponent, {
|
|
12084
12130
|
props: {
|
|
12085
12131
|
mode: 'text',
|
|
12086
|
-
|
|
12132
|
+
icon: 'vxe-icon-arrows-up',
|
|
12087
12133
|
title: panel_getI18n('vxe.custom.setting.moveUpTitle'),
|
|
12088
12134
|
disabled: index <= 0
|
|
12089
12135
|
},
|
|
@@ -12095,7 +12141,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12095
12141
|
}) : panel_renderEmptyElement($xeTable), showSortMoveButton ? h(VxeUIButtonComponent, {
|
|
12096
12142
|
props: {
|
|
12097
12143
|
mode: 'text',
|
|
12098
|
-
|
|
12144
|
+
icon: 'vxe-icon-arrows-down',
|
|
12099
12145
|
title: panel_getI18n('vxe.custom.setting.moveDnTitle'),
|
|
12100
12146
|
disabled: index >= items.length - 1
|
|
12101
12147
|
},
|
|
@@ -12107,7 +12153,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12107
12153
|
}) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
|
|
12108
12154
|
props: {
|
|
12109
12155
|
mode: 'text',
|
|
12110
|
-
|
|
12156
|
+
icon: 'vxe-icon-top',
|
|
12111
12157
|
title: panel_getI18n('vxe.custom.setting.putTopTitle'),
|
|
12112
12158
|
disabled: index <= 0
|
|
12113
12159
|
},
|
|
@@ -12119,7 +12165,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12119
12165
|
}) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
|
|
12120
12166
|
props: {
|
|
12121
12167
|
mode: 'text',
|
|
12122
|
-
|
|
12168
|
+
icon: 'vxe-icon-bottom',
|
|
12123
12169
|
title: panel_getI18n('vxe.custom.setting.putBottomTitle'),
|
|
12124
12170
|
disabled: index >= items.length - 1
|
|
12125
12171
|
},
|
|
@@ -12128,63 +12174,312 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12128
12174
|
$xeTableCustomPanel.sortMoveBottomEvent(evntParame, column);
|
|
12129
12175
|
}
|
|
12130
12176
|
}
|
|
12131
|
-
}) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable)])])
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12142
|
-
|
|
12143
|
-
|
|
12144
|
-
column.renderResizeWidth = Math.max(0, Number(value));
|
|
12177
|
+
}) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable)])]));
|
|
12178
|
+
if (allowResizable) {
|
|
12179
|
+
tdVNs.push(h('td', {
|
|
12180
|
+
key: 'aw',
|
|
12181
|
+
class: 'vxe-table-custom-popup--column-td col--resizable'
|
|
12182
|
+
}, [column.children && column.children.length || !(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? h('span', '-') : VxeUINumberInputComponent ? h(VxeUINumberInputComponent, {
|
|
12183
|
+
props: {
|
|
12184
|
+
type: 'integer',
|
|
12185
|
+
immediate: false,
|
|
12186
|
+
disabled: isHidden,
|
|
12187
|
+
value: column.renderResizeWidth,
|
|
12188
|
+
min: customMinWidth || undefined,
|
|
12189
|
+
max: customMaxWidth || undefined
|
|
12145
12190
|
},
|
|
12146
|
-
|
|
12147
|
-
|
|
12191
|
+
on: {
|
|
12192
|
+
modelValue(value) {
|
|
12193
|
+
const width = Math.max(0, Number(value));
|
|
12194
|
+
column.renderResizeWidth = width;
|
|
12195
|
+
},
|
|
12196
|
+
change() {
|
|
12197
|
+
$xeTableCustomPanel.changeColumnWidth(column);
|
|
12198
|
+
}
|
|
12148
12199
|
}
|
|
12149
|
-
}
|
|
12150
|
-
}
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12170
|
-
|
|
12200
|
+
}) : panel_renderEmptyElement($xeTable)]));
|
|
12201
|
+
}
|
|
12202
|
+
if (allowFixed) {
|
|
12203
|
+
tdVNs.push(h('td', {
|
|
12204
|
+
key: 'af',
|
|
12205
|
+
class: 'vxe-table-custom-popup--column-td col--fixed'
|
|
12206
|
+
}, parentItem ? [h('span', '-')] : VxeUIRadioGroupComponent ? [h(VxeUIButtonComponent, {
|
|
12207
|
+
props: {
|
|
12208
|
+
icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
12209
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
12210
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
12211
|
+
title: panel_getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
|
|
12212
|
+
},
|
|
12213
|
+
on: {
|
|
12214
|
+
click: ({
|
|
12215
|
+
$event
|
|
12216
|
+
}) => {
|
|
12217
|
+
$xeTableCustomPanel.changeFixedOption(column, 'left', $event);
|
|
12218
|
+
}
|
|
12219
|
+
}
|
|
12220
|
+
}), h(VxeUIButtonComponent, {
|
|
12221
|
+
props: {
|
|
12222
|
+
icon: column.renderFixed === 'right' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
12223
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
12224
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
12225
|
+
title: panel_getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
|
|
12226
|
+
},
|
|
12227
|
+
on: {
|
|
12228
|
+
click: ({
|
|
12229
|
+
$event
|
|
12230
|
+
}) => {
|
|
12231
|
+
$xeTableCustomPanel.changeFixedOption(column, 'right', $event);
|
|
12232
|
+
}
|
|
12233
|
+
}
|
|
12234
|
+
})] : []));
|
|
12235
|
+
}
|
|
12236
|
+
if (allowAlign) {
|
|
12237
|
+
tdVNs.push(h('td', {
|
|
12238
|
+
key: 'aa',
|
|
12239
|
+
class: 'vxe-table-custom-popup--column-td col--align'
|
|
12240
|
+
}, VxeUIRadioGroupComponent ? [h(VxeUIRadioGroupComponent, {
|
|
12241
|
+
props: {
|
|
12242
|
+
value: column.renderAlign || '',
|
|
12243
|
+
type: 'button',
|
|
12244
|
+
strict: false,
|
|
12245
|
+
disabled: isHidden,
|
|
12246
|
+
options: alignList
|
|
12247
|
+
},
|
|
12248
|
+
on: {
|
|
12249
|
+
change({
|
|
12250
|
+
value,
|
|
12251
|
+
$event
|
|
12252
|
+
}) {
|
|
12253
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event);
|
|
12254
|
+
}
|
|
12255
|
+
}
|
|
12256
|
+
})] : []));
|
|
12257
|
+
}
|
|
12258
|
+
if (allowHeaderAlign) {
|
|
12259
|
+
tdVNs.push(h('td', {
|
|
12260
|
+
key: 'aha',
|
|
12261
|
+
class: 'vxe-table-custom-popup--column-td col--header-align'
|
|
12262
|
+
}, isColGroup ? [h('span', '-')] : VxeUIRadioGroupComponent ? [h(VxeUIRadioGroupComponent, {
|
|
12263
|
+
props: {
|
|
12264
|
+
value: column.renderHeaderAlign || '',
|
|
12265
|
+
type: 'button',
|
|
12266
|
+
strict: false,
|
|
12267
|
+
disabled: isHidden,
|
|
12268
|
+
options: alignList
|
|
12269
|
+
},
|
|
12270
|
+
on: {
|
|
12271
|
+
change({
|
|
12272
|
+
value,
|
|
12273
|
+
$event
|
|
12274
|
+
}) {
|
|
12275
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event);
|
|
12276
|
+
}
|
|
12277
|
+
}
|
|
12278
|
+
})] : []));
|
|
12279
|
+
}
|
|
12280
|
+
if (allowFooterAlign) {
|
|
12281
|
+
tdVNs.push(h('td', {
|
|
12282
|
+
key: 'afa',
|
|
12283
|
+
class: 'vxe-table-custom-popup--column-td col--footer-align'
|
|
12284
|
+
}, isColGroup ? [h('span', '-')] : VxeUIRadioGroupComponent ? [h(VxeUIRadioGroupComponent, {
|
|
12285
|
+
props: {
|
|
12286
|
+
value: column.renderFooterAlign || '',
|
|
12287
|
+
type: 'button',
|
|
12288
|
+
strict: false,
|
|
12289
|
+
disabled: isHidden,
|
|
12290
|
+
options: alignList
|
|
12291
|
+
},
|
|
12292
|
+
on: {
|
|
12293
|
+
change({
|
|
12294
|
+
value,
|
|
12295
|
+
$event
|
|
12296
|
+
}) {
|
|
12297
|
+
$xeTableCustomPanel.changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event);
|
|
12298
|
+
}
|
|
12299
|
+
}
|
|
12300
|
+
})] : []));
|
|
12301
|
+
}
|
|
12302
|
+
trVNs.push(h('tr', {
|
|
12303
|
+
key: column.id,
|
|
12304
|
+
attrs: {
|
|
12305
|
+
colid: column.id
|
|
12171
12306
|
},
|
|
12307
|
+
class: [`vxe-table-custom-popup--row level--${column.level}`, {
|
|
12308
|
+
'is--group': isColGroup
|
|
12309
|
+
}],
|
|
12172
12310
|
on: {
|
|
12173
|
-
|
|
12174
|
-
|
|
12175
|
-
|
|
12176
|
-
}) {
|
|
12177
|
-
$xeTableCustomPanel.changeFixedOption(column, label, $event);
|
|
12178
|
-
}
|
|
12311
|
+
dragstart: $xeTableCustomPanel.sortDragstartEvent,
|
|
12312
|
+
dragend: $xeTableCustomPanel.sortDragendEvent,
|
|
12313
|
+
dragover: $xeTableCustomPanel.sortDragoverEvent
|
|
12179
12314
|
}
|
|
12180
|
-
}
|
|
12315
|
+
}, tdVNs));
|
|
12181
12316
|
}
|
|
12182
12317
|
});
|
|
12318
|
+
return trVNs;
|
|
12319
|
+
},
|
|
12320
|
+
renderPopupPanel(h) {
|
|
12321
|
+
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
12322
|
+
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
12323
|
+
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
12324
|
+
const $xeTableCustomPanel = this;
|
|
12325
|
+
const props = $xeTableCustomPanel;
|
|
12326
|
+
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
12327
|
+
const tableProps = $xeTable;
|
|
12328
|
+
const tableReactData = $xeTable;
|
|
12329
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
12330
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
12331
|
+
const {
|
|
12332
|
+
customStore
|
|
12333
|
+
} = props;
|
|
12334
|
+
const {
|
|
12335
|
+
treeConfig,
|
|
12336
|
+
rowGroupConfig,
|
|
12337
|
+
aggregateConfig
|
|
12338
|
+
} = tableProps;
|
|
12339
|
+
const {
|
|
12340
|
+
isCustomStatus,
|
|
12341
|
+
customColumnList
|
|
12342
|
+
} = tableReactData;
|
|
12343
|
+
const vSize = $xeTable.computeSize;
|
|
12344
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
12345
|
+
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
12346
|
+
const {
|
|
12347
|
+
panePopupStyle
|
|
12348
|
+
} = customStore;
|
|
12349
|
+
const {
|
|
12350
|
+
placement: aggPlacement
|
|
12351
|
+
} = aggregateOpts;
|
|
12352
|
+
const {
|
|
12353
|
+
mode,
|
|
12354
|
+
immediate,
|
|
12355
|
+
modalOptions,
|
|
12356
|
+
drawerOptions,
|
|
12357
|
+
allowVisible,
|
|
12358
|
+
allowFixed,
|
|
12359
|
+
allowAlign,
|
|
12360
|
+
allowHeaderAlign,
|
|
12361
|
+
allowFooterAlign,
|
|
12362
|
+
allowResizable
|
|
12363
|
+
} = customOpts;
|
|
12364
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
12365
|
+
const {
|
|
12366
|
+
maxFixedSize
|
|
12367
|
+
} = columnOpts;
|
|
12368
|
+
const modalOpts = Object.assign({}, modalOptions);
|
|
12369
|
+
const drawerOpts = Object.assign({}, drawerOptions);
|
|
12370
|
+
const slots = customOpts.slots || {};
|
|
12371
|
+
const headerSlot = slots.header;
|
|
12372
|
+
const topSlot = slots.top;
|
|
12373
|
+
const bottomSlot = slots.bottom;
|
|
12374
|
+
const defaultSlot = slots.default;
|
|
12375
|
+
const footerSlot = slots.footer;
|
|
12376
|
+
const isAllChecked = customStore.isAll;
|
|
12377
|
+
const isAllIndeterminate = customStore.isIndeterminate;
|
|
12378
|
+
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
12379
|
+
const params = {
|
|
12380
|
+
$table: $xeTable,
|
|
12381
|
+
$grid: $xeGrid,
|
|
12382
|
+
$gantt: $xeGantt,
|
|
12383
|
+
columns: customColumnList,
|
|
12384
|
+
isAllChecked,
|
|
12385
|
+
isAllIndeterminate,
|
|
12386
|
+
isCustomStatus
|
|
12387
|
+
};
|
|
12388
|
+
const colVNs = [];
|
|
12389
|
+
const headVNs = [];
|
|
12390
|
+
if (allowVisible) {
|
|
12391
|
+
colVNs.push(h('col', {
|
|
12392
|
+
key: 'av',
|
|
12393
|
+
class: 'vxe-table-custom-popup--column-col col--checkbox'
|
|
12394
|
+
}));
|
|
12395
|
+
headVNs.push(h('th', {
|
|
12396
|
+
key: 'av',
|
|
12397
|
+
class: 'vxe-table-custom-popup--column-th col--checkbox'
|
|
12398
|
+
}, [h('div', {
|
|
12399
|
+
class: ['vxe-table-custom--checkbox-option', {
|
|
12400
|
+
'is--checked': isAllChecked,
|
|
12401
|
+
'is--indeterminate': isAllIndeterminate
|
|
12402
|
+
}],
|
|
12403
|
+
attrs: {
|
|
12404
|
+
title: panel_getI18n('vxe.table.allTitle')
|
|
12405
|
+
},
|
|
12406
|
+
on: {
|
|
12407
|
+
click: $xeTableCustomPanel.allOptionEvent
|
|
12408
|
+
}
|
|
12409
|
+
}, [h('span', {
|
|
12410
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
12411
|
+
})
|
|
12412
|
+
// h('span', {
|
|
12413
|
+
// class: 'vxe-checkbox--label'
|
|
12414
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
12415
|
+
])]));
|
|
12416
|
+
}
|
|
12417
|
+
colVNs.push(h('col', {
|
|
12418
|
+
key: 'at',
|
|
12419
|
+
class: 'vxe-table-custom-popup--column-col col--title'
|
|
12420
|
+
}));
|
|
12421
|
+
headVNs.push(h('th', {
|
|
12422
|
+
key: 'at',
|
|
12423
|
+
class: 'vxe-table-custom-popup--column-th col--title'
|
|
12424
|
+
}, panel_getI18n('vxe.custom.setting.colTitle')));
|
|
12425
|
+
if (allowResizable) {
|
|
12426
|
+
colVNs.push(h('col', {
|
|
12427
|
+
key: 'aw',
|
|
12428
|
+
class: 'vxe-table-custom-popup--column-col col--width'
|
|
12429
|
+
}));
|
|
12430
|
+
headVNs.push(h('th', {
|
|
12431
|
+
key: 'aw',
|
|
12432
|
+
class: 'vxe-table-custom-popup--column-th col--width'
|
|
12433
|
+
}, panel_getI18n('vxe.custom.setting.colResizable')));
|
|
12434
|
+
}
|
|
12435
|
+
if (allowFixed) {
|
|
12436
|
+
colVNs.push(h('col', {
|
|
12437
|
+
key: 'af',
|
|
12438
|
+
class: 'vxe-table-custom-popup--column-col col--fixed'
|
|
12439
|
+
}));
|
|
12440
|
+
headVNs.push(h('th', {
|
|
12441
|
+
key: 'af',
|
|
12442
|
+
class: 'vxe-table-custom-popup--column-th col--fixed'
|
|
12443
|
+
}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])));
|
|
12444
|
+
}
|
|
12445
|
+
if (allowAlign) {
|
|
12446
|
+
colVNs.push(h('col', {
|
|
12447
|
+
key: 'aa',
|
|
12448
|
+
class: 'vxe-table-custom-popup--column-col col--align'
|
|
12449
|
+
}));
|
|
12450
|
+
headVNs.push(h('th', {
|
|
12451
|
+
key: 'aa',
|
|
12452
|
+
class: 'vxe-table-custom-popup--column-th col--align'
|
|
12453
|
+
}, panel_getI18n('vxe.custom.setting.colAlign')));
|
|
12454
|
+
}
|
|
12455
|
+
if (allowHeaderAlign) {
|
|
12456
|
+
colVNs.push(h('col', {
|
|
12457
|
+
key: 'aha',
|
|
12458
|
+
class: 'vxe-table-custom-popup--column-col col--header-align'
|
|
12459
|
+
}));
|
|
12460
|
+
headVNs.push(h('th', {
|
|
12461
|
+
key: 'aha',
|
|
12462
|
+
class: 'vxe-table-custom-popup--column-th col--header-align'
|
|
12463
|
+
}, panel_getI18n('vxe.custom.setting.colHeadAlign')));
|
|
12464
|
+
}
|
|
12465
|
+
if (allowFooterAlign) {
|
|
12466
|
+
colVNs.push(h('col', {
|
|
12467
|
+
key: 'afa',
|
|
12468
|
+
class: 'vxe-table-custom-popup--column-col col--footer-align'
|
|
12469
|
+
}));
|
|
12470
|
+
headVNs.push(h('th', {
|
|
12471
|
+
key: 'afa',
|
|
12472
|
+
class: 'vxe-table-custom-popup--column-th col--footer-align'
|
|
12473
|
+
}, panel_getI18n('vxe.custom.setting.colFootAlign')));
|
|
12474
|
+
}
|
|
12183
12475
|
const scopedSlots = {
|
|
12184
12476
|
default: () => {
|
|
12185
12477
|
return h('div', {
|
|
12186
12478
|
ref: 'refBodyWrapperElem',
|
|
12187
|
-
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}
|
|
12479
|
+
class: ['vxe-table-custom-popup--body-wrapper', `agg-layout--${aggPlacement}`, {
|
|
12480
|
+
[`size--${vSize}`]: vSize
|
|
12481
|
+
}],
|
|
12482
|
+
style: panePopupStyle
|
|
12188
12483
|
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
12189
12484
|
props: {
|
|
12190
12485
|
customStore
|
|
@@ -12196,36 +12491,13 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12196
12491
|
class: 'vxe-table-custom-popup--table-top'
|
|
12197
12492
|
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
12198
12493
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
12199
|
-
}, [h('table', {}, [h('colgroup', {}, [
|
|
12200
|
-
class: 'vxe-table-custom-popup--table-col-seq'
|
|
12201
|
-
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
12202
|
-
class: 'vxe-table-custom-popup--table-col-title'
|
|
12203
|
-
}), allowResizable ? h('col', {
|
|
12204
|
-
class: 'vxe-table-custom-popup--table-col-width'
|
|
12205
|
-
}) : panel_renderEmptyElement($xeTable), allowFixed ? h('col', {
|
|
12206
|
-
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
12207
|
-
}) : panel_renderEmptyElement($xeTable)]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
12208
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
12209
|
-
'is--checked': isAllChecked,
|
|
12210
|
-
'is--indeterminate': isAllIndeterminate
|
|
12211
|
-
}],
|
|
12212
|
-
attrs: {
|
|
12213
|
-
title: panel_getI18n('vxe.table.allTitle')
|
|
12214
|
-
},
|
|
12215
|
-
on: {
|
|
12216
|
-
click: $xeTableCustomPanel.allOptionEvent
|
|
12217
|
-
}
|
|
12218
|
-
}, [h('span', {
|
|
12219
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
12220
|
-
}), h('span', {
|
|
12221
|
-
class: 'vxe-checkbox--label'
|
|
12222
|
-
}, panel_getI18n('vxe.toolbar.customAll'))])]) : panel_renderEmptyElement($xeTable), h('th', {}, panel_getI18n('vxe.custom.setting.colTitle')), allowResizable ? h('th', {}, panel_getI18n('vxe.custom.setting.colResizable')) : panel_renderEmptyElement($xeTable), allowFixed ? h('th', {}, panel_getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])) : panel_renderEmptyElement($xeTable)])]), h('transition-group', {
|
|
12494
|
+
}, [h('table', {}, [h('colgroup', {}, colVNs), h('thead', {}, [h('tr', {}, headVNs)]), h('transition-group', {
|
|
12223
12495
|
class: 'vxe-table-custom--panel-list',
|
|
12224
12496
|
props: {
|
|
12225
12497
|
tag: 'tbody',
|
|
12226
12498
|
name: 'vxe-table-custom--list'
|
|
12227
12499
|
}
|
|
12228
|
-
},
|
|
12500
|
+
}, $xeTableCustomPanel.renderPopupBodys(h))])]), bottomSlot ? h('div', {
|
|
12229
12501
|
class: 'vxe-table-custom-popup--table-bottom'
|
|
12230
12502
|
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), $xeTableCustomPanel.renderDragTip(h)]), isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
12231
12503
|
props: {
|
|
@@ -12249,6 +12521,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12249
12521
|
}
|
|
12250
12522
|
}), immediate ? h(VxeUIButtonComponent, {
|
|
12251
12523
|
props: {
|
|
12524
|
+
status: 'primary',
|
|
12252
12525
|
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customClose')
|
|
12253
12526
|
},
|
|
12254
12527
|
on: {
|
|
@@ -12301,11 +12574,11 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12301
12574
|
return VxeUIModalComponent ? h(VxeUIModalComponent, {
|
|
12302
12575
|
key: 'modal',
|
|
12303
12576
|
props: {
|
|
12304
|
-
className: ['vxe-table-custom-
|
|
12577
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
12305
12578
|
value: customStore.visible,
|
|
12306
12579
|
title: modalOpts.title || panel_getI18n('vxe.custom.cstmTitle'),
|
|
12307
|
-
width: modalOpts.width || Math.min(
|
|
12308
|
-
minWidth: modalOpts.minWidth ||
|
|
12580
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
12581
|
+
minWidth: modalOpts.minWidth || 800,
|
|
12309
12582
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
12310
12583
|
minHeight: modalOpts.minHeight || 400,
|
|
12311
12584
|
showZoom: modalOpts.showZoom,
|
|
@@ -12314,6 +12587,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12314
12587
|
mask: modalOpts.mask,
|
|
12315
12588
|
lockView: modalOpts.lockView,
|
|
12316
12589
|
resize: modalOpts.resize,
|
|
12590
|
+
transfer: modalOpts.transfer,
|
|
12317
12591
|
escClosable: !!modalOpts.escClosable,
|
|
12318
12592
|
maskClosable: !!modalOpts.maskClosable,
|
|
12319
12593
|
destroyOnClose: true,
|
|
@@ -19580,6 +19854,7 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
|
|
|
19580
19854
|
|
|
19581
19855
|
|
|
19582
19856
|
|
|
19857
|
+
const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
|
|
19583
19858
|
function updatePopupStyle($xeTable) {
|
|
19584
19859
|
const $xeGrid = $xeTable.$xeGrid;
|
|
19585
19860
|
const $xeGantt = $xeTable.$xeGantt;
|
|
@@ -19597,6 +19872,8 @@ function updatePopupStyle($xeTable) {
|
|
|
19597
19872
|
const showSimple = !(mode === 'modal' || mode === 'drawer');
|
|
19598
19873
|
const {
|
|
19599
19874
|
transfer,
|
|
19875
|
+
minWidth,
|
|
19876
|
+
maxWidth,
|
|
19600
19877
|
maxHeight
|
|
19601
19878
|
} = popupOptions || {};
|
|
19602
19879
|
const customSimpleMode = $xeTable.computeCustomSimpleMode;
|
|
@@ -19605,7 +19882,8 @@ function updatePopupStyle($xeTable) {
|
|
|
19605
19882
|
let wrapperEl = $xeTable.$refs.refElem;
|
|
19606
19883
|
let popupTop = 0;
|
|
19607
19884
|
let popupMaxHeight = 0;
|
|
19608
|
-
const
|
|
19885
|
+
const defPupStys = {};
|
|
19886
|
+
const panePupStys = {};
|
|
19609
19887
|
if ($xeGantt) {
|
|
19610
19888
|
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
|
|
19611
19889
|
if (ganttContainerElem) {
|
|
@@ -19635,23 +19913,40 @@ function updatePopupStyle($xeTable) {
|
|
|
19635
19913
|
}
|
|
19636
19914
|
if (!placement || !['left', 'right', 'bottom-left', 'bottom-right'].includes(placement)) {
|
|
19637
19915
|
if (popupTop) {
|
|
19638
|
-
|
|
19916
|
+
defPupStys.top = toCssUnit(popupTop);
|
|
19639
19917
|
}
|
|
19640
19918
|
}
|
|
19641
19919
|
if (showSimple && transfer) {
|
|
19642
19920
|
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
19643
|
-
|
|
19921
|
+
defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
19644
19922
|
}
|
|
19645
19923
|
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
19646
|
-
|
|
19924
|
+
defPupStys.left = toCssUnit(tableRect.left);
|
|
19647
19925
|
} else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
19648
|
-
|
|
19926
|
+
defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
|
|
19927
|
+
}
|
|
19928
|
+
}
|
|
19929
|
+
// 同步表格的css变量到弹窗中
|
|
19930
|
+
const bodyComputeStyle = getComputedStyle(bodyEl);
|
|
19931
|
+
const tableComputeStyle = getComputedStyle(wrapperEl);
|
|
19932
|
+
customColumnCssKeys.forEach(key => {
|
|
19933
|
+
const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === 'title' ? 'min-' : ''}width`;
|
|
19934
|
+
const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
|
|
19935
|
+
if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
|
|
19936
|
+
panePupStys[currCssKey] = currCssVal;
|
|
19649
19937
|
}
|
|
19938
|
+
});
|
|
19939
|
+
if (minWidth) {
|
|
19940
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-min-width'] = toCssUnit(minWidth);
|
|
19941
|
+
}
|
|
19942
|
+
if (maxWidth) {
|
|
19943
|
+
defPupStys['--vxe-ui-vxe-table-custom-default-max-width'] = toCssUnit(maxWidth);
|
|
19650
19944
|
}
|
|
19651
19945
|
if (popupMxHeight) {
|
|
19652
|
-
|
|
19946
|
+
defPupStys.maxHeight = toCssUnit(popupMxHeight);
|
|
19653
19947
|
}
|
|
19654
|
-
customStore.
|
|
19948
|
+
customStore.defPopupStyle = defPupStys;
|
|
19949
|
+
customStore.panePopupStyle = panePupStys;
|
|
19655
19950
|
customStore.maxHeight = popupMxHeight;
|
|
19656
19951
|
return $xeTable.$nextTick();
|
|
19657
19952
|
}
|
|
@@ -19765,10 +20060,21 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19765
20060
|
allowSort,
|
|
19766
20061
|
allowFixed,
|
|
19767
20062
|
allowResizable,
|
|
20063
|
+
allowAlign,
|
|
20064
|
+
allowHeaderAlign,
|
|
20065
|
+
allowFooterAlign,
|
|
19768
20066
|
allowGroup,
|
|
19769
20067
|
allowValues
|
|
19770
20068
|
} = customOpts;
|
|
19771
|
-
if (
|
|
20069
|
+
if (isDirectly) {
|
|
20070
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
20071
|
+
if (allowResizable) {
|
|
20072
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
20073
|
+
column.resizeWidth = Math.max(0, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(column.renderWidth));
|
|
20074
|
+
}
|
|
20075
|
+
}
|
|
20076
|
+
});
|
|
20077
|
+
} else {
|
|
19772
20078
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
19773
20079
|
if (parentColumn) {
|
|
19774
20080
|
// 更新子列信息
|
|
@@ -19793,13 +20099,22 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19793
20099
|
if (allowVisible) {
|
|
19794
20100
|
column.visible = column.renderVisible;
|
|
19795
20101
|
}
|
|
20102
|
+
if (allowAlign) {
|
|
20103
|
+
column.align = column.renderAlign;
|
|
20104
|
+
}
|
|
20105
|
+
if (allowHeaderAlign) {
|
|
20106
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
20107
|
+
}
|
|
20108
|
+
if (allowFooterAlign) {
|
|
20109
|
+
column.footerAlign = column.renderFooterAlign;
|
|
20110
|
+
}
|
|
19796
20111
|
if (allowGroup && allowValues) {
|
|
19797
20112
|
column.aggFunc = column.renderAggFn;
|
|
19798
20113
|
}
|
|
19799
20114
|
});
|
|
19800
20115
|
}
|
|
19801
20116
|
reactData.isCustomStatus = true;
|
|
19802
|
-
if (allowGroup &&
|
|
20117
|
+
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
19803
20118
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
19804
20119
|
// 更新数据分组
|
|
19805
20120
|
if (aggHandleFields.length) {
|
|
@@ -19834,7 +20149,12 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19834
20149
|
allowVisible,
|
|
19835
20150
|
allowSort,
|
|
19836
20151
|
allowFixed,
|
|
19837
|
-
|
|
20152
|
+
allowAlign,
|
|
20153
|
+
allowHeaderAlign,
|
|
20154
|
+
allowFooterAlign,
|
|
20155
|
+
allowResizable,
|
|
20156
|
+
allowGroup,
|
|
20157
|
+
allowValues
|
|
19838
20158
|
} = customOpts;
|
|
19839
20159
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
19840
20160
|
const colid = column.getKey();
|
|
@@ -19854,6 +20174,21 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19854
20174
|
if (allowResizable) {
|
|
19855
20175
|
column.renderResizeWidth = column.renderWidth;
|
|
19856
20176
|
}
|
|
20177
|
+
if (allowAlign) {
|
|
20178
|
+
column.align = column.renderAlign;
|
|
20179
|
+
}
|
|
20180
|
+
if (allowHeaderAlign) {
|
|
20181
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
20182
|
+
}
|
|
20183
|
+
if (allowFooterAlign) {
|
|
20184
|
+
column.footerAlign = column.renderFooterAlign;
|
|
20185
|
+
}
|
|
20186
|
+
if (allowGroup) {
|
|
20187
|
+
// 无
|
|
20188
|
+
}
|
|
20189
|
+
if (allowValues) {
|
|
20190
|
+
// 无
|
|
20191
|
+
}
|
|
19857
20192
|
}, {
|
|
19858
20193
|
children: 'children'
|
|
19859
20194
|
});
|
|
@@ -19878,7 +20213,10 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19878
20213
|
resizable: options === true,
|
|
19879
20214
|
fixed: options === true,
|
|
19880
20215
|
sort: options === true,
|
|
19881
|
-
aggFunc: options === true
|
|
20216
|
+
aggFunc: options === true,
|
|
20217
|
+
align: options === true,
|
|
20218
|
+
headerAlign: options === true,
|
|
20219
|
+
footerAlign: options === true
|
|
19882
20220
|
}, options);
|
|
19883
20221
|
const allCols = [];
|
|
19884
20222
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
@@ -19887,6 +20225,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19887
20225
|
}
|
|
19888
20226
|
if (opts.fixed) {
|
|
19889
20227
|
column.fixed = column.defaultFixed;
|
|
20228
|
+
column.renderFixed = column.defaultFixed;
|
|
19890
20229
|
}
|
|
19891
20230
|
if (opts.sort) {
|
|
19892
20231
|
column.renderSortNumber = column.sortNumber;
|
|
@@ -19898,6 +20237,18 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19898
20237
|
})) {
|
|
19899
20238
|
column.visible = column.defaultVisible;
|
|
19900
20239
|
}
|
|
20240
|
+
if (opts.align) {
|
|
20241
|
+
column.align = column.defaultAlign;
|
|
20242
|
+
column.renderAlign = column.defaultAlign;
|
|
20243
|
+
}
|
|
20244
|
+
if (opts.headerAlign) {
|
|
20245
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
20246
|
+
column.renderHeaderAlign = column.defaultHeaderAlign;
|
|
20247
|
+
}
|
|
20248
|
+
if (opts.footerAlign) {
|
|
20249
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
20250
|
+
column.renderFooterAlign = column.defaultFooterAlign;
|
|
20251
|
+
}
|
|
19901
20252
|
if (opts.aggFunc) {
|
|
19902
20253
|
column.aggFunc = column.defaultAggFunc;
|
|
19903
20254
|
column.renderAggFn = column.defaultAggFunc;
|
|
@@ -20090,6 +20441,9 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
20090
20441
|
column.renderFixed = column.fixed;
|
|
20091
20442
|
column.renderVisible = column.visible;
|
|
20092
20443
|
column.renderResizeWidth = column.renderWidth;
|
|
20444
|
+
column.renderAlign = column.align;
|
|
20445
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
20446
|
+
column.renderFooterAlign = column.footerAlign;
|
|
20093
20447
|
sortMaps[colid] = column.renderSortNumber;
|
|
20094
20448
|
fixedMaps[colid] = column.fixed;
|
|
20095
20449
|
visibleMaps[colid] = column.visible;
|
|
@@ -27900,10 +28254,16 @@ const Toolbar = VxeToolbar;
|
|
|
27900
28254
|
colResizable: '列宽(像素)',
|
|
27901
28255
|
colVisible: '是否显示',
|
|
27902
28256
|
colFixed: '冻结列',
|
|
27903
|
-
colFixedMax: '
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
28257
|
+
colFixedMax: '冻结列({0})',
|
|
28258
|
+
colAlign: '对齐方式',
|
|
28259
|
+
colHeadAlign: '表头对齐方式',
|
|
28260
|
+
colFootAlign: '表尾对齐方式',
|
|
28261
|
+
fixedLeft: '左',
|
|
28262
|
+
fixedUnset: '无',
|
|
28263
|
+
fixedRight: '右',
|
|
28264
|
+
alignLeft: '左',
|
|
28265
|
+
alignCenter: '中',
|
|
28266
|
+
alignRight: '右',
|
|
27907
28267
|
moveUp: '上移',
|
|
27908
28268
|
moveDn: '下移',
|
|
27909
28269
|
putTop: '置顶',
|
|
@@ -27911,7 +28271,10 @@ const Toolbar = VxeToolbar;
|
|
|
27911
28271
|
moveUpTitle: '点击向上移动',
|
|
27912
28272
|
moveDnTitle: '点击向下移动',
|
|
27913
28273
|
putTopTitle: '点击置顶',
|
|
27914
|
-
putBottomTitle: '点击置尾'
|
|
28274
|
+
putBottomTitle: '点击置尾',
|
|
28275
|
+
anLeftTitle: '左对齐',
|
|
28276
|
+
anCenterTitle: '居中',
|
|
28277
|
+
anRightTitle: '右对齐'
|
|
27915
28278
|
}
|
|
27916
28279
|
},
|
|
27917
28280
|
import: {
|