vxe-table 3.21.21 → 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.1782656027274.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 +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/mixin.js +115 -38
- package/es/table/module/custom/panel.js +492 -312
- package/es/table/module/edit/mixin.js +12 -6
- package/es/table/src/columnInfo.js +13 -7
- package/es/table/src/methods.js +105 -60
- 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.1782656027274.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 +612 -226
- 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/mixin.js +121 -35
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +383 -158
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/module/edit/mixin.js +12 -6
- package/lib/table/src/columnInfo.js +16 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +11 -10
- 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 +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/mixin.ts +115 -38
- package/packages/table/module/custom/panel.ts +545 -307
- package/packages/table/module/edit/mixin.ts +18 -6
- package/packages/table/src/columnInfo.ts +13 -7
- package/packages/table/src/methods.ts +120 -61
- package/packages/table/src/table.ts +6 -6
- 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 +13 -1
- package/es/iconfont.1782656027274.woff +0 -0
- package/es/iconfont.1782656027274.woff2 +0 -0
- package/lib/iconfont.1782656027274.woff +0 -0
- package/lib/iconfont.1782656027274.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) {
|
|
@@ -7885,8 +7940,8 @@ remainList.forEach(column=>{const width=Math.max(meanWidth,minCellWidth);column.
|
|
|
7885
7940
|
if(showAll){// 如果为 null 默认显示
|
|
7886
7941
|
if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent)){isShow=true;content=cellText;}else if(customContent!==''&&customContent!==false){// 如果为 '' | false 则不显示
|
|
7887
7942
|
isShow=true;content=''+customContent;}}else{// 如果为 null 使用默认逻辑
|
|
7888
|
-
if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent)){isShow=isOver;}else if(customContent!==''&&customContent!==false){// 如果为 '' | false 则不显示
|
|
7889
|
-
isShow=true;}content=cellText;}if(isShow&&content){const tipContent=formatText(content);Object.assign(tooltipStore,{row,column,visible:true,content:tipContent,type,currOpts:tipOpts});$xeTable.$nextTick(()=>{const $tooltip=$xeTable.$refs.refTooltip;if($tooltip&&$tooltip.open){$tooltip.open(isOver?tipOverEl:tipElem,tipContent);}});}return $xeTable.$nextTick();}function handleScrollToRowColumn($xeTable,fieldOrColumn,row,options){const internalData=$xeTable;const{fullColumnIdData}=internalData;const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(column&&fullColumnIdData[column.id]){return colToVisible($xeTable,options?options.colAlign!==false:true,column,row);}return $xeTable.$nextTick();}function handleRowExpandReserve($xeTable,row,expanded){const internalData=$xeTable;const{rowExpandedReserveRowMap}=internalData;const expandOpts=$xeTable.computeExpandOpts;if(expandOpts.reserve){const rowid=getRowid($xeTable,row);if(expanded){rowExpandedReserveRowMap[rowid]=row;}else if(rowExpandedReserveRowMap[rowid]){delete rowExpandedReserveRowMap[rowid];}}}function handleDefaultMergeCells($xeTable){const props=$xeTable;const{mergeCells}=props;if(mergeCells){$xeTable.setMergeCells(mergeCells);}}function handleDefaultMergeHeaderItems($xeTable){const props=$xeTable;const{mergeHeaderCells}=props;if(mergeHeaderCells){$xeTable.setMergeHeaderCells(mergeHeaderCells);}}function handleDefaultMergeFooterItems($xeTable){const props=$xeTable;const{mergeFooterCells,mergeFooterItems}=props;const mFooterCells=mergeFooterCells||mergeFooterItems;if(mFooterCells){$xeTable.setMergeFooterCells(mFooterCells);}}// 计算可视渲染相关数据
|
|
7943
|
+
if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent)){isShow=isOver;content=cellText;}else if(customContent!==''&&customContent!==false){// 如果为 '' | false 则不显示
|
|
7944
|
+
isShow=true;content=customContent;}else{content=cellText;}}if(isShow&&content){const tipContent=formatText(content);Object.assign(tooltipStore,{row,column,visible:true,content:tipContent,type,currOpts:tipOpts});$xeTable.$nextTick(()=>{const $tooltip=$xeTable.$refs.refTooltip;if($tooltip&&$tooltip.open){$tooltip.open(isOver?tipOverEl:tipElem,tipContent);}});}return $xeTable.$nextTick();}function handleScrollToRowColumn($xeTable,fieldOrColumn,row,options){const internalData=$xeTable;const{fullColumnIdData}=internalData;const column=handleFieldOrColumn($xeTable,fieldOrColumn);if(column&&fullColumnIdData[column.id]){return colToVisible($xeTable,options?options.colAlign!==false:true,column,row);}return $xeTable.$nextTick();}function handleRowExpandReserve($xeTable,row,expanded){const internalData=$xeTable;const{rowExpandedReserveRowMap}=internalData;const expandOpts=$xeTable.computeExpandOpts;if(expandOpts.reserve){const rowid=getRowid($xeTable,row);if(expanded){rowExpandedReserveRowMap[rowid]=row;}else if(rowExpandedReserveRowMap[rowid]){delete rowExpandedReserveRowMap[rowid];}}}function handleDefaultMergeCells($xeTable){const props=$xeTable;const{mergeCells}=props;if(mergeCells){$xeTable.setMergeCells(mergeCells);}}function handleDefaultMergeHeaderItems($xeTable){const props=$xeTable;const{mergeHeaderCells}=props;if(mergeHeaderCells){$xeTable.setMergeHeaderCells(mergeHeaderCells);}}function handleDefaultMergeFooterItems($xeTable){const props=$xeTable;const{mergeFooterCells,mergeFooterItems}=props;const mFooterCells=mergeFooterCells||mergeFooterItems;if(mFooterCells){$xeTable.setMergeFooterCells(mFooterCells);}}// 计算可视渲染相关数据
|
|
7890
7945
|
function computeScrollLoad($xeTable){const reactData=$xeTable;const internalData=$xeTable;return $xeTable.$nextTick().then(()=>{const{scrollXLoad,scrollYLoad}=reactData;const{scrollXStore,scrollYStore}=internalData;const virtualYOpts=$xeTable.computeVirtualYOpts;const virtualXOpts=$xeTable.computeVirtualXOpts;// 计算 X 逻辑
|
|
7891
7946
|
if(scrollXLoad){const{toVisibleIndex:toXVisibleIndex,visibleSize:visibleXSize}=handleVirtualXVisible($xeTable);const offsetXSize=Math.max(0,virtualXOpts.oSize?external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.oSize):0);scrollXStore.preloadSize=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(virtualXOpts.preSize);scrollXStore.offsetSize=offsetXSize;scrollXStore.visibleSize=visibleXSize;scrollXStore.endIndex=Math.max(scrollXStore.startIndex+scrollXStore.visibleSize+offsetXSize,scrollXStore.endIndex);scrollXStore.visibleStartIndex=Math.max(scrollXStore.startIndex,toXVisibleIndex);scrollXStore.visibleEndIndex=Math.min(scrollXStore.endIndex,toXVisibleIndex+visibleXSize);$xeTable.updateScrollXData().then(()=>{loadScrollXData($xeTable);});}else{$xeTable.updateScrollXSpace();}// 计算 Y 逻辑
|
|
7892
7947
|
const rowHeight=computeRowHeight($xeTable);scrollYStore.rowHeight=rowHeight;// 已废弃
|
|
@@ -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);});},/**
|
|
@@ -10915,7 +10971,9 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
10915
10971
|
$xeTable.saveCustom();
|
|
10916
10972
|
$xeTable.closeCustom();
|
|
10917
10973
|
$xeTable.emitCustomEvent('confirm', $event);
|
|
10974
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event);
|
|
10918
10975
|
$xeTable.emitCustomEvent('close', $event);
|
|
10976
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
10919
10977
|
},
|
|
10920
10978
|
cancelCloseEvent({
|
|
10921
10979
|
$event
|
|
@@ -10924,6 +10982,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
10924
10982
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
10925
10983
|
$xeTable.closeCustom();
|
|
10926
10984
|
$xeTable.emitCustomEvent('close', $event);
|
|
10985
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
10927
10986
|
},
|
|
10928
10987
|
cancelCustomEvent({
|
|
10929
10988
|
$event
|
|
@@ -10933,7 +10992,9 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
10933
10992
|
$xeTable.cancelCustom();
|
|
10934
10993
|
$xeTable.closeCustom();
|
|
10935
10994
|
$xeTable.emitCustomEvent('cancel', $event);
|
|
10995
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event);
|
|
10936
10996
|
$xeTable.emitCustomEvent('close', $event);
|
|
10997
|
+
$xeTable.dispatchEvent('custom-close', {}, $event);
|
|
10937
10998
|
},
|
|
10938
10999
|
handleResetCustomEvent(evnt) {
|
|
10939
11000
|
const $xeTableCustomPanel = this;
|
|
@@ -10941,7 +11002,9 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
10941
11002
|
$xeTable.resetCustom(true);
|
|
10942
11003
|
$xeTable.closeCustom();
|
|
10943
11004
|
$xeTable.emitCustomEvent('reset', evnt);
|
|
11005
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt);
|
|
10944
11006
|
$xeTable.emitCustomEvent('close', evnt);
|
|
11007
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
10945
11008
|
},
|
|
10946
11009
|
resetCustomEvent(evnt) {
|
|
10947
11010
|
if (core_.VxeUI.modal) {
|
|
@@ -11068,6 +11131,25 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11068
11131
|
}, evnt);
|
|
11069
11132
|
}
|
|
11070
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
|
+
},
|
|
11071
11153
|
allOptionEvent(evnt) {
|
|
11072
11154
|
const $xeTableCustomPanel = this;
|
|
11073
11155
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
@@ -11582,7 +11664,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11582
11664
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11583
11665
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11584
11666
|
const {
|
|
11585
|
-
|
|
11667
|
+
defPopupStyle
|
|
11586
11668
|
} = customStore;
|
|
11587
11669
|
const {
|
|
11588
11670
|
immediate,
|
|
@@ -11758,7 +11840,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11758
11840
|
}
|
|
11759
11841
|
}) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable), !parentItem && allowFixed ? h('div', {
|
|
11760
11842
|
class: 'vxe-table-custom--fixed-option'
|
|
11761
|
-
}, [h(VxeUIButtonComponent, {
|
|
11843
|
+
}, VxeUIButtonComponent ? [h(VxeUIButtonComponent, {
|
|
11762
11844
|
props: {
|
|
11763
11845
|
mode: 'text',
|
|
11764
11846
|
icon: column.renderFixed === 'left' ? panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : panel_getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
@@ -11788,7 +11870,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11788
11870
|
$xeTableCustomPanel.changeFixedOption(column, 'right', $event);
|
|
11789
11871
|
}
|
|
11790
11872
|
}
|
|
11791
|
-
})]) : panel_renderEmptyElement($xeTable)]));
|
|
11873
|
+
})] : []) : panel_renderEmptyElement($xeTable)]));
|
|
11792
11874
|
}
|
|
11793
11875
|
});
|
|
11794
11876
|
return h('div', {
|
|
@@ -11798,7 +11880,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11798
11880
|
[`size--${vSize}`]: vSize,
|
|
11799
11881
|
'is--active': customStore.visible
|
|
11800
11882
|
}],
|
|
11801
|
-
style:
|
|
11883
|
+
style: defPopupStyle
|
|
11802
11884
|
}, customStore.visible ? [h('div', {
|
|
11803
11885
|
ref: 'refBodyWrapperElem',
|
|
11804
11886
|
class: 'vxe-table-custom-simple--body-wrapper'
|
|
@@ -11887,48 +11969,33 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11887
11969
|
}
|
|
11888
11970
|
})])]) : null]), $xeTableCustomPanel.renderDragTip(h)])] : []);
|
|
11889
11971
|
},
|
|
11890
|
-
|
|
11891
|
-
const VxeUIModalComponent = core_.VxeUI.getComponent('VxeModal');
|
|
11892
|
-
const VxeUIDrawerComponent = core_.VxeUI.getComponent('VxeDrawer');
|
|
11972
|
+
renderPopupBodys(h) {
|
|
11893
11973
|
const VxeUIButtonComponent = core_.VxeUI.getComponent('VxeButton');
|
|
11894
11974
|
const VxeUINumberInputComponent = core_.VxeUI.getComponent('VxeNumberInput');
|
|
11975
|
+
const VxeUIRadioGroupComponent = core_.VxeUI.getComponent('VxeRadioGroup');
|
|
11895
11976
|
const $xeTableCustomPanel = this;
|
|
11896
|
-
const props = $xeTableCustomPanel;
|
|
11897
11977
|
const $xeTable = $xeTableCustomPanel.$xeTable;
|
|
11898
11978
|
const tableProps = $xeTable;
|
|
11899
11979
|
const tableReactData = $xeTable;
|
|
11900
|
-
const $xeGrid = $xeTable.$xeGrid;
|
|
11901
|
-
const $xeGantt = $xeTable.$xeGantt;
|
|
11902
11980
|
const {
|
|
11903
|
-
customStore
|
|
11904
|
-
} = props;
|
|
11905
|
-
const {
|
|
11906
|
-
treeConfig,
|
|
11907
|
-
rowGroupConfig,
|
|
11908
|
-
aggregateConfig,
|
|
11909
11981
|
resizable: allResizable
|
|
11910
11982
|
} = tableProps;
|
|
11911
11983
|
const {
|
|
11912
|
-
isCustomStatus,
|
|
11913
11984
|
customColumnList
|
|
11914
11985
|
} = tableReactData;
|
|
11915
11986
|
const customOpts = $xeTable.computeCustomOpts;
|
|
11916
11987
|
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
11917
|
-
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
11918
11988
|
const {
|
|
11919
|
-
placement: aggPlacement
|
|
11920
|
-
} = aggregateOpts;
|
|
11921
|
-
const {
|
|
11922
|
-
mode,
|
|
11923
11989
|
immediate,
|
|
11924
11990
|
showSortDragButton,
|
|
11925
11991
|
showSortMoveButton,
|
|
11926
11992
|
showSortPutButton,
|
|
11927
|
-
modalOptions,
|
|
11928
|
-
drawerOptions,
|
|
11929
11993
|
allowVisible,
|
|
11930
11994
|
allowSort,
|
|
11931
11995
|
allowFixed,
|
|
11996
|
+
allowAlign,
|
|
11997
|
+
allowHeaderAlign,
|
|
11998
|
+
allowFooterAlign,
|
|
11932
11999
|
allowResizable,
|
|
11933
12000
|
allowGroup,
|
|
11934
12001
|
allowValues,
|
|
@@ -11936,40 +12003,17 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
11936
12003
|
visibleMethod
|
|
11937
12004
|
} = customOpts;
|
|
11938
12005
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
11939
|
-
const {
|
|
11940
|
-
maxFixedSize
|
|
11941
|
-
} = columnOpts;
|
|
11942
12006
|
const resizableOpts = $xeTable.computeResizableOpts;
|
|
11943
12007
|
const {
|
|
11944
12008
|
minWidth: reMinWidth,
|
|
11945
12009
|
maxWidth: reMaxWidth
|
|
11946
12010
|
} = resizableOpts;
|
|
11947
|
-
const modalOpts = Object.assign({}, modalOptions);
|
|
11948
|
-
const drawerOpts = Object.assign({}, drawerOptions);
|
|
11949
12011
|
const isMaxFixedColumn = $xeTable.computeIsMaxFixedColumn;
|
|
11950
12012
|
const {
|
|
11951
12013
|
isCrossDrag,
|
|
11952
12014
|
isPeerDrag
|
|
11953
12015
|
} = columnDragOpts;
|
|
11954
|
-
const slots = customOpts.slots || {};
|
|
11955
|
-
const headerSlot = slots.header;
|
|
11956
|
-
const topSlot = slots.top;
|
|
11957
|
-
const bottomSlot = slots.bottom;
|
|
11958
|
-
const defaultSlot = slots.default;
|
|
11959
|
-
const footerSlot = slots.footer;
|
|
11960
12016
|
const trVNs = [];
|
|
11961
|
-
const isAllChecked = customStore.isAll;
|
|
11962
|
-
const isAllIndeterminate = customStore.isIndeterminate;
|
|
11963
|
-
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom';
|
|
11964
|
-
const params = {
|
|
11965
|
-
$table: $xeTable,
|
|
11966
|
-
$grid: $xeGrid,
|
|
11967
|
-
$gantt: $xeGantt,
|
|
11968
|
-
columns: customColumnList,
|
|
11969
|
-
isAllChecked,
|
|
11970
|
-
isAllIndeterminate,
|
|
11971
|
-
isCustomStatus
|
|
11972
|
-
};
|
|
11973
12017
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
11974
12018
|
const isVisible = visibleMethod ? visibleMethod({
|
|
11975
12019
|
$table: $xeTable,
|
|
@@ -12007,41 +12051,50 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12007
12051
|
}) : false;
|
|
12008
12052
|
const isHidden = !isChecked;
|
|
12009
12053
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12016
|
-
|
|
12017
|
-
|
|
12018
|
-
|
|
12019
|
-
|
|
12020
|
-
|
|
12021
|
-
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12025
|
-
}
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
'
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
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
|
+
}
|
|
12038
12089
|
}
|
|
12039
12090
|
}
|
|
12040
|
-
}
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
}
|
|
12044
|
-
|
|
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'
|
|
12045
12098
|
}, [h('div', {
|
|
12046
12099
|
class: 'vxe-table-custom-popup--name'
|
|
12047
12100
|
}, [allowSort && showSortDragButton || allowGroup || allowValues ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? h('div', {
|
|
@@ -12076,7 +12129,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12076
12129
|
}, VxeUIButtonComponent ? [showSortMoveButton ? h(VxeUIButtonComponent, {
|
|
12077
12130
|
props: {
|
|
12078
12131
|
mode: 'text',
|
|
12079
|
-
|
|
12132
|
+
icon: 'vxe-icon-arrows-up',
|
|
12080
12133
|
title: panel_getI18n('vxe.custom.setting.moveUpTitle'),
|
|
12081
12134
|
disabled: index <= 0
|
|
12082
12135
|
},
|
|
@@ -12088,7 +12141,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12088
12141
|
}) : panel_renderEmptyElement($xeTable), showSortMoveButton ? h(VxeUIButtonComponent, {
|
|
12089
12142
|
props: {
|
|
12090
12143
|
mode: 'text',
|
|
12091
|
-
|
|
12144
|
+
icon: 'vxe-icon-arrows-down',
|
|
12092
12145
|
title: panel_getI18n('vxe.custom.setting.moveDnTitle'),
|
|
12093
12146
|
disabled: index >= items.length - 1
|
|
12094
12147
|
},
|
|
@@ -12100,7 +12153,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12100
12153
|
}) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
|
|
12101
12154
|
props: {
|
|
12102
12155
|
mode: 'text',
|
|
12103
|
-
|
|
12156
|
+
icon: 'vxe-icon-top',
|
|
12104
12157
|
title: panel_getI18n('vxe.custom.setting.putTopTitle'),
|
|
12105
12158
|
disabled: index <= 0
|
|
12106
12159
|
},
|
|
@@ -12112,7 +12165,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12112
12165
|
}) : panel_renderEmptyElement($xeTable), showSortPutButton && !parentItem ? h(VxeUIButtonComponent, {
|
|
12113
12166
|
props: {
|
|
12114
12167
|
mode: 'text',
|
|
12115
|
-
|
|
12168
|
+
icon: 'vxe-icon-bottom',
|
|
12116
12169
|
title: panel_getI18n('vxe.custom.setting.putBottomTitle'),
|
|
12117
12170
|
disabled: index >= items.length - 1
|
|
12118
12171
|
},
|
|
@@ -12121,63 +12174,312 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12121
12174
|
$xeTableCustomPanel.sortMoveBottomEvent(evntParame, column);
|
|
12122
12175
|
}
|
|
12123
12176
|
}
|
|
12124
|
-
}) : panel_renderEmptyElement($xeTable)] : []) : panel_renderEmptyElement($xeTable)])])
|
|
12125
|
-
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12136
|
-
|
|
12137
|
-
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
|
|
12138
12190
|
},
|
|
12139
|
-
|
|
12140
|
-
|
|
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
|
+
}
|
|
12141
12199
|
}
|
|
12142
|
-
}
|
|
12143
|
-
}
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
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
|
|
12164
12306
|
},
|
|
12307
|
+
class: [`vxe-table-custom-popup--row level--${column.level}`, {
|
|
12308
|
+
'is--group': isColGroup
|
|
12309
|
+
}],
|
|
12165
12310
|
on: {
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
}) {
|
|
12170
|
-
$xeTableCustomPanel.changeFixedOption(column, label, $event);
|
|
12171
|
-
}
|
|
12311
|
+
dragstart: $xeTableCustomPanel.sortDragstartEvent,
|
|
12312
|
+
dragend: $xeTableCustomPanel.sortDragendEvent,
|
|
12313
|
+
dragover: $xeTableCustomPanel.sortDragoverEvent
|
|
12172
12314
|
}
|
|
12173
|
-
}
|
|
12315
|
+
}, tdVNs));
|
|
12174
12316
|
}
|
|
12175
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
|
+
}
|
|
12176
12475
|
const scopedSlots = {
|
|
12177
12476
|
default: () => {
|
|
12178
12477
|
return h('div', {
|
|
12179
12478
|
ref: 'refBodyWrapperElem',
|
|
12180
|
-
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
|
|
12181
12483
|
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params, h) : [!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
12182
12484
|
props: {
|
|
12183
12485
|
customStore
|
|
@@ -12189,36 +12491,13 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12189
12491
|
class: 'vxe-table-custom-popup--table-top'
|
|
12190
12492
|
}, $xeTable.callSlot(topSlot, params, h)) : panel_renderEmptyElement($xeTable), h('div', {
|
|
12191
12493
|
class: 'vxe-table-custom-popup--table-wrapper'
|
|
12192
|
-
}, [h('table', {}, [h('colgroup', {}, [
|
|
12193
|
-
class: 'vxe-table-custom-popup--table-col-seq'
|
|
12194
|
-
}) : panel_renderEmptyElement($xeTable), h('col', {
|
|
12195
|
-
class: 'vxe-table-custom-popup--table-col-title'
|
|
12196
|
-
}), allowResizable ? h('col', {
|
|
12197
|
-
class: 'vxe-table-custom-popup--table-col-width'
|
|
12198
|
-
}) : panel_renderEmptyElement($xeTable), allowFixed ? h('col', {
|
|
12199
|
-
class: 'vxe-table-custom-popup--table-col-fixed'
|
|
12200
|
-
}) : panel_renderEmptyElement($xeTable)]), h('thead', {}, [h('tr', {}, [allowVisible ? h('th', {}, [h('div', {
|
|
12201
|
-
class: ['vxe-table-custom--checkbox-option', {
|
|
12202
|
-
'is--checked': isAllChecked,
|
|
12203
|
-
'is--indeterminate': isAllIndeterminate
|
|
12204
|
-
}],
|
|
12205
|
-
attrs: {
|
|
12206
|
-
title: panel_getI18n('vxe.table.allTitle')
|
|
12207
|
-
},
|
|
12208
|
-
on: {
|
|
12209
|
-
click: $xeTableCustomPanel.allOptionEvent
|
|
12210
|
-
}
|
|
12211
|
-
}, [h('span', {
|
|
12212
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? panel_getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? panel_getIcon().TABLE_CHECKBOX_CHECKED : panel_getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
12213
|
-
}), h('span', {
|
|
12214
|
-
class: 'vxe-checkbox--label'
|
|
12215
|
-
}, 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', {
|
|
12216
12495
|
class: 'vxe-table-custom--panel-list',
|
|
12217
12496
|
props: {
|
|
12218
12497
|
tag: 'tbody',
|
|
12219
12498
|
name: 'vxe-table-custom--list'
|
|
12220
12499
|
}
|
|
12221
|
-
},
|
|
12500
|
+
}, $xeTableCustomPanel.renderPopupBodys(h))])]), bottomSlot ? h('div', {
|
|
12222
12501
|
class: 'vxe-table-custom-popup--table-bottom'
|
|
12223
12502
|
}, $xeTable.callSlot(bottomSlot, params, h)) : panel_renderEmptyElement($xeTable), $xeTableCustomPanel.renderDragTip(h)]), isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
12224
12503
|
props: {
|
|
@@ -12242,6 +12521,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12242
12521
|
}
|
|
12243
12522
|
}), immediate ? h(VxeUIButtonComponent, {
|
|
12244
12523
|
props: {
|
|
12524
|
+
status: 'primary',
|
|
12245
12525
|
content: customOpts.resetButtonText || panel_getI18n('vxe.table.customClose')
|
|
12246
12526
|
},
|
|
12247
12527
|
on: {
|
|
@@ -12294,11 +12574,11 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12294
12574
|
return VxeUIModalComponent ? h(VxeUIModalComponent, {
|
|
12295
12575
|
key: 'modal',
|
|
12296
12576
|
props: {
|
|
12297
|
-
className: ['vxe-table-custom-
|
|
12577
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
12298
12578
|
value: customStore.visible,
|
|
12299
12579
|
title: modalOpts.title || panel_getI18n('vxe.custom.cstmTitle'),
|
|
12300
|
-
width: modalOpts.width || Math.min(
|
|
12301
|
-
minWidth: modalOpts.minWidth ||
|
|
12580
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
12581
|
+
minWidth: modalOpts.minWidth || 800,
|
|
12302
12582
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
12303
12583
|
minHeight: modalOpts.minHeight || 400,
|
|
12304
12584
|
showZoom: modalOpts.showZoom,
|
|
@@ -12307,6 +12587,7 @@ function panel_hideDropTip($xeTableCustomPanel) {
|
|
|
12307
12587
|
mask: modalOpts.mask,
|
|
12308
12588
|
lockView: modalOpts.lockView,
|
|
12309
12589
|
resize: modalOpts.resize,
|
|
12590
|
+
transfer: modalOpts.transfer,
|
|
12310
12591
|
escClosable: !!modalOpts.escClosable,
|
|
12311
12592
|
maskClosable: !!modalOpts.maskClosable,
|
|
12312
12593
|
destroyOnClose: true,
|
|
@@ -15443,7 +15724,8 @@ function handleEditCell($xeTable, row, fieldOrColumn, options) {
|
|
|
15443
15724
|
* @param {*} records
|
|
15444
15725
|
*/
|
|
15445
15726
|
_insert(records) {
|
|
15446
|
-
|
|
15727
|
+
const $xeTable = this;
|
|
15728
|
+
return handleInsertRowAt($xeTable, records, null);
|
|
15447
15729
|
},
|
|
15448
15730
|
/**
|
|
15449
15731
|
* 往表格指定行中插入临时数据
|
|
@@ -15453,19 +15735,24 @@ function handleEditCell($xeTable, row, fieldOrColumn, options) {
|
|
|
15453
15735
|
* @returns
|
|
15454
15736
|
*/
|
|
15455
15737
|
_insertAt(records, targetRowOrRowid) {
|
|
15456
|
-
|
|
15738
|
+
const $xeTable = this;
|
|
15739
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid);
|
|
15457
15740
|
},
|
|
15458
15741
|
_insertNextAt(records, targetRowOrRowid) {
|
|
15459
|
-
|
|
15742
|
+
const $xeTable = this;
|
|
15743
|
+
return handleInsertRowAt($xeTable, records, targetRowOrRowid, true);
|
|
15460
15744
|
},
|
|
15461
15745
|
_insertChild(records, parentRowOrParentId) {
|
|
15462
|
-
|
|
15746
|
+
const $xeTable = this;
|
|
15747
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, null);
|
|
15463
15748
|
},
|
|
15464
15749
|
_insertChildAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
15465
|
-
|
|
15750
|
+
const $xeTable = this;
|
|
15751
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid);
|
|
15466
15752
|
},
|
|
15467
15753
|
_insertChildNextAt(records, parentRowOrParentId, targetRowOrRowid) {
|
|
15468
|
-
|
|
15754
|
+
const $xeTable = this;
|
|
15755
|
+
return handleInsertChildRowAt($xeTable, records, parentRowOrParentId, targetRowOrRowid, true);
|
|
15469
15756
|
},
|
|
15470
15757
|
/**
|
|
15471
15758
|
* 删除指定行数据
|
|
@@ -19567,6 +19854,7 @@ function beginValidate($xeTable, rows, cols, cb, isFull) {
|
|
|
19567
19854
|
|
|
19568
19855
|
|
|
19569
19856
|
|
|
19857
|
+
const customColumnCssKeys = ['checkbox', 'sort', 'title', 'width', 'fixed', 'align', 'header-align', 'footer-align'];
|
|
19570
19858
|
function updatePopupStyle($xeTable) {
|
|
19571
19859
|
const $xeGrid = $xeTable.$xeGrid;
|
|
19572
19860
|
const $xeGantt = $xeTable.$xeGantt;
|
|
@@ -19584,6 +19872,8 @@ function updatePopupStyle($xeTable) {
|
|
|
19584
19872
|
const showSimple = !(mode === 'modal' || mode === 'drawer');
|
|
19585
19873
|
const {
|
|
19586
19874
|
transfer,
|
|
19875
|
+
minWidth,
|
|
19876
|
+
maxWidth,
|
|
19587
19877
|
maxHeight
|
|
19588
19878
|
} = popupOptions || {};
|
|
19589
19879
|
const customSimpleMode = $xeTable.computeCustomSimpleMode;
|
|
@@ -19592,7 +19882,8 @@ function updatePopupStyle($xeTable) {
|
|
|
19592
19882
|
let wrapperEl = $xeTable.$refs.refElem;
|
|
19593
19883
|
let popupTop = 0;
|
|
19594
19884
|
let popupMaxHeight = 0;
|
|
19595
|
-
const
|
|
19885
|
+
const defPupStys = {};
|
|
19886
|
+
const panePupStys = {};
|
|
19596
19887
|
if ($xeGantt) {
|
|
19597
19888
|
const ganttContainerElem = $xeGantt.$refs.refGanttContainerElem;
|
|
19598
19889
|
if (ganttContainerElem) {
|
|
@@ -19622,23 +19913,40 @@ function updatePopupStyle($xeTable) {
|
|
|
19622
19913
|
}
|
|
19623
19914
|
if (!placement || !['left', 'right', 'bottom-left', 'bottom-right'].includes(placement)) {
|
|
19624
19915
|
if (popupTop) {
|
|
19625
|
-
|
|
19916
|
+
defPupStys.top = toCssUnit(popupTop);
|
|
19626
19917
|
}
|
|
19627
19918
|
}
|
|
19628
19919
|
if (showSimple && transfer) {
|
|
19629
19920
|
if (placement === 'bottom-left' || placement === 'bottom-right') {
|
|
19630
|
-
|
|
19921
|
+
defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
19631
19922
|
}
|
|
19632
19923
|
if (placement === 'top-left' || placement === 'bottom-left') {
|
|
19633
|
-
|
|
19924
|
+
defPupStys.left = toCssUnit(tableRect.left);
|
|
19634
19925
|
} else if (!placement || placement === 'top-right' || placement === 'bottom-right') {
|
|
19635
|
-
|
|
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;
|
|
19636
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);
|
|
19637
19944
|
}
|
|
19638
19945
|
if (popupMxHeight) {
|
|
19639
|
-
|
|
19946
|
+
defPupStys.maxHeight = toCssUnit(popupMxHeight);
|
|
19640
19947
|
}
|
|
19641
|
-
customStore.
|
|
19948
|
+
customStore.defPopupStyle = defPupStys;
|
|
19949
|
+
customStore.panePopupStyle = panePupStys;
|
|
19642
19950
|
customStore.maxHeight = popupMxHeight;
|
|
19643
19951
|
return $xeTable.$nextTick();
|
|
19644
19952
|
}
|
|
@@ -19737,7 +20045,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19737
20045
|
}
|
|
19738
20046
|
return $xeTable.openCustom();
|
|
19739
20047
|
},
|
|
19740
|
-
_saveCustom() {
|
|
20048
|
+
_saveCustom(isDirectly) {
|
|
19741
20049
|
const $xeTable = this;
|
|
19742
20050
|
const reactData = $xeTable;
|
|
19743
20051
|
const internalData = $xeTable;
|
|
@@ -19752,39 +20060,61 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19752
20060
|
allowSort,
|
|
19753
20061
|
allowFixed,
|
|
19754
20062
|
allowResizable,
|
|
20063
|
+
allowAlign,
|
|
20064
|
+
allowHeaderAlign,
|
|
20065
|
+
allowFooterAlign,
|
|
19755
20066
|
allowGroup,
|
|
19756
20067
|
allowValues
|
|
19757
20068
|
} = customOpts;
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
|
|
19763
|
-
|
|
19764
|
-
const sortIndex = index + 1;
|
|
19765
|
-
column.renderSortNumber = sortIndex;
|
|
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
|
+
}
|
|
19766
20075
|
}
|
|
19767
|
-
|
|
19768
|
-
|
|
20076
|
+
});
|
|
20077
|
+
} else {
|
|
20078
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
20079
|
+
if (parentColumn) {
|
|
20080
|
+
// 更新子列信息
|
|
20081
|
+
column.fixed = parentColumn.fixed;
|
|
20082
|
+
} else {
|
|
20083
|
+
if (allowSort) {
|
|
20084
|
+
const sortIndex = index + 1;
|
|
20085
|
+
column.renderSortNumber = sortIndex;
|
|
20086
|
+
}
|
|
20087
|
+
if (allowFixed) {
|
|
20088
|
+
column.fixed = column.renderFixed;
|
|
20089
|
+
}
|
|
19769
20090
|
}
|
|
19770
|
-
|
|
19771
|
-
|
|
19772
|
-
|
|
19773
|
-
|
|
19774
|
-
|
|
19775
|
-
|
|
20091
|
+
if (allowResizable) {
|
|
20092
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
20093
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
20094
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
20095
|
+
column.renderWidth = column.renderResizeWidth;
|
|
20096
|
+
}
|
|
19776
20097
|
}
|
|
19777
20098
|
}
|
|
19778
|
-
|
|
19779
|
-
|
|
19780
|
-
|
|
19781
|
-
|
|
19782
|
-
|
|
19783
|
-
|
|
19784
|
-
|
|
19785
|
-
|
|
20099
|
+
if (allowVisible) {
|
|
20100
|
+
column.visible = column.renderVisible;
|
|
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
|
+
}
|
|
20111
|
+
if (allowGroup && allowValues) {
|
|
20112
|
+
column.aggFunc = column.renderAggFn;
|
|
20113
|
+
}
|
|
20114
|
+
});
|
|
20115
|
+
}
|
|
19786
20116
|
reactData.isCustomStatus = true;
|
|
19787
|
-
if (allowGroup &&
|
|
20117
|
+
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
19788
20118
|
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
19789
20119
|
// 更新数据分组
|
|
19790
20120
|
if (aggHandleFields.length) {
|
|
@@ -19819,7 +20149,12 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19819
20149
|
allowVisible,
|
|
19820
20150
|
allowSort,
|
|
19821
20151
|
allowFixed,
|
|
19822
|
-
|
|
20152
|
+
allowAlign,
|
|
20153
|
+
allowHeaderAlign,
|
|
20154
|
+
allowFooterAlign,
|
|
20155
|
+
allowResizable,
|
|
20156
|
+
allowGroup,
|
|
20157
|
+
allowValues
|
|
19823
20158
|
} = customOpts;
|
|
19824
20159
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(customColumnList, column => {
|
|
19825
20160
|
const colid = column.getKey();
|
|
@@ -19839,6 +20174,21 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19839
20174
|
if (allowResizable) {
|
|
19840
20175
|
column.renderResizeWidth = column.renderWidth;
|
|
19841
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
|
+
}
|
|
19842
20192
|
}, {
|
|
19843
20193
|
children: 'children'
|
|
19844
20194
|
});
|
|
@@ -19863,7 +20213,10 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19863
20213
|
resizable: options === true,
|
|
19864
20214
|
fixed: options === true,
|
|
19865
20215
|
sort: options === true,
|
|
19866
|
-
aggFunc: options === true
|
|
20216
|
+
aggFunc: options === true,
|
|
20217
|
+
align: options === true,
|
|
20218
|
+
headerAlign: options === true,
|
|
20219
|
+
footerAlign: options === true
|
|
19867
20220
|
}, options);
|
|
19868
20221
|
const allCols = [];
|
|
19869
20222
|
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn, column => {
|
|
@@ -19872,6 +20225,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19872
20225
|
}
|
|
19873
20226
|
if (opts.fixed) {
|
|
19874
20227
|
column.fixed = column.defaultFixed;
|
|
20228
|
+
column.renderFixed = column.defaultFixed;
|
|
19875
20229
|
}
|
|
19876
20230
|
if (opts.sort) {
|
|
19877
20231
|
column.renderSortNumber = column.sortNumber;
|
|
@@ -19883,6 +20237,18 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
19883
20237
|
})) {
|
|
19884
20238
|
column.visible = column.defaultVisible;
|
|
19885
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
|
+
}
|
|
19886
20252
|
if (opts.aggFunc) {
|
|
19887
20253
|
column.aggFunc = column.defaultAggFunc;
|
|
19888
20254
|
column.renderAggFn = column.defaultAggFunc;
|
|
@@ -20021,10 +20387,12 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
20021
20387
|
if (customStore.visible) {
|
|
20022
20388
|
$xeTable.closeCustom();
|
|
20023
20389
|
emitCustomEvent($xeTable, 'close', evnt);
|
|
20390
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
20024
20391
|
} else {
|
|
20025
20392
|
customStore.btnEl = evnt.target;
|
|
20026
20393
|
$xeTable.openCustom();
|
|
20027
20394
|
emitCustomEvent($xeTable, 'open', evnt);
|
|
20395
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
20028
20396
|
}
|
|
20029
20397
|
},
|
|
20030
20398
|
customOpenEvent(evnt) {
|
|
@@ -20038,6 +20406,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
20038
20406
|
customStore.btnEl = evnt.target;
|
|
20039
20407
|
$xeTable.openCustom();
|
|
20040
20408
|
emitCustomEvent($xeTable, 'open', evnt);
|
|
20409
|
+
$xeTable.dispatchEvent('custom-open', {}, evnt);
|
|
20041
20410
|
}
|
|
20042
20411
|
},
|
|
20043
20412
|
customCloseEvent(evnt) {
|
|
@@ -20050,6 +20419,7 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
20050
20419
|
customStore.activeBtn = false;
|
|
20051
20420
|
$xeTable.closeCustom();
|
|
20052
20421
|
emitCustomEvent($xeTable, 'close', evnt);
|
|
20422
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt);
|
|
20053
20423
|
}
|
|
20054
20424
|
},
|
|
20055
20425
|
handleUpdateCustomColumn() {
|
|
@@ -20071,6 +20441,9 @@ function emitCustomEvent($xeTable, type, evnt) {
|
|
|
20071
20441
|
column.renderFixed = column.fixed;
|
|
20072
20442
|
column.renderVisible = column.visible;
|
|
20073
20443
|
column.renderResizeWidth = column.renderWidth;
|
|
20444
|
+
column.renderAlign = column.align;
|
|
20445
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
20446
|
+
column.renderFooterAlign = column.footerAlign;
|
|
20074
20447
|
sortMaps[colid] = column.renderSortNumber;
|
|
20075
20448
|
fixedMaps[colid] = column.fixed;
|
|
20076
20449
|
visibleMaps[colid] = column.visible;
|
|
@@ -27881,10 +28254,16 @@ const Toolbar = VxeToolbar;
|
|
|
27881
28254
|
colResizable: '列宽(像素)',
|
|
27882
28255
|
colVisible: '是否显示',
|
|
27883
28256
|
colFixed: '冻结列',
|
|
27884
|
-
colFixedMax: '
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
28257
|
+
colFixedMax: '冻结列({0})',
|
|
28258
|
+
colAlign: '对齐方式',
|
|
28259
|
+
colHeadAlign: '表头对齐方式',
|
|
28260
|
+
colFootAlign: '表尾对齐方式',
|
|
28261
|
+
fixedLeft: '左',
|
|
28262
|
+
fixedUnset: '无',
|
|
28263
|
+
fixedRight: '右',
|
|
28264
|
+
alignLeft: '左',
|
|
28265
|
+
alignCenter: '中',
|
|
28266
|
+
alignRight: '右',
|
|
27888
28267
|
moveUp: '上移',
|
|
27889
28268
|
moveDn: '下移',
|
|
27890
28269
|
putTop: '置顶',
|
|
@@ -27892,7 +28271,10 @@ const Toolbar = VxeToolbar;
|
|
|
27892
28271
|
moveUpTitle: '点击向上移动',
|
|
27893
28272
|
moveDnTitle: '点击向下移动',
|
|
27894
28273
|
putTopTitle: '点击置顶',
|
|
27895
|
-
putBottomTitle: '点击置尾'
|
|
28274
|
+
putBottomTitle: '点击置尾',
|
|
28275
|
+
anLeftTitle: '左对齐',
|
|
28276
|
+
anCenterTitle: '居中',
|
|
28277
|
+
anRightTitle: '右对齐'
|
|
27896
28278
|
}
|
|
27897
28279
|
},
|
|
27898
28280
|
import: {
|
|
@@ -27993,6 +28375,10 @@ const Toolbar = VxeToolbar;
|
|
|
27993
28375
|
fixedRight: '冻结在右侧',
|
|
27994
28376
|
cancelFixed: '取消冻结列'
|
|
27995
28377
|
},
|
|
28378
|
+
iconPicker: {
|
|
28379
|
+
search: '搜索',
|
|
28380
|
+
emptyText: '暂无数据'
|
|
28381
|
+
},
|
|
27996
28382
|
datePicker: {
|
|
27997
28383
|
yearTitle: '{0} 年'
|
|
27998
28384
|
},
|