vxe-table 3.20.0-beta.8 → 3.20.0
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/grid/src/grid.js +23 -18
- package/es/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/locale/lang/ar-EG.js +6 -0
- package/es/locale/lang/de-DE.js +6 -0
- package/es/locale/lang/en-US.js +6 -0
- package/es/locale/lang/es-ES.js +6 -0
- package/es/locale/lang/fr-FR.js +6 -0
- package/es/locale/lang/hu-HU.js +6 -0
- package/es/locale/lang/hy-AM.js +6 -0
- package/es/locale/lang/id-ID.js +6 -0
- package/es/locale/lang/it-IT.js +6 -0
- package/es/locale/lang/ja-JP.js +6 -0
- package/es/locale/lang/ko-KR.js +6 -0
- package/es/locale/lang/ms-MY.js +6 -0
- package/es/locale/lang/nb-NO.js +6 -0
- package/es/locale/lang/pt-BR.js +6 -0
- package/es/locale/lang/ru-RU.js +6 -0
- package/es/locale/lang/th-TH.js +6 -0
- package/es/locale/lang/ug-CN.js +6 -0
- package/es/locale/lang/uk-UA.js +6 -0
- package/es/locale/lang/uz-UZ.js +6 -0
- package/es/locale/lang/vi-VN.js +6 -0
- package/es/locale/lang/zh-CHT.js +6 -0
- package/es/locale/lang/zh-CN.js +6 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +15 -1
- package/es/table/module/keyboard/mixin.js +18 -8
- package/es/table/module/validator/mixin.js +7 -6
- package/es/table/render/index.js +11 -0
- package/es/table/src/body.js +12 -5
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/methods.js +199 -73
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +68 -7
- package/es/table/src/util.js +38 -20
- package/es/table/style.css +11 -17
- package/es/table/style.min.css +1 -1
- package/es/toolbar/src/toolbar.js +10 -5
- package/es/ui/index.js +7 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +11 -17
- package/es/vxe-table/style.min.css +1 -1
- package/lib/grid/src/grid.js +23 -18
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +275 -100
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/ar-EG.js +6 -0
- package/lib/locale/lang/ar-EG.min.js +1 -1
- package/lib/locale/lang/ar-EG.umd.js +6 -0
- package/lib/locale/lang/de-DE.js +6 -0
- package/lib/locale/lang/de-DE.min.js +1 -1
- package/lib/locale/lang/de-DE.umd.js +6 -0
- package/lib/locale/lang/en-US.js +6 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +6 -0
- package/lib/locale/lang/es-ES.js +6 -0
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +6 -0
- package/lib/locale/lang/fr-FR.js +6 -0
- package/lib/locale/lang/fr-FR.min.js +1 -1
- package/lib/locale/lang/fr-FR.umd.js +6 -0
- package/lib/locale/lang/hu-HU.js +6 -0
- package/lib/locale/lang/hu-HU.min.js +1 -1
- package/lib/locale/lang/hu-HU.umd.js +6 -0
- package/lib/locale/lang/hy-AM.js +6 -0
- package/lib/locale/lang/hy-AM.min.js +1 -1
- package/lib/locale/lang/hy-AM.umd.js +6 -0
- package/lib/locale/lang/id-ID.js +6 -0
- package/lib/locale/lang/id-ID.min.js +1 -1
- package/lib/locale/lang/id-ID.umd.js +6 -0
- package/lib/locale/lang/it-IT.js +6 -0
- package/lib/locale/lang/it-IT.min.js +1 -1
- package/lib/locale/lang/it-IT.umd.js +6 -0
- package/lib/locale/lang/ja-JP.js +6 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +6 -0
- package/lib/locale/lang/ko-KR.js +6 -0
- package/lib/locale/lang/ko-KR.min.js +1 -1
- package/lib/locale/lang/ko-KR.umd.js +6 -0
- package/lib/locale/lang/ms-MY.js +6 -0
- package/lib/locale/lang/ms-MY.min.js +1 -1
- package/lib/locale/lang/ms-MY.umd.js +6 -0
- package/lib/locale/lang/nb-NO.js +6 -0
- package/lib/locale/lang/nb-NO.min.js +1 -1
- package/lib/locale/lang/nb-NO.umd.js +6 -0
- package/lib/locale/lang/pt-BR.js +6 -0
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +6 -0
- package/lib/locale/lang/ru-RU.js +6 -0
- package/lib/locale/lang/ru-RU.min.js +1 -1
- package/lib/locale/lang/ru-RU.umd.js +6 -0
- package/lib/locale/lang/th-TH.js +6 -0
- package/lib/locale/lang/th-TH.min.js +1 -1
- package/lib/locale/lang/th-TH.umd.js +6 -0
- package/lib/locale/lang/ug-CN.js +6 -0
- package/lib/locale/lang/ug-CN.min.js +1 -1
- package/lib/locale/lang/ug-CN.umd.js +6 -0
- package/lib/locale/lang/uk-UA.js +6 -0
- package/lib/locale/lang/uk-UA.min.js +1 -1
- package/lib/locale/lang/uk-UA.umd.js +6 -0
- package/lib/locale/lang/uz-UZ.js +6 -0
- package/lib/locale/lang/uz-UZ.min.js +1 -1
- package/lib/locale/lang/uz-UZ.umd.js +6 -0
- package/lib/locale/lang/vi-VN.js +6 -0
- package/lib/locale/lang/vi-VN.min.js +1 -1
- package/lib/locale/lang/vi-VN.umd.js +6 -0
- package/lib/locale/lang/zh-CHT.js +6 -0
- package/lib/locale/lang/zh-CHT.min.js +1 -1
- package/lib/locale/lang/zh-CHT.umd.js +6 -0
- package/lib/locale/lang/zh-CN.js +6 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +6 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +18 -6
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +18 -4
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/module/validator/mixin.js +8 -6
- package/lib/table/module/validator/mixin.min.js +1 -1
- package/lib/table/render/index.js +15 -0
- package/lib/table/render/index.min.js +1 -1
- package/lib/table/src/body.js +13 -4
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/columnInfo.js +2 -0
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +806 -14157
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +4 -0
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +78 -6
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +41 -21
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +11 -17
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/src/toolbar.js +10 -5
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/ui/index.js +7 -1
- 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 +11 -17
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/grid/src/grid.ts +23 -18
- package/packages/locale/lang/ar-EG.ts +6 -0
- package/packages/locale/lang/de-DE.ts +6 -0
- package/packages/locale/lang/en-US.ts +6 -0
- package/packages/locale/lang/es-ES.ts +6 -0
- package/packages/locale/lang/fr-FR.ts +6 -0
- package/packages/locale/lang/hu-HU.ts +6 -0
- package/packages/locale/lang/hy-AM.ts +6 -0
- package/packages/locale/lang/id-ID.ts +6 -0
- package/packages/locale/lang/it-IT.ts +6 -0
- package/packages/locale/lang/ja-JP.ts +6 -0
- package/packages/locale/lang/ko-KR.ts +6 -0
- package/packages/locale/lang/ms-MY.ts +6 -0
- package/packages/locale/lang/nb-NO.ts +6 -0
- package/packages/locale/lang/pt-BR.ts +6 -0
- package/packages/locale/lang/ru-RU.ts +6 -0
- package/packages/locale/lang/th-TH.ts +6 -0
- package/packages/locale/lang/ug-CN.ts +6 -0
- package/packages/locale/lang/uk-UA.ts +6 -0
- package/packages/locale/lang/uz-UZ.ts +6 -0
- package/packages/locale/lang/vi-VN.ts +6 -0
- package/packages/locale/lang/zh-CHT.ts +6 -0
- package/packages/locale/lang/zh-CN.ts +6 -0
- package/packages/table/module/export/mixin.ts +13 -1
- package/packages/table/module/keyboard/mixin.ts +21 -12
- package/packages/table/module/validator/mixin.ts +7 -6
- package/packages/table/render/index.ts +12 -0
- package/packages/table/src/body.ts +12 -5
- package/packages/table/src/columnInfo.ts +2 -0
- package/packages/table/src/methods.ts +192 -72
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +75 -8
- package/packages/table/src/util.ts +43 -19
- package/packages/toolbar/src/toolbar.ts +11 -5
- package/packages/ui/index.ts +6 -0
- package/styles/components/table-module/filter.scss +1 -1
- package/styles/components/table-module/menu.scss +4 -9
- package/styles/components/table.scss +8 -2
- package/styles/theme/base.scss +0 -1
- /package/es/{iconfont.1768463274097.ttf → iconfont.1773027250443.ttf} +0 -0
- /package/es/{iconfont.1768463274097.woff → iconfont.1773027250443.woff} +0 -0
- /package/es/{iconfont.1768463274097.woff2 → iconfont.1773027250443.woff2} +0 -0
- /package/lib/{iconfont.1768463274097.ttf → iconfont.1773027250443.ttf} +0 -0
- /package/lib/{iconfont.1768463274097.woff → iconfont.1773027250443.woff} +0 -0
- /package/lib/{iconfont.1768463274097.woff2 → iconfont.1773027250443.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, scrollTopTo,
|
|
|
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, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn } from './util';
|
|
6
|
+
import { getRowUniqueId, createRowId, clearTableAllStatus, getColumnList, toFilters, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleRowidOrRow, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, getRootColumn, getColReMinWidth, createHandleUpdateRowId, createHandleGetRowId, getRefElem, getCellRestHeight, getLastChildColumn } from './util';
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
8
|
import { moveRowAnimateToTb, clearRowAnimate, moveColAnimateToLr, clearColAnimate } from '../../ui/src/anime';
|
|
9
9
|
import { warnLog, errLog } from '../../ui/src/log';
|
|
@@ -203,6 +203,7 @@ function handleCustomRestore($xeTable, storeData) {
|
|
|
203
203
|
const newCollectCols = XEUtils.toArrayTree(XEUtils.orderBy(allCols, 'renderSortNumber'), { key: 'id', parentKey: 'parentId', children: 'children' });
|
|
204
204
|
internalData.collectColumn = newCollectCols;
|
|
205
205
|
internalData.tableFullColumn = getColumnList(newCollectCols);
|
|
206
|
+
reactData.updateColFlag++;
|
|
206
207
|
}
|
|
207
208
|
reactData.isCustomStatus = true;
|
|
208
209
|
}
|
|
@@ -356,14 +357,19 @@ function cacheColumnMap($xeTable) {
|
|
|
356
357
|
else {
|
|
357
358
|
tableFullColumn.forEach(handleFunc);
|
|
358
359
|
}
|
|
359
|
-
if (expandColumn
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
360
|
+
if (expandColumn) {
|
|
361
|
+
if (expandOpts.mode !== 'fixed' && virtualYOpts.enabled) {
|
|
362
|
+
warnLog('vxe.error.notConflictProp', ['column.type="expand', 'virtual-y-config.enabled=false']);
|
|
363
|
+
}
|
|
364
|
+
if ((expandOpts.mode !== 'fixed') && mouseOpts.area) {
|
|
365
|
+
errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
|
|
366
|
+
}
|
|
367
|
+
if (expandOpts.mode !== 'inside' && (treeConfig && !treeOpts.transform)) {
|
|
368
|
+
errLog('vxe.error.notConflictProp', ['tree-config.transform=false', 'expand-config.mode=fixed']);
|
|
369
|
+
}
|
|
370
|
+
if (props.spanMethod) {
|
|
371
|
+
warnLog('vxe.error.notSupportProp', ['column.type=expand', 'span-method', 'span-method=null']);
|
|
372
|
+
}
|
|
367
373
|
}
|
|
368
374
|
if (htmlColumn) {
|
|
369
375
|
if (!columnOpts.useKey) {
|
|
@@ -2812,12 +2818,12 @@ function handleTooltip($xeTable, evnt, tipOpts, type, tdEl, overflowElem, tipEle
|
|
|
2812
2818
|
}
|
|
2813
2819
|
return $xeTable.$nextTick();
|
|
2814
2820
|
}
|
|
2815
|
-
function handleScrollToRowColumn($xeTable, fieldOrColumn, row) {
|
|
2821
|
+
function handleScrollToRowColumn($xeTable, fieldOrColumn, row, options) {
|
|
2816
2822
|
const internalData = $xeTable;
|
|
2817
2823
|
const { fullColumnIdData } = internalData;
|
|
2818
2824
|
const column = handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
2819
2825
|
if (column && fullColumnIdData[column.id]) {
|
|
2820
|
-
return colToVisible($xeTable, column, row);
|
|
2826
|
+
return colToVisible($xeTable, options ? options.colAlign !== false : true, column, row);
|
|
2821
2827
|
}
|
|
2822
2828
|
return $xeTable.$nextTick();
|
|
2823
2829
|
}
|
|
@@ -3165,6 +3171,7 @@ function handleGroupData($xeTable, list, rowGroups) {
|
|
|
3165
3171
|
if (rowGroups) {
|
|
3166
3172
|
const aggregateOpts = $xeTable.computeAggregateOpts;
|
|
3167
3173
|
const { rowField, parentField, childrenField, mapChildrenField } = aggregateOpts;
|
|
3174
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
3168
3175
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
3169
3176
|
const { checkField } = checkboxOpts;
|
|
3170
3177
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
@@ -3200,10 +3207,10 @@ function handleGroupData($xeTable, list, rowGroups) {
|
|
|
3200
3207
|
childCount: 0,
|
|
3201
3208
|
[rowField]: getRowUniqueId(),
|
|
3202
3209
|
[parentField]: null,
|
|
3203
|
-
[rowkey]: getRowUniqueId(),
|
|
3204
3210
|
[childrenField]: childTreeData,
|
|
3205
3211
|
[mapChildrenField]: childTreeData
|
|
3206
3212
|
};
|
|
3213
|
+
aggRow[rowkey] = createRowId(rowOpts, aggRow, rowkey);
|
|
3207
3214
|
if (checkField) {
|
|
3208
3215
|
aggRow[checkField] = false;
|
|
3209
3216
|
}
|
|
@@ -3490,11 +3497,13 @@ function handleTableColumn($xeTable) {
|
|
|
3490
3497
|
reactData.tableColumn = tableColumn;
|
|
3491
3498
|
}
|
|
3492
3499
|
function handleUpdateColumn($xeTable) {
|
|
3500
|
+
const reactData = $xeTable;
|
|
3493
3501
|
const internalData = $xeTable;
|
|
3494
3502
|
const columnList = XEUtils.orderBy(internalData.collectColumn, 'renderSortNumber');
|
|
3495
3503
|
internalData.collectColumn = columnList;
|
|
3496
|
-
const
|
|
3497
|
-
internalData.tableFullColumn =
|
|
3504
|
+
const tFullColumn = getColumnList(columnList);
|
|
3505
|
+
internalData.tableFullColumn = tFullColumn;
|
|
3506
|
+
reactData.updateColFlag++;
|
|
3498
3507
|
cacheColumnMap($xeTable);
|
|
3499
3508
|
}
|
|
3500
3509
|
function loadScrollXData($xeTable) {
|
|
@@ -3686,8 +3695,9 @@ function handleInitColumn($xeTable, collectColumn) {
|
|
|
3686
3695
|
const internalData = $xeTable;
|
|
3687
3696
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
3688
3697
|
internalData.collectColumn = collectColumn;
|
|
3689
|
-
const
|
|
3690
|
-
internalData.tableFullColumn =
|
|
3698
|
+
const tFullColumn = getColumnList(collectColumn);
|
|
3699
|
+
internalData.tableFullColumn = tFullColumn;
|
|
3700
|
+
reactData.updateColFlag++;
|
|
3691
3701
|
reactData.isColLoading = true;
|
|
3692
3702
|
initColumnHierarchy($xeTable);
|
|
3693
3703
|
return Promise.resolve(restoreCustomStorage($xeTable)).then(() => {
|
|
@@ -4065,7 +4075,7 @@ function updateRowExpandStyle($xeTable) {
|
|
|
4065
4075
|
const rowid = expandEl.getAttribute('rowid') || '';
|
|
4066
4076
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
4067
4077
|
if (rowRest) {
|
|
4068
|
-
const expandHeight = expandEl.offsetHeight
|
|
4078
|
+
const expandHeight = expandEl.offsetHeight;
|
|
4069
4079
|
const trEl = bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);
|
|
4070
4080
|
let offsetTop = 0;
|
|
4071
4081
|
if (scrollYLoad) {
|
|
@@ -4821,6 +4831,7 @@ const tableMethods = {
|
|
|
4821
4831
|
const expandOpts = $xeTable.computeExpandOpts;
|
|
4822
4832
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
4823
4833
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
4834
|
+
const rowOpts = $xeTable.computeRowOpts;
|
|
4824
4835
|
const checkboxOpts = $xeTable.computeCheckboxOpts;
|
|
4825
4836
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
4826
4837
|
const rowkey = getRowkey($xeTable);
|
|
@@ -4855,7 +4866,7 @@ const tableMethods = {
|
|
|
4855
4866
|
}
|
|
4856
4867
|
// 必须有行数据的唯一主键,可以自行设置;也可以默认生成一个随机数
|
|
4857
4868
|
if (eqEmptyValue(XEUtils.get(record, rowkey))) {
|
|
4858
|
-
XEUtils.set(record, rowkey,
|
|
4869
|
+
XEUtils.set(record, rowkey, createRowId(rowOpts, record, rowkey));
|
|
4859
4870
|
}
|
|
4860
4871
|
return record;
|
|
4861
4872
|
});
|
|
@@ -5201,9 +5212,10 @@ const tableMethods = {
|
|
|
5201
5212
|
const $xeTable = this;
|
|
5202
5213
|
const props = $xeTable;
|
|
5203
5214
|
const internalData = $xeTable;
|
|
5204
|
-
const { keepSource } = props;
|
|
5205
|
-
const {
|
|
5206
|
-
|
|
5215
|
+
const { keepSource, editConfig } = props;
|
|
5216
|
+
const { fullDataRowIdData, sourceDataRowIdData } = internalData;
|
|
5217
|
+
const keepFields = $xeTable.computeKeepFields;
|
|
5218
|
+
if (keepSource && editConfig) {
|
|
5207
5219
|
const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
|
|
5208
5220
|
const rowRest = fullDataRowIdData[rowid];
|
|
5209
5221
|
// 新增的数据不需要检测
|
|
@@ -5216,9 +5228,8 @@ const tableMethods = {
|
|
|
5216
5228
|
if (arguments.length > 1) {
|
|
5217
5229
|
return !eqCellValue(oRow, row, field);
|
|
5218
5230
|
}
|
|
5219
|
-
for (let
|
|
5220
|
-
|
|
5221
|
-
if (property && !eqCellValue(oRow, row, property)) {
|
|
5231
|
+
for (let i = 0; i < keepFields.length; i++) {
|
|
5232
|
+
if (!eqCellValue(oRow, row, keepFields[i])) {
|
|
5222
5233
|
return true;
|
|
5223
5234
|
}
|
|
5224
5235
|
}
|
|
@@ -6769,13 +6780,15 @@ const tableMethods = {
|
|
|
6769
6780
|
if (ctxMenuStore.visible && tableMenu && !getEventTargetNode(evnt, tableMenu.$el).flag) {
|
|
6770
6781
|
$xeTable.closeMenu();
|
|
6771
6782
|
}
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6783
|
+
if (!(actived.row && getEventTargetNode(evnt, document.body, 'vxe-table--ignore-clear').flag)) {
|
|
6784
|
+
const isActivated = getEventTargetNode(evnt, ($xeGGWrapper || $xeTable).$el).flag;
|
|
6785
|
+
// 如果存在校验,点击了表格之外则清除
|
|
6786
|
+
if (!isActivated && editRules && validOpts.autoClear) {
|
|
6787
|
+
reactData.validErrorMaps = {};
|
|
6788
|
+
}
|
|
6789
|
+
// 最后激活的表格
|
|
6790
|
+
internalData.isActivated = isActivated;
|
|
6776
6791
|
}
|
|
6777
|
-
// 最后激活的表格
|
|
6778
|
-
internalData.isActivated = isActivated;
|
|
6779
6792
|
},
|
|
6780
6793
|
/**
|
|
6781
6794
|
* 窗口失焦事件处理
|
|
@@ -6849,7 +6862,7 @@ const tableMethods = {
|
|
|
6849
6862
|
$xeTable.preventEvent(evnt, 'event.keydown', null, () => {
|
|
6850
6863
|
const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props;
|
|
6851
6864
|
const { ctxMenuStore, editStore, currentRow } = reactData;
|
|
6852
|
-
const { afterFullData } = internalData;
|
|
6865
|
+
const { afterFullData, visibleColumn } = internalData;
|
|
6853
6866
|
const isContentMenu = $xeTable.computeIsContentMenu;
|
|
6854
6867
|
const bodyMenu = $xeTable.computeBodyMenu;
|
|
6855
6868
|
const keyboardOpts = $xeTable.computeKeyboardOpts;
|
|
@@ -6859,6 +6872,7 @@ const tableMethods = {
|
|
|
6859
6872
|
const menuList = $xeTable.computeMenuList;
|
|
6860
6873
|
const rowOpts = $xeTable.computeRowOpts;
|
|
6861
6874
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
6875
|
+
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod, isLastTabAppendRow, beforeTabMethod, tabMethod } = keyboardOpts;
|
|
6862
6876
|
const { selected, actived } = editStore;
|
|
6863
6877
|
const { keyCode } = evnt;
|
|
6864
6878
|
const hasBackspaceKey = keyCode === 8;
|
|
@@ -6941,7 +6955,6 @@ const tableMethods = {
|
|
|
6941
6955
|
}, 1000);
|
|
6942
6956
|
}
|
|
6943
6957
|
else if (isEnter && !hasAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || (treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow))) {
|
|
6944
|
-
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod } = keyboardOpts;
|
|
6945
6958
|
// 退出选中
|
|
6946
6959
|
if (isControlKey) {
|
|
6947
6960
|
// 如果是激活编辑状态,则取消编辑
|
|
@@ -6957,6 +6970,8 @@ const tableMethods = {
|
|
|
6957
6970
|
else {
|
|
6958
6971
|
// 如果是激活状态,退则出到上一行/下一行
|
|
6959
6972
|
if (selected.row || actived.row) {
|
|
6973
|
+
const activeRow = selected.row || actived.row;
|
|
6974
|
+
const activeColumn = selected.column || actived.column;
|
|
6960
6975
|
const activeParams = selected.row ? selected.args : actived.args;
|
|
6961
6976
|
if (hasShiftKey) {
|
|
6962
6977
|
if (keyboardOpts.enterToTab) {
|
|
@@ -6967,13 +6982,46 @@ const tableMethods = {
|
|
|
6967
6982
|
}
|
|
6968
6983
|
}
|
|
6969
6984
|
else {
|
|
6985
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
6986
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
6970
6987
|
if (keyboardOpts.enterToTab) {
|
|
6971
|
-
|
|
6988
|
+
const ttrParams = {
|
|
6989
|
+
row: activeRow,
|
|
6990
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
6991
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
6992
|
+
_rowIndex,
|
|
6993
|
+
column: activeColumn,
|
|
6994
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
6995
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
6996
|
+
_columnIndex,
|
|
6997
|
+
$table: $xeTable
|
|
6998
|
+
};
|
|
6999
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7000
|
+
evnt.preventDefault();
|
|
7001
|
+
// 最后一行按下Tab键,自动追加一行
|
|
7002
|
+
if (isLastTabAppendRow) {
|
|
7003
|
+
const newColumn = visibleColumn[0];
|
|
7004
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7005
|
+
if (actived.row) {
|
|
7006
|
+
$xeTable.handleClearEdit(evnt);
|
|
7007
|
+
}
|
|
7008
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7009
|
+
$xeTable.scrollToRow(newRow, newColumn);
|
|
7010
|
+
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
7011
|
+
});
|
|
7012
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt);
|
|
7013
|
+
return;
|
|
7014
|
+
}
|
|
7015
|
+
}
|
|
7016
|
+
if (tabMethod) {
|
|
7017
|
+
tabMethod(ttrParams);
|
|
7018
|
+
}
|
|
7019
|
+
else {
|
|
7020
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7021
|
+
}
|
|
7022
|
+
}
|
|
6972
7023
|
}
|
|
6973
7024
|
else {
|
|
6974
|
-
const activeRow = selected.row || actived.row;
|
|
6975
|
-
const activeColumn = selected.column || actived.column;
|
|
6976
|
-
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
6977
7025
|
const etrParams = {
|
|
6978
7026
|
row: activeRow,
|
|
6979
7027
|
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
@@ -6982,10 +7030,11 @@ const tableMethods = {
|
|
|
6982
7030
|
column: activeColumn,
|
|
6983
7031
|
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
6984
7032
|
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
6985
|
-
_columnIndex
|
|
7033
|
+
_columnIndex,
|
|
6986
7034
|
$table: $xeTable
|
|
6987
7035
|
};
|
|
6988
7036
|
if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
|
|
7037
|
+
evnt.preventDefault();
|
|
6989
7038
|
// 最后一行按下回车键,自动追加一行
|
|
6990
7039
|
if (isLastEnterAppendRow) {
|
|
6991
7040
|
if (_rowIndex >= afterFullData.length - 1) {
|
|
@@ -6997,10 +7046,15 @@ const tableMethods = {
|
|
|
6997
7046
|
return;
|
|
6998
7047
|
}
|
|
6999
7048
|
}
|
|
7000
|
-
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7001
7049
|
if (enterMethod) {
|
|
7002
7050
|
enterMethod(etrParams);
|
|
7003
7051
|
}
|
|
7052
|
+
else {
|
|
7053
|
+
if (actived.row) {
|
|
7054
|
+
$xeTable.handleClearEdit(evnt);
|
|
7055
|
+
}
|
|
7056
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7057
|
+
}
|
|
7004
7058
|
}
|
|
7005
7059
|
}
|
|
7006
7060
|
}
|
|
@@ -7044,11 +7098,50 @@ const tableMethods = {
|
|
|
7044
7098
|
}
|
|
7045
7099
|
else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
7046
7100
|
// 如果按下了 Tab 键切换
|
|
7047
|
-
if (selected.row ||
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
$xeTable.
|
|
7101
|
+
if (selected.row || actived.row) {
|
|
7102
|
+
const activeRow = selected.row || actived.row;
|
|
7103
|
+
const activeColumn = selected.column || actived.column;
|
|
7104
|
+
const activeParams = selected.row ? selected.args : actived.args;
|
|
7105
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7106
|
+
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
7107
|
+
const ttrParams = {
|
|
7108
|
+
row: activeRow,
|
|
7109
|
+
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7110
|
+
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7111
|
+
_rowIndex,
|
|
7112
|
+
column: activeColumn,
|
|
7113
|
+
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7114
|
+
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7115
|
+
_columnIndex,
|
|
7116
|
+
$table: $xeTable
|
|
7117
|
+
};
|
|
7118
|
+
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7119
|
+
evnt.preventDefault();
|
|
7120
|
+
// 最后一行按下Tab键,自动追加一行
|
|
7121
|
+
if (isLastTabAppendRow) {
|
|
7122
|
+
const newColumn = visibleColumn[0];
|
|
7123
|
+
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7124
|
+
if (actived.row) {
|
|
7125
|
+
$xeTable.handleClearEdit(evnt);
|
|
7126
|
+
}
|
|
7127
|
+
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7128
|
+
$xeTable.scrollToRow(newRow, newColumn);
|
|
7129
|
+
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
7130
|
+
});
|
|
7131
|
+
$xeTable.dispatchEvent('tab-append-row', ttrParams, evnt);
|
|
7132
|
+
return;
|
|
7133
|
+
}
|
|
7134
|
+
}
|
|
7135
|
+
if (tabMethod) {
|
|
7136
|
+
tabMethod(ttrParams);
|
|
7137
|
+
}
|
|
7138
|
+
else {
|
|
7139
|
+
if (actived.row) {
|
|
7140
|
+
$xeTable.handleClearEdit(evnt);
|
|
7141
|
+
}
|
|
7142
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7143
|
+
}
|
|
7144
|
+
}
|
|
7052
7145
|
}
|
|
7053
7146
|
}
|
|
7054
7147
|
else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
@@ -8147,7 +8240,7 @@ const tableMethods = {
|
|
|
8147
8240
|
const { selectRadioRow: oldValue } = reactData;
|
|
8148
8241
|
const { row } = params;
|
|
8149
8242
|
const radioOpts = $xeTable.computeRadioOpts;
|
|
8150
|
-
const { trigger, checkMethod } = radioOpts;
|
|
8243
|
+
const { trigger, strict, checkMethod } = radioOpts;
|
|
8151
8244
|
if (trigger === 'manual') {
|
|
8152
8245
|
return;
|
|
8153
8246
|
}
|
|
@@ -8158,7 +8251,7 @@ const tableMethods = {
|
|
|
8158
8251
|
if (isChange) {
|
|
8159
8252
|
handleCheckedRadioRow($xeTable, newValue);
|
|
8160
8253
|
}
|
|
8161
|
-
else if (!
|
|
8254
|
+
else if (!strict) {
|
|
8162
8255
|
isChange = oldValue === newValue;
|
|
8163
8256
|
if (isChange) {
|
|
8164
8257
|
newValue = null;
|
|
@@ -8178,13 +8271,25 @@ const tableMethods = {
|
|
|
8178
8271
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
8179
8272
|
const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
|
|
8180
8273
|
const { column: newValue } = params;
|
|
8181
|
-
const { trigger } = currentColumnOpts;
|
|
8274
|
+
const { trigger, strict } = currentColumnOpts;
|
|
8182
8275
|
if (trigger === 'manual') {
|
|
8183
8276
|
return;
|
|
8184
8277
|
}
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8278
|
+
let isChange = oldValue !== newValue;
|
|
8279
|
+
const selected = !isChange;
|
|
8280
|
+
if (!beforeRowMethod || beforeRowMethod({ column: newValue, selected, $table: $xeTable })) {
|
|
8281
|
+
if (strict) {
|
|
8282
|
+
$xeTable.setCurrentColumn(newValue);
|
|
8283
|
+
}
|
|
8284
|
+
else {
|
|
8285
|
+
isChange = true;
|
|
8286
|
+
if (selected) {
|
|
8287
|
+
$xeTable.clearCurrentColumn();
|
|
8288
|
+
}
|
|
8289
|
+
else {
|
|
8290
|
+
$xeTable.setCurrentColumn(newValue);
|
|
8291
|
+
}
|
|
8292
|
+
}
|
|
8188
8293
|
if (isChange) {
|
|
8189
8294
|
$xeTable.dispatchEvent('current-column-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8190
8295
|
}
|
|
@@ -8201,13 +8306,25 @@ const tableMethods = {
|
|
|
8201
8306
|
const currentRowOpts = $xeTable.computeCurrentRowOpts;
|
|
8202
8307
|
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
|
|
8203
8308
|
const { row: newValue } = params;
|
|
8204
|
-
const { trigger } = currentRowOpts;
|
|
8309
|
+
const { trigger, strict } = currentRowOpts;
|
|
8205
8310
|
if (trigger === 'manual') {
|
|
8206
8311
|
return;
|
|
8207
8312
|
}
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8313
|
+
let isChange = oldValue !== newValue;
|
|
8314
|
+
const selected = !isChange;
|
|
8315
|
+
if (!beforeRowMethod || beforeRowMethod({ row: newValue, selected, $table: $xeTable })) {
|
|
8316
|
+
if (strict) {
|
|
8317
|
+
$xeTable.setCurrentRow(newValue);
|
|
8318
|
+
}
|
|
8319
|
+
else {
|
|
8320
|
+
isChange = true;
|
|
8321
|
+
if (selected) {
|
|
8322
|
+
$xeTable.clearCurrentRow();
|
|
8323
|
+
}
|
|
8324
|
+
else {
|
|
8325
|
+
$xeTable.setCurrentRow(newValue);
|
|
8326
|
+
}
|
|
8327
|
+
}
|
|
8211
8328
|
if (isChange) {
|
|
8212
8329
|
$xeTable.dispatchEvent('current-row-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8213
8330
|
// 已废弃
|
|
@@ -8843,12 +8960,14 @@ const tableMethods = {
|
|
|
8843
8960
|
if (isPeerDrag && !isCrossDrag) {
|
|
8844
8961
|
if (oldRest.row[parentField] !== newRest.row[parentField]) {
|
|
8845
8962
|
// 非同级
|
|
8846
|
-
|
|
8963
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8964
|
+
return Promise.resolve(errRest);
|
|
8847
8965
|
}
|
|
8848
8966
|
}
|
|
8849
8967
|
else {
|
|
8850
8968
|
if (!isCrossDrag) {
|
|
8851
|
-
|
|
8969
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8970
|
+
return Promise.resolve(errRest);
|
|
8852
8971
|
}
|
|
8853
8972
|
if (oldAllMaps[newRowid]) {
|
|
8854
8973
|
isSelfToChildStatus = true;
|
|
@@ -8859,7 +8978,8 @@ const tableMethods = {
|
|
|
8859
8978
|
content: getI18n('vxe.error.treeDragChild')
|
|
8860
8979
|
});
|
|
8861
8980
|
}
|
|
8862
|
-
|
|
8981
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8982
|
+
return Promise.resolve(errRest);
|
|
8863
8983
|
}
|
|
8864
8984
|
}
|
|
8865
8985
|
}
|
|
@@ -8867,13 +8987,15 @@ const tableMethods = {
|
|
|
8867
8987
|
else if (oldLevel) {
|
|
8868
8988
|
// 子到根
|
|
8869
8989
|
if (!isCrossDrag) {
|
|
8870
|
-
|
|
8990
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8991
|
+
return Promise.resolve(errRest);
|
|
8871
8992
|
}
|
|
8872
8993
|
}
|
|
8873
8994
|
else if (newLevel) {
|
|
8874
8995
|
// 根到子
|
|
8875
8996
|
if (!isCrossDrag) {
|
|
8876
|
-
|
|
8997
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8998
|
+
return Promise.resolve(errRest);
|
|
8877
8999
|
}
|
|
8878
9000
|
if (oldAllMaps[newRowid]) {
|
|
8879
9001
|
isSelfToChildStatus = true;
|
|
@@ -8884,7 +9006,8 @@ const tableMethods = {
|
|
|
8884
9006
|
content: getI18n('vxe.error.treeDragChild')
|
|
8885
9007
|
});
|
|
8886
9008
|
}
|
|
8887
|
-
|
|
9009
|
+
handleRowDragEndClearStatus($xeTable);
|
|
9010
|
+
return Promise.resolve(errRest);
|
|
8888
9011
|
}
|
|
8889
9012
|
}
|
|
8890
9013
|
}
|
|
@@ -8905,6 +9028,7 @@ const tableMethods = {
|
|
|
8905
9028
|
// 移出源位置
|
|
8906
9029
|
if (oldRest && newRest) {
|
|
8907
9030
|
const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, {
|
|
9031
|
+
updated: false,
|
|
8908
9032
|
key: rowField,
|
|
8909
9033
|
parentKey: parentField,
|
|
8910
9034
|
children: mapChildrenField
|
|
@@ -10698,8 +10822,8 @@ const tableMethods = {
|
|
|
10698
10822
|
XEUtils.each(fullAllDataRowIdData, (rowRest) => {
|
|
10699
10823
|
rowRest.treeLoaded = false;
|
|
10700
10824
|
});
|
|
10825
|
+
internalData.treeExpandedMaps = {};
|
|
10701
10826
|
}
|
|
10702
|
-
internalData.treeExpandedMaps = {};
|
|
10703
10827
|
if (transform) {
|
|
10704
10828
|
handleVirtualTreeToList($xeTable);
|
|
10705
10829
|
$xeTable.handleTableData();
|
|
@@ -11779,7 +11903,7 @@ const tableMethods = {
|
|
|
11779
11903
|
* @param {Row} row 行对象
|
|
11780
11904
|
* @param {ColumnInfo} column 列配置
|
|
11781
11905
|
*/
|
|
11782
|
-
scrollToRow(row, fieldOrColumn) {
|
|
11906
|
+
scrollToRow(row, fieldOrColumn, options) {
|
|
11783
11907
|
const $xeTable = this;
|
|
11784
11908
|
const props = $xeTable;
|
|
11785
11909
|
const reactData = $xeTable;
|
|
@@ -11794,7 +11918,7 @@ const tableMethods = {
|
|
|
11794
11918
|
}
|
|
11795
11919
|
}
|
|
11796
11920
|
if (fieldOrColumn) {
|
|
11797
|
-
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row));
|
|
11921
|
+
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row, options));
|
|
11798
11922
|
}
|
|
11799
11923
|
return Promise.all(rest).then(() => {
|
|
11800
11924
|
if (row) {
|
|
@@ -11809,46 +11933,46 @@ const tableMethods = {
|
|
|
11809
11933
|
/**
|
|
11810
11934
|
* 如果有滚动条,则滚动到第一行
|
|
11811
11935
|
*/
|
|
11812
|
-
scrollToStartRow(fieldOrColumn) {
|
|
11936
|
+
scrollToStartRow(fieldOrColumn, options) {
|
|
11813
11937
|
const $xeTable = this;
|
|
11814
11938
|
const internalData = $xeTable;
|
|
11815
11939
|
const { afterFullData } = internalData;
|
|
11816
|
-
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn);
|
|
11940
|
+
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn, options);
|
|
11817
11941
|
},
|
|
11818
11942
|
/**
|
|
11819
11943
|
* 如果有滚动条,则滚动到最后一行
|
|
11820
11944
|
*/
|
|
11821
|
-
scrollToEndRow(fieldOrColumn) {
|
|
11945
|
+
scrollToEndRow(fieldOrColumn, options) {
|
|
11822
11946
|
const $xeTable = this;
|
|
11823
11947
|
const internalData = $xeTable;
|
|
11824
11948
|
const { afterFullData } = internalData;
|
|
11825
|
-
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn);
|
|
11949
|
+
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn, options);
|
|
11826
11950
|
},
|
|
11827
11951
|
/**
|
|
11828
11952
|
* 如果有滚动条,则滚动到对应的列
|
|
11829
11953
|
* @param {ColumnInfo} column 列配置
|
|
11830
11954
|
*/
|
|
11831
|
-
scrollToColumn(fieldOrColumn) {
|
|
11955
|
+
scrollToColumn(fieldOrColumn, options) {
|
|
11832
11956
|
const $xeTable = this;
|
|
11833
|
-
return handleScrollToRowColumn($xeTable, fieldOrColumn);
|
|
11957
|
+
return handleScrollToRowColumn($xeTable, null, fieldOrColumn, options);
|
|
11834
11958
|
},
|
|
11835
11959
|
/**
|
|
11836
11960
|
* 如果有滚动条,则滚动到第一列
|
|
11837
11961
|
*/
|
|
11838
|
-
scrollToStartColumn() {
|
|
11962
|
+
scrollToStartColumn(options) {
|
|
11839
11963
|
const $xeTable = this;
|
|
11840
11964
|
const internalData = $xeTable;
|
|
11841
11965
|
const { visibleColumn } = internalData;
|
|
11842
|
-
return $xeTable.scrollToColumn(visibleColumn[0]);
|
|
11966
|
+
return $xeTable.scrollToColumn(visibleColumn[0], options);
|
|
11843
11967
|
},
|
|
11844
11968
|
/**
|
|
11845
11969
|
* 如果有滚动条,则滚动到最后一列
|
|
11846
11970
|
*/
|
|
11847
|
-
scrollToEndColumn() {
|
|
11971
|
+
scrollToEndColumn(options) {
|
|
11848
11972
|
const $xeTable = this;
|
|
11849
11973
|
const internalData = $xeTable;
|
|
11850
11974
|
const { visibleColumn } = internalData;
|
|
11851
|
-
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1]);
|
|
11975
|
+
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1], options);
|
|
11852
11976
|
},
|
|
11853
11977
|
/**
|
|
11854
11978
|
* 对于树形结构中,可以直接滚动到指定深层节点中
|
|
@@ -11952,9 +12076,11 @@ const tableMethods = {
|
|
|
11952
12076
|
updateStatus(slotParams, cellValue) {
|
|
11953
12077
|
const $xeTable = this;
|
|
11954
12078
|
const props = $xeTable;
|
|
12079
|
+
const internalData = $xeTable;
|
|
11955
12080
|
return this.$nextTick().then(() => {
|
|
11956
12081
|
const { editRules } = props;
|
|
11957
|
-
|
|
12082
|
+
const { isActivated } = internalData;
|
|
12083
|
+
if (isActivated && slotParams && editRules) {
|
|
11958
12084
|
return $xeTable.handleCellRuleUpdateStatus('change', slotParams, cellValue);
|
|
11959
12085
|
}
|
|
11960
12086
|
});
|
package/es/table/src/props.js
CHANGED
|
@@ -199,6 +199,8 @@ export const tableProps = {
|
|
|
199
199
|
rowConfig: Object,
|
|
200
200
|
// 数据聚合配置项
|
|
201
201
|
aggregateConfig: Object,
|
|
202
|
+
// 聚合函数计算精度配置项
|
|
203
|
+
aggregateAccuracyConfig: Object,
|
|
202
204
|
/**
|
|
203
205
|
* 已废弃,被 aggregateConfig 替换
|
|
204
206
|
* @deprecated
|
|
@@ -264,6 +266,8 @@ export const tableProps = {
|
|
|
264
266
|
fnrConfig: Object,
|
|
265
267
|
// 编辑配置项
|
|
266
268
|
editConfig: [Boolean, Object],
|
|
269
|
+
// 数据状态监听配置项
|
|
270
|
+
editDirtyConfig: Object,
|
|
267
271
|
// 校验配置项
|
|
268
272
|
validConfig: Object,
|
|
269
273
|
// 校验规则配置项
|