vxe-table 3.21.22 → 3.21.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/{iconfont.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
- package/es/iconfont.1783331230583.woff +0 -0
- package/es/iconfont.1783331230583.woff2 +0 -0
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +12 -3
- package/es/locale/lang/de-DE.js +12 -3
- package/es/locale/lang/en-US.js +16 -7
- package/es/locale/lang/es-ES.js +12 -3
- package/es/locale/lang/fr-FR.js +12 -3
- package/es/locale/lang/hu-HU.js +12 -3
- package/es/locale/lang/hy-AM.js +12 -3
- package/es/locale/lang/id-ID.js +12 -3
- package/es/locale/lang/it-IT.js +11 -2
- package/es/locale/lang/ja-JP.js +12 -3
- package/es/locale/lang/ko-KR.js +12 -3
- package/es/locale/lang/ms-MY.js +12 -3
- package/es/locale/lang/nb-NO.js +12 -3
- package/es/locale/lang/pt-BR.js +12 -3
- package/es/locale/lang/ru-RU.js +12 -3
- package/es/locale/lang/th-TH.js +12 -3
- package/es/locale/lang/ug-CN.js +12 -3
- package/es/locale/lang/uk-UA.js +12 -3
- package/es/locale/lang/uz-UZ.js +12 -3
- package/es/locale/lang/vi-VN.js +11 -2
- package/es/locale/lang/zh-CHT.js +14 -5
- package/es/locale/lang/zh-CN.js +14 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/custom/mixin.js +84 -13
- package/es/table/module/custom/panel.js +485 -312
- package/es/table/src/cell.js +2 -2
- package/es/table/src/columnInfo.js +13 -7
- package/es/table/src/methods.js +102 -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.1782890276645.ttf → iconfont.1783331230583.ttf} +0 -0
- package/lib/iconfont.1783331230583.woff +0 -0
- package/lib/iconfont.1783331230583.woff2 +0 -0
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +560 -196
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +12 -3
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +12 -3
- package/lib/locale/lang/de-DE.js +12 -3
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +12 -3
- package/lib/locale/lang/en-US.js +16 -7
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +16 -7
- package/lib/locale/lang/es-ES.js +12 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +12 -3
- package/lib/locale/lang/fr-FR.js +12 -3
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +12 -3
- package/lib/locale/lang/hu-HU.js +12 -3
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +12 -3
- package/lib/locale/lang/hy-AM.js +12 -3
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +12 -3
- package/lib/locale/lang/id-ID.js +12 -3
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +12 -3
- package/lib/locale/lang/it-IT.js +11 -2
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +11 -2
- package/lib/locale/lang/ja-JP.js +12 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +12 -3
- package/lib/locale/lang/ko-KR.js +12 -3
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +12 -3
- package/lib/locale/lang/ms-MY.js +12 -3
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +12 -3
- package/lib/locale/lang/nb-NO.js +12 -3
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +12 -3
- package/lib/locale/lang/pt-BR.js +12 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +12 -3
- package/lib/locale/lang/ru-RU.js +12 -3
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +12 -3
- package/lib/locale/lang/th-TH.js +12 -3
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +12 -3
- package/lib/locale/lang/ug-CN.js +12 -3
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +12 -3
- package/lib/locale/lang/uk-UA.js +12 -3
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +12 -3
- package/lib/locale/lang/uz-UZ.js +12 -3
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +12 -3
- package/lib/locale/lang/vi-VN.js +11 -2
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +11 -2
- package/lib/locale/lang/zh-CHT.js +14 -5
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +14 -5
- package/lib/locale/lang/zh-CN.js +14 -5
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +14 -5
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/custom/mixin.js +91 -11
- package/lib/table/module/custom/mixin.min.js +1 -1
- package/lib/table/module/custom/panel.js +376 -158
- package/lib/table/module/custom/panel.min.js +1 -1
- package/lib/table/src/cell.js +2 -1
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +16 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +10 -9
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +35 -1
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +96 -49
- package/lib/table/style/style.min.css +1 -1
- package/lib/ui/index.js +16 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-table/style/style.css +96 -49
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/locale/lang/ar-EG.ts +12 -3
- package/packages/locale/lang/de-DE.ts +12 -3
- package/packages/locale/lang/en-US.ts +16 -7
- package/packages/locale/lang/es-ES.ts +12 -3
- package/packages/locale/lang/fr-FR.ts +12 -3
- package/packages/locale/lang/hu-HU.ts +12 -3
- package/packages/locale/lang/hy-AM.ts +12 -3
- package/packages/locale/lang/id-ID.ts +12 -3
- package/packages/locale/lang/it-IT.ts +11 -2
- package/packages/locale/lang/ja-JP.ts +12 -3
- package/packages/locale/lang/ko-KR.ts +12 -3
- package/packages/locale/lang/ms-MY.ts +12 -3
- package/packages/locale/lang/nb-NO.ts +12 -3
- package/packages/locale/lang/pt-BR.ts +12 -3
- package/packages/locale/lang/ru-RU.ts +12 -3
- package/packages/locale/lang/th-TH.ts +12 -3
- package/packages/locale/lang/ug-CN.ts +12 -3
- package/packages/locale/lang/uk-UA.ts +12 -3
- package/packages/locale/lang/uz-UZ.ts +12 -3
- package/packages/locale/lang/vi-VN.ts +11 -2
- package/packages/locale/lang/zh-CHT.ts +14 -5
- package/packages/locale/lang/zh-CN.ts +14 -5
- package/packages/table/module/custom/mixin.ts +85 -14
- package/packages/table/module/custom/panel.ts +538 -307
- package/packages/table/src/cell.ts +2 -2
- package/packages/table/src/columnInfo.ts +13 -7
- package/packages/table/src/methods.ts +118 -61
- package/packages/table/src/util.ts +34 -1
- package/packages/ui/index.ts +15 -3
- package/styles/components/icon.scss +29 -2
- package/styles/components/table-module/custom.scss +88 -67
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +11 -0
- package/es/iconfont.1782890276645.woff +0 -0
- package/es/iconfont.1782890276645.woff2 +0 -0
- package/lib/iconfont.1782890276645.woff +0 -0
- package/lib/iconfont.1782890276645.woff2 +0 -0
package/es/table/src/cell.js
CHANGED
|
@@ -533,7 +533,7 @@ export const Cell = {
|
|
|
533
533
|
const treeOpts = $table.computeTreeOpts;
|
|
534
534
|
const { row, column, level } = params;
|
|
535
535
|
const { slots } = column;
|
|
536
|
-
const { padding, indent, lazy, trigger, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
536
|
+
const { padding, indent, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
537
537
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
538
538
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
539
539
|
const rowChilds = row[childrenField];
|
|
@@ -573,7 +573,7 @@ export const Cell = {
|
|
|
573
573
|
}
|
|
574
574
|
: undefined
|
|
575
575
|
}, [
|
|
576
|
-
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild)
|
|
576
|
+
showIcon && (lazy ? (isLazyLoaded ? hasChild : (hasChild || hasLazyChilds)) : hasChild) && (!visibleMethod || visibleMethod(params))
|
|
577
577
|
? [
|
|
578
578
|
h('div', {
|
|
579
579
|
class: 'vxe-cell--tree-btn',
|
|
@@ -13,7 +13,7 @@ export class ColumnInfo {
|
|
|
13
13
|
const $xeGrid = $xeTable.$xeGrid;
|
|
14
14
|
const $xeGantt = $xeTable.$xeGantt;
|
|
15
15
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
16
|
-
const { type, field, width, visible, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
|
|
16
|
+
const { type, field, width, visible, fixed, align, headerAlign, footerAlign, aggFunc, formatter, filterMultiple, cellRender, editRender, filterRender } = colConfs;
|
|
17
17
|
const colId = colConfs.colId || XEUtils.uniqueId('col_');
|
|
18
18
|
const proxyOpts = $xeGrid ? $xeGrid.computeProxyOpts : null;
|
|
19
19
|
const defaultVisible = XEUtils.isBoolean(visible) ? visible : true;
|
|
@@ -82,10 +82,10 @@ export class ColumnInfo {
|
|
|
82
82
|
minWidth: colConfs.minWidth,
|
|
83
83
|
maxWidth: colConfs.maxWidth,
|
|
84
84
|
resizable: colConfs.resizable,
|
|
85
|
-
fixed
|
|
86
|
-
align
|
|
87
|
-
headerAlign
|
|
88
|
-
footerAlign
|
|
85
|
+
fixed,
|
|
86
|
+
align,
|
|
87
|
+
headerAlign,
|
|
88
|
+
footerAlign,
|
|
89
89
|
showOverflow: colConfs.showOverflow,
|
|
90
90
|
showHeaderOverflow: colConfs.showHeaderOverflow,
|
|
91
91
|
showFooterOverflow: colConfs.showFooterOverflow,
|
|
@@ -126,7 +126,7 @@ export class ColumnInfo {
|
|
|
126
126
|
titleHelp: colConfs.titleHelp,
|
|
127
127
|
titlePrefix: colConfs.titlePrefix,
|
|
128
128
|
titleSuffix: colConfs.titleSuffix,
|
|
129
|
-
aggFunc
|
|
129
|
+
aggFunc,
|
|
130
130
|
copyMethod: colConfs.copyMethod,
|
|
131
131
|
cutMethod: colConfs.cutMethod,
|
|
132
132
|
pasteMethod: colConfs.pasteMethod,
|
|
@@ -140,7 +140,10 @@ export class ColumnInfo {
|
|
|
140
140
|
defaultParentId: null,
|
|
141
141
|
halfVisible: false,
|
|
142
142
|
defaultVisible: defaultVisible,
|
|
143
|
-
defaultFixed:
|
|
143
|
+
defaultFixed: fixed,
|
|
144
|
+
defaultAlign: align,
|
|
145
|
+
defaultHeaderAlign: headerAlign,
|
|
146
|
+
defaultFooterAlign: footerAlign,
|
|
144
147
|
defaultAggFunc: colConfs.aggFunc,
|
|
145
148
|
checked: false,
|
|
146
149
|
halfChecked: false,
|
|
@@ -160,6 +163,9 @@ export class ColumnInfo {
|
|
|
160
163
|
renderAggFn: '',
|
|
161
164
|
renderAggDigits: null,
|
|
162
165
|
renderAggFormat: null,
|
|
166
|
+
renderAlign: '',
|
|
167
|
+
renderHeaderAlign: '',
|
|
168
|
+
renderFooterAlign: '',
|
|
163
169
|
renderFixed: '',
|
|
164
170
|
renderVisible: false,
|
|
165
171
|
renderWidth: defaultRenderWidth,
|
package/es/table/src/methods.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, wheelScrollLe
|
|
|
3
3
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import Cell from './cell';
|
|
6
|
-
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight } from './util';
|
|
6
|
+
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, getColReMaxWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn, getRowMaxHeight, handleCustomStoreConfig } from './util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
9
9
|
import { createComponentLog } from '../../ui/src/log';
|
|
@@ -31,9 +31,6 @@ function eqCellValue(newRow, oldRow, field) {
|
|
|
31
31
|
}
|
|
32
32
|
return { newValue: val1, oldValue: val2, result };
|
|
33
33
|
}
|
|
34
|
-
function hangleStorageDefaultValue(value, isAll) {
|
|
35
|
-
return XEUtils.isBoolean(value) ? value : isAll;
|
|
36
|
-
}
|
|
37
34
|
function getNextSortOrder($xeTable, column) {
|
|
38
35
|
const sortOpts = $xeTable.computeSortOpts;
|
|
39
36
|
const { orders = [] } = sortOpts;
|
|
@@ -127,19 +124,18 @@ function handleCustomRestore($xeTable, storeData) {
|
|
|
127
124
|
const internalData = $xeTable;
|
|
128
125
|
const { aggregateConfig, rowGroupConfig } = props;
|
|
129
126
|
const { collectColumn } = internalData;
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const isAllCustom = storage === true;
|
|
133
|
-
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
134
|
-
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
135
|
-
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
136
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
137
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
138
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
139
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
140
|
-
let { resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
|
|
127
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
128
|
+
let { alignData, headerAlignData, footerAlignData, resizableData, sortData, visibleData, fixedData, aggGroupData, aggFuncData } = storeData;
|
|
141
129
|
// 处理还原
|
|
142
|
-
if ((
|
|
130
|
+
if ((isCustomAlign && alignData) ||
|
|
131
|
+
(isCustomHeaderAlign && headerAlignData) ||
|
|
132
|
+
(isCustomFooterAlign && footerAlignData) ||
|
|
133
|
+
(isCustomResizable && resizableData) ||
|
|
134
|
+
(isCustomSort && sortData) ||
|
|
135
|
+
(isCustomVisible && visibleData) ||
|
|
136
|
+
(isCustomFixed && fixedData) ||
|
|
137
|
+
(isCustomAggGroup && aggGroupData) ||
|
|
138
|
+
(isCustomAggFunc && aggFuncData)) {
|
|
143
139
|
const sortColMaps = {};
|
|
144
140
|
if (isCustomSort && sortData) {
|
|
145
141
|
// 转换兼容老版本数据,即将废弃兼容
|
|
@@ -223,15 +219,19 @@ function restoreCustomStorage($xeTable) {
|
|
|
223
219
|
const { customConfig } = props;
|
|
224
220
|
const tableId = $xeTable.computeTableId;
|
|
225
221
|
const customOpts = $xeTable.computeCustomOpts;
|
|
226
|
-
const { storage, restoreStore
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
222
|
+
const { storage, restoreStore } = customOpts;
|
|
223
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
224
|
+
if (storage &&
|
|
225
|
+
(customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
|
|
226
|
+
(isCustomAlign ||
|
|
227
|
+
isCustomHeaderAlign ||
|
|
228
|
+
isCustomFooterAlign ||
|
|
229
|
+
isCustomResizable ||
|
|
230
|
+
isCustomVisible ||
|
|
231
|
+
isCustomFixed ||
|
|
232
|
+
isCustomSort ||
|
|
233
|
+
isCustomAggGroup ||
|
|
234
|
+
isCustomAggFunc)) {
|
|
235
235
|
if (!tableId) {
|
|
236
236
|
errLog('vxe.error.reqProp', ['id']);
|
|
237
237
|
return;
|
|
@@ -446,8 +446,9 @@ function handleBaseTreeExpand($xeTable, rows, expanded) {
|
|
|
446
446
|
const result = [];
|
|
447
447
|
const columnIndex = $xeTable.getColumnIndex(treeNodeColumn);
|
|
448
448
|
const $columnIndex = $xeTable.getVMColumnIndex(treeNodeColumn);
|
|
449
|
+
const _columnIndex = $xeTable.getVTColumnIndex(treeNodeColumn);
|
|
449
450
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
450
|
-
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
|
|
451
|
+
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, _columnIndex, row })) : rows;
|
|
451
452
|
if (accordion) {
|
|
452
453
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
453
454
|
// 同一级只能展开一个
|
|
@@ -6397,15 +6398,19 @@ const tableMethods = {
|
|
|
6397
6398
|
const { customConfig } = props;
|
|
6398
6399
|
const tableId = $xeTable.computeTableId;
|
|
6399
6400
|
const customOpts = $xeTable.computeCustomOpts;
|
|
6400
|
-
const { storage, restoreStore
|
|
6401
|
-
const
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6401
|
+
const { storage, restoreStore } = customOpts;
|
|
6402
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
6403
|
+
if (storage &&
|
|
6404
|
+
(customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
|
|
6405
|
+
(isCustomAlign ||
|
|
6406
|
+
isCustomHeaderAlign ||
|
|
6407
|
+
isCustomFooterAlign ||
|
|
6408
|
+
isCustomResizable ||
|
|
6409
|
+
isCustomVisible ||
|
|
6410
|
+
isCustomFixed ||
|
|
6411
|
+
isCustomSort ||
|
|
6412
|
+
isCustomAggGroup ||
|
|
6413
|
+
isCustomAggFunc)) {
|
|
6409
6414
|
if (!tableId) {
|
|
6410
6415
|
errLog('vxe.error.reqProp', ['id']);
|
|
6411
6416
|
return;
|
|
@@ -6450,6 +6455,9 @@ const tableMethods = {
|
|
|
6450
6455
|
if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
|
|
6451
6456
|
column.visible = column.defaultVisible;
|
|
6452
6457
|
}
|
|
6458
|
+
column.align = column.defaultAlign;
|
|
6459
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
6460
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
6453
6461
|
column.aggFunc = column.defaultAggFunc;
|
|
6454
6462
|
column.renderAggFn = column.defaultAggFunc;
|
|
6455
6463
|
column.renderResizeWidth = column.renderWidth;
|
|
@@ -6495,15 +6503,11 @@ const tableMethods = {
|
|
|
6495
6503
|
const customOpts = $xeTable.computeCustomOpts;
|
|
6496
6504
|
const { isRowGroupStatus, rowGroupList } = reactData;
|
|
6497
6505
|
const { fullColumnFieldData, collectColumn } = internalData;
|
|
6498
|
-
const { storage, checkMethod
|
|
6499
|
-
const
|
|
6500
|
-
const
|
|
6501
|
-
const
|
|
6502
|
-
const
|
|
6503
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
6504
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
6505
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
6506
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
6506
|
+
const { storage, checkMethod } = customOpts;
|
|
6507
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
6508
|
+
const alignData = {};
|
|
6509
|
+
const headerAlignData = {};
|
|
6510
|
+
const footerAlignData = {};
|
|
6507
6511
|
const resizableData = {};
|
|
6508
6512
|
const sortData = [];
|
|
6509
6513
|
const visibleData = {};
|
|
@@ -6511,6 +6515,9 @@ const tableMethods = {
|
|
|
6511
6515
|
const aggGroupData = {};
|
|
6512
6516
|
const aggFuncData = {};
|
|
6513
6517
|
const storeData = {
|
|
6518
|
+
alignData: undefined,
|
|
6519
|
+
headerAlignData: undefined,
|
|
6520
|
+
footerAlignData: undefined,
|
|
6514
6521
|
resizableData: undefined,
|
|
6515
6522
|
sortData: undefined,
|
|
6516
6523
|
visibleData: undefined,
|
|
@@ -6524,6 +6531,9 @@ const tableMethods = {
|
|
|
6524
6531
|
}
|
|
6525
6532
|
return storeData;
|
|
6526
6533
|
}
|
|
6534
|
+
let hasAlign = 0;
|
|
6535
|
+
let hasHeaderAlign = 0;
|
|
6536
|
+
let hasFooterAlign = 0;
|
|
6527
6537
|
let hasResizable = 0;
|
|
6528
6538
|
let hasSort = 0;
|
|
6529
6539
|
let hasFixed = 0;
|
|
@@ -6564,6 +6574,18 @@ const tableMethods = {
|
|
|
6564
6574
|
fixedData[colKey] = column.fixed;
|
|
6565
6575
|
}
|
|
6566
6576
|
}
|
|
6577
|
+
if (isCustomAlign && column.align) {
|
|
6578
|
+
hasAlign = 1;
|
|
6579
|
+
alignData[colKey] = column.align;
|
|
6580
|
+
}
|
|
6581
|
+
if (isCustomHeaderAlign && column.headerAlign) {
|
|
6582
|
+
hasHeaderAlign = 1;
|
|
6583
|
+
headerAlignData[colKey] = column.headerAlign;
|
|
6584
|
+
}
|
|
6585
|
+
if (isCustomFooterAlign && column.footerAlign) {
|
|
6586
|
+
hasFooterAlign = 1;
|
|
6587
|
+
footerAlignData[colKey] = column.footerAlign;
|
|
6588
|
+
}
|
|
6567
6589
|
if (isCustomResizable && column.resizeWidth) {
|
|
6568
6590
|
hasResizable = 1;
|
|
6569
6591
|
resizableData[colKey] = column.renderWidth;
|
|
@@ -6583,6 +6605,15 @@ const tableMethods = {
|
|
|
6583
6605
|
aggFuncData[colKey] = column.aggFunc;
|
|
6584
6606
|
}
|
|
6585
6607
|
});
|
|
6608
|
+
if (hasAlign) {
|
|
6609
|
+
storeData.alignData = alignData;
|
|
6610
|
+
}
|
|
6611
|
+
if (hasHeaderAlign) {
|
|
6612
|
+
storeData.headerAlignData = headerAlignData;
|
|
6613
|
+
}
|
|
6614
|
+
if (hasFooterAlign) {
|
|
6615
|
+
storeData.footerAlignData = footerAlignData;
|
|
6616
|
+
}
|
|
6586
6617
|
if (hasResizable) {
|
|
6587
6618
|
storeData.resizableData = resizableData;
|
|
6588
6619
|
}
|
|
@@ -6619,33 +6650,40 @@ const tableMethods = {
|
|
|
6619
6650
|
const { customConfig } = props;
|
|
6620
6651
|
const tableId = $xeTable.computeTableId;
|
|
6621
6652
|
const customOpts = $xeTable.computeCustomOpts;
|
|
6622
|
-
const { updateStore, storage
|
|
6623
|
-
const
|
|
6624
|
-
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
6625
|
-
const isCustomResizable = hangleStorageDefaultValue(storageOpts.resizable, isAllCustom);
|
|
6626
|
-
const isCustomVisible = hangleStorageDefaultValue(storageOpts.visible, isAllCustom);
|
|
6627
|
-
const isCustomFixed = hangleStorageDefaultValue(storageOpts.fixed, isAllCustom);
|
|
6628
|
-
const isCustomSort = hangleStorageDefaultValue(storageOpts.sort, isAllCustom);
|
|
6629
|
-
const isCustomAggGroup = hangleStorageDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
6630
|
-
const isCustomAggFunc = hangleStorageDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
6653
|
+
const { updateStore, storage } = customOpts;
|
|
6654
|
+
const { isCustomAlign, isCustomHeaderAlign, isCustomFooterAlign, isCustomResizable, isCustomVisible, isCustomFixed, isCustomSort, isCustomAggGroup, isCustomAggFunc } = handleCustomStoreConfig($xeTable);
|
|
6631
6655
|
if (type !== 'reset') {
|
|
6656
|
+
// fix:修复拖动列宽,重置按钮无法点击的问题
|
|
6632
6657
|
reactData.isCustomStatus = true;
|
|
6633
6658
|
}
|
|
6634
|
-
if (storage &&
|
|
6659
|
+
if (storage &&
|
|
6660
|
+
(customConfig ? isEnableConf(customOpts) : customOpts.enabled) &&
|
|
6661
|
+
(isCustomAlign ||
|
|
6662
|
+
isCustomHeaderAlign ||
|
|
6663
|
+
isCustomFooterAlign ||
|
|
6664
|
+
isCustomResizable ||
|
|
6665
|
+
isCustomVisible ||
|
|
6666
|
+
isCustomFixed ||
|
|
6667
|
+
isCustomSort ||
|
|
6668
|
+
isCustomAggGroup ||
|
|
6669
|
+
isCustomAggFunc)) {
|
|
6635
6670
|
if (!tableId) {
|
|
6636
6671
|
errLog('vxe.error.reqProp', ['id']);
|
|
6637
|
-
return
|
|
6672
|
+
return $xeTable.$nextTick();
|
|
6638
6673
|
}
|
|
6639
6674
|
const storeData = type === 'reset'
|
|
6640
6675
|
? {
|
|
6676
|
+
alignData: {},
|
|
6677
|
+
headerAlignData: {},
|
|
6678
|
+
footerAlignData: {},
|
|
6641
6679
|
resizableData: {},
|
|
6642
|
-
sortData:
|
|
6680
|
+
sortData: [],
|
|
6643
6681
|
visibleData: {},
|
|
6644
6682
|
fixedData: {},
|
|
6645
6683
|
aggGroupData: {},
|
|
6646
6684
|
aggFuncData: {}
|
|
6647
6685
|
}
|
|
6648
|
-
:
|
|
6686
|
+
: $xeTable.getCustomStoreData();
|
|
6649
6687
|
if (updateStore) {
|
|
6650
6688
|
return updateStore({
|
|
6651
6689
|
$table: $xeTable,
|
|
@@ -6658,13 +6696,17 @@ const tableMethods = {
|
|
|
6658
6696
|
setCustomStorageMap(tableId, type === 'reset' ? null : storeData);
|
|
6659
6697
|
}
|
|
6660
6698
|
}
|
|
6661
|
-
return
|
|
6699
|
+
return $xeTable.$nextTick();
|
|
6662
6700
|
},
|
|
6663
6701
|
handleUpdateDataQueue() {
|
|
6664
|
-
this
|
|
6702
|
+
const $xeTable = this;
|
|
6703
|
+
const reactData = $xeTable;
|
|
6704
|
+
reactData.upDataFlag++;
|
|
6665
6705
|
},
|
|
6666
6706
|
handleRefreshColumnQueue() {
|
|
6667
|
-
this
|
|
6707
|
+
const $xeTable = this;
|
|
6708
|
+
const reactData = $xeTable;
|
|
6709
|
+
reactData.reColumnFlag++;
|
|
6668
6710
|
},
|
|
6669
6711
|
handleFilterOptions(column) {
|
|
6670
6712
|
const $xeTable = this;
|
package/es/table/src/util.js
CHANGED
|
@@ -219,7 +219,8 @@ export function createReactData() {
|
|
|
219
219
|
activeWrapper: false,
|
|
220
220
|
visible: false,
|
|
221
221
|
maxHeight: null,
|
|
222
|
-
|
|
222
|
+
defPopupStyle: {},
|
|
223
|
+
panePopupStyle: {},
|
|
223
224
|
oldSortMaps: {},
|
|
224
225
|
oldFixedMaps: {},
|
|
225
226
|
oldVisibleMaps: {}
|
|
@@ -1011,3 +1012,32 @@ export function colToVisible($xeTable, isForce, column, row) {
|
|
|
1011
1012
|
}
|
|
1012
1013
|
return Promise.resolve();
|
|
1013
1014
|
}
|
|
1015
|
+
function hangleBolleanDefaultValue(currVal, defVal) {
|
|
1016
|
+
return XEUtils.isBoolean(currVal) ? currVal : defVal;
|
|
1017
|
+
}
|
|
1018
|
+
export function handleCustomStoreConfig($xeTable) {
|
|
1019
|
+
const customOpts = $xeTable.computeCustomOpts;
|
|
1020
|
+
const { storage, storeOptions } = customOpts;
|
|
1021
|
+
const isAllCustom = storage === true;
|
|
1022
|
+
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
1023
|
+
const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
|
|
1024
|
+
const isCustomHeaderAlign = hangleBolleanDefaultValue(storageOpts.headerAlign, isAllCustom);
|
|
1025
|
+
const isCustomFooterAlign = hangleBolleanDefaultValue(storageOpts.footerAlign, isAllCustom);
|
|
1026
|
+
const isCustomResizable = hangleBolleanDefaultValue(storageOpts.resizable, isAllCustom);
|
|
1027
|
+
const isCustomVisible = hangleBolleanDefaultValue(storageOpts.visible, isAllCustom);
|
|
1028
|
+
const isCustomFixed = hangleBolleanDefaultValue(storageOpts.fixed, isAllCustom);
|
|
1029
|
+
const isCustomSort = hangleBolleanDefaultValue(storageOpts.sort, isAllCustom);
|
|
1030
|
+
const isCustomAggGroup = hangleBolleanDefaultValue(storageOpts.aggGroup, isAllCustom);
|
|
1031
|
+
const isCustomAggFunc = hangleBolleanDefaultValue(storageOpts.aggFunc, isAllCustom);
|
|
1032
|
+
return {
|
|
1033
|
+
isCustomAlign,
|
|
1034
|
+
isCustomHeaderAlign,
|
|
1035
|
+
isCustomFooterAlign,
|
|
1036
|
+
isCustomResizable,
|
|
1037
|
+
isCustomVisible,
|
|
1038
|
+
isCustomFixed,
|
|
1039
|
+
isCustomSort,
|
|
1040
|
+
isCustomAggGroup,
|
|
1041
|
+
isCustomAggFunc
|
|
1042
|
+
};
|
|
1043
|
+
}
|