vxe-table 3.20.0-beta.9 → 3.20.1
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/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/column.js +1 -1
- package/es/table/src/columnInfo.js +2 -0
- package/es/table/src/methods.js +208 -79
- package/es/table/src/props.js +4 -0
- package/es/table/src/table.js +64 -3
- 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/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/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +241 -76
- 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/column.js +1 -1
- package/lib/table/src/column.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 +74 -2
- 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/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/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/column.ts +1 -1
- package/packages/table/src/columnInfo.ts +2 -0
- package/packages/table/src/methods.ts +201 -78
- package/packages/table/src/props.ts +4 -0
- package/packages/table/src/table.ts +70 -2
- package/packages/table/src/util.ts +43 -19
- 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.1768625297791.ttf → iconfont.1773109164685.ttf} +0 -0
- /package/es/{iconfont.1768625297791.woff → iconfont.1773109164685.woff} +0 -0
- /package/es/{iconfont.1768625297791.woff2 → iconfont.1773109164685.woff2} +0 -0
- /package/lib/{iconfont.1768625297791.ttf → iconfont.1773109164685.ttf} +0 -0
- /package/lib/{iconfont.1768625297791.woff → iconfont.1773109164685.woff} +0 -0
- /package/lib/{iconfont.1768625297791.woff2 → iconfont.1773109164685.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
|
}
|
|
@@ -8155,10 +8248,11 @@ const tableMethods = {
|
|
|
8155
8248
|
if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
8156
8249
|
let newValue = row;
|
|
8157
8250
|
let isChange = oldValue !== newValue;
|
|
8251
|
+
const selected = !isChange;
|
|
8158
8252
|
if (isChange) {
|
|
8159
8253
|
handleCheckedRadioRow($xeTable, newValue);
|
|
8160
8254
|
}
|
|
8161
|
-
else if (!
|
|
8255
|
+
else if (!strict) {
|
|
8162
8256
|
isChange = oldValue === newValue;
|
|
8163
8257
|
if (isChange) {
|
|
8164
8258
|
newValue = null;
|
|
@@ -8166,7 +8260,7 @@ const tableMethods = {
|
|
|
8166
8260
|
}
|
|
8167
8261
|
}
|
|
8168
8262
|
if (isChange) {
|
|
8169
|
-
$xeTable.dispatchEvent('radio-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8263
|
+
$xeTable.dispatchEvent('radio-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
|
|
8170
8264
|
}
|
|
8171
8265
|
}
|
|
8172
8266
|
},
|
|
@@ -8177,16 +8271,29 @@ const tableMethods = {
|
|
|
8177
8271
|
const columnOpts = $xeTable.computeColumnOpts;
|
|
8178
8272
|
const currentColumnOpts = $xeTable.computeCurrentColumnOpts;
|
|
8179
8273
|
const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
|
|
8180
|
-
|
|
8181
|
-
const { trigger } = currentColumnOpts;
|
|
8274
|
+
let { column: newValue } = params;
|
|
8275
|
+
const { trigger, strict } = currentColumnOpts;
|
|
8182
8276
|
if (trigger === 'manual') {
|
|
8183
8277
|
return;
|
|
8184
8278
|
}
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8279
|
+
let isChange = oldValue !== newValue;
|
|
8280
|
+
const selected = !isChange;
|
|
8281
|
+
if (!beforeRowMethod || beforeRowMethod({ column: newValue, selected, $table: $xeTable })) {
|
|
8282
|
+
if (strict) {
|
|
8283
|
+
$xeTable.setCurrentColumn(newValue);
|
|
8284
|
+
}
|
|
8285
|
+
else {
|
|
8286
|
+
isChange = oldValue === newValue;
|
|
8287
|
+
if (isChange) {
|
|
8288
|
+
newValue = null;
|
|
8289
|
+
$xeTable.clearCurrentColumn();
|
|
8290
|
+
}
|
|
8291
|
+
else {
|
|
8292
|
+
$xeTable.setCurrentColumn(newValue);
|
|
8293
|
+
}
|
|
8294
|
+
}
|
|
8188
8295
|
if (isChange) {
|
|
8189
|
-
$xeTable.dispatchEvent('current-column-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8296
|
+
$xeTable.dispatchEvent('current-column-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
|
|
8190
8297
|
}
|
|
8191
8298
|
}
|
|
8192
8299
|
else {
|
|
@@ -8200,18 +8307,31 @@ const tableMethods = {
|
|
|
8200
8307
|
const rowOpts = $xeTable.computeRowOpts;
|
|
8201
8308
|
const currentRowOpts = $xeTable.computeCurrentRowOpts;
|
|
8202
8309
|
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
|
|
8203
|
-
|
|
8204
|
-
const { trigger } = currentRowOpts;
|
|
8310
|
+
let { row: newValue } = params;
|
|
8311
|
+
const { trigger, strict } = currentRowOpts;
|
|
8205
8312
|
if (trigger === 'manual') {
|
|
8206
8313
|
return;
|
|
8207
8314
|
}
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8315
|
+
let isChange = oldValue !== newValue;
|
|
8316
|
+
const selected = !isChange;
|
|
8317
|
+
if (!beforeRowMethod || beforeRowMethod({ row: newValue, selected, $table: $xeTable })) {
|
|
8318
|
+
if (strict) {
|
|
8319
|
+
$xeTable.setCurrentRow(newValue);
|
|
8320
|
+
}
|
|
8321
|
+
else {
|
|
8322
|
+
isChange = oldValue === newValue;
|
|
8323
|
+
if (isChange) {
|
|
8324
|
+
newValue = null;
|
|
8325
|
+
$xeTable.clearCurrentRow();
|
|
8326
|
+
}
|
|
8327
|
+
else {
|
|
8328
|
+
$xeTable.setCurrentRow(newValue);
|
|
8329
|
+
}
|
|
8330
|
+
}
|
|
8211
8331
|
if (isChange) {
|
|
8212
|
-
$xeTable.dispatchEvent('current-row-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8332
|
+
$xeTable.dispatchEvent('current-row-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
|
|
8213
8333
|
// 已废弃
|
|
8214
|
-
$xeTable.dispatchEvent('current-change', Object.assign({ oldValue, newValue }, params), evnt);
|
|
8334
|
+
$xeTable.dispatchEvent('current-change', Object.assign({ oldValue, newValue, selected }, params), evnt);
|
|
8215
8335
|
}
|
|
8216
8336
|
}
|
|
8217
8337
|
else {
|
|
@@ -8843,12 +8963,14 @@ const tableMethods = {
|
|
|
8843
8963
|
if (isPeerDrag && !isCrossDrag) {
|
|
8844
8964
|
if (oldRest.row[parentField] !== newRest.row[parentField]) {
|
|
8845
8965
|
// 非同级
|
|
8846
|
-
|
|
8966
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8967
|
+
return Promise.resolve(errRest);
|
|
8847
8968
|
}
|
|
8848
8969
|
}
|
|
8849
8970
|
else {
|
|
8850
8971
|
if (!isCrossDrag) {
|
|
8851
|
-
|
|
8972
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8973
|
+
return Promise.resolve(errRest);
|
|
8852
8974
|
}
|
|
8853
8975
|
if (oldAllMaps[newRowid]) {
|
|
8854
8976
|
isSelfToChildStatus = true;
|
|
@@ -8859,7 +8981,8 @@ const tableMethods = {
|
|
|
8859
8981
|
content: getI18n('vxe.error.treeDragChild')
|
|
8860
8982
|
});
|
|
8861
8983
|
}
|
|
8862
|
-
|
|
8984
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8985
|
+
return Promise.resolve(errRest);
|
|
8863
8986
|
}
|
|
8864
8987
|
}
|
|
8865
8988
|
}
|
|
@@ -8867,13 +8990,15 @@ const tableMethods = {
|
|
|
8867
8990
|
else if (oldLevel) {
|
|
8868
8991
|
// 子到根
|
|
8869
8992
|
if (!isCrossDrag) {
|
|
8870
|
-
|
|
8993
|
+
handleRowDragEndClearStatus($xeTable);
|
|
8994
|
+
return Promise.resolve(errRest);
|
|
8871
8995
|
}
|
|
8872
8996
|
}
|
|
8873
8997
|
else if (newLevel) {
|
|
8874
8998
|
// 根到子
|
|
8875
8999
|
if (!isCrossDrag) {
|
|
8876
|
-
|
|
9000
|
+
handleRowDragEndClearStatus($xeTable);
|
|
9001
|
+
return Promise.resolve(errRest);
|
|
8877
9002
|
}
|
|
8878
9003
|
if (oldAllMaps[newRowid]) {
|
|
8879
9004
|
isSelfToChildStatus = true;
|
|
@@ -8884,7 +9009,8 @@ const tableMethods = {
|
|
|
8884
9009
|
content: getI18n('vxe.error.treeDragChild')
|
|
8885
9010
|
});
|
|
8886
9011
|
}
|
|
8887
|
-
|
|
9012
|
+
handleRowDragEndClearStatus($xeTable);
|
|
9013
|
+
return Promise.resolve(errRest);
|
|
8888
9014
|
}
|
|
8889
9015
|
}
|
|
8890
9016
|
}
|
|
@@ -8905,6 +9031,7 @@ const tableMethods = {
|
|
|
8905
9031
|
// 移出源位置
|
|
8906
9032
|
if (oldRest && newRest) {
|
|
8907
9033
|
const fullList = XEUtils.toTreeArray(internalData.afterTreeFullData, {
|
|
9034
|
+
updated: false,
|
|
8908
9035
|
key: rowField,
|
|
8909
9036
|
parentKey: parentField,
|
|
8910
9037
|
children: mapChildrenField
|
|
@@ -10698,8 +10825,8 @@ const tableMethods = {
|
|
|
10698
10825
|
XEUtils.each(fullAllDataRowIdData, (rowRest) => {
|
|
10699
10826
|
rowRest.treeLoaded = false;
|
|
10700
10827
|
});
|
|
10828
|
+
internalData.treeExpandedMaps = {};
|
|
10701
10829
|
}
|
|
10702
|
-
internalData.treeExpandedMaps = {};
|
|
10703
10830
|
if (transform) {
|
|
10704
10831
|
handleVirtualTreeToList($xeTable);
|
|
10705
10832
|
$xeTable.handleTableData();
|
|
@@ -11779,7 +11906,7 @@ const tableMethods = {
|
|
|
11779
11906
|
* @param {Row} row 行对象
|
|
11780
11907
|
* @param {ColumnInfo} column 列配置
|
|
11781
11908
|
*/
|
|
11782
|
-
scrollToRow(row, fieldOrColumn) {
|
|
11909
|
+
scrollToRow(row, fieldOrColumn, options) {
|
|
11783
11910
|
const $xeTable = this;
|
|
11784
11911
|
const props = $xeTable;
|
|
11785
11912
|
const reactData = $xeTable;
|
|
@@ -11794,7 +11921,7 @@ const tableMethods = {
|
|
|
11794
11921
|
}
|
|
11795
11922
|
}
|
|
11796
11923
|
if (fieldOrColumn) {
|
|
11797
|
-
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row));
|
|
11924
|
+
rest.push(handleScrollToRowColumn($xeTable, fieldOrColumn, row, options));
|
|
11798
11925
|
}
|
|
11799
11926
|
return Promise.all(rest).then(() => {
|
|
11800
11927
|
if (row) {
|
|
@@ -11809,46 +11936,46 @@ const tableMethods = {
|
|
|
11809
11936
|
/**
|
|
11810
11937
|
* 如果有滚动条,则滚动到第一行
|
|
11811
11938
|
*/
|
|
11812
|
-
scrollToStartRow(fieldOrColumn) {
|
|
11939
|
+
scrollToStartRow(fieldOrColumn, options) {
|
|
11813
11940
|
const $xeTable = this;
|
|
11814
11941
|
const internalData = $xeTable;
|
|
11815
11942
|
const { afterFullData } = internalData;
|
|
11816
|
-
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn);
|
|
11943
|
+
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn, options);
|
|
11817
11944
|
},
|
|
11818
11945
|
/**
|
|
11819
11946
|
* 如果有滚动条,则滚动到最后一行
|
|
11820
11947
|
*/
|
|
11821
|
-
scrollToEndRow(fieldOrColumn) {
|
|
11948
|
+
scrollToEndRow(fieldOrColumn, options) {
|
|
11822
11949
|
const $xeTable = this;
|
|
11823
11950
|
const internalData = $xeTable;
|
|
11824
11951
|
const { afterFullData } = internalData;
|
|
11825
|
-
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn);
|
|
11952
|
+
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn, options);
|
|
11826
11953
|
},
|
|
11827
11954
|
/**
|
|
11828
11955
|
* 如果有滚动条,则滚动到对应的列
|
|
11829
11956
|
* @param {ColumnInfo} column 列配置
|
|
11830
11957
|
*/
|
|
11831
|
-
scrollToColumn(fieldOrColumn) {
|
|
11958
|
+
scrollToColumn(fieldOrColumn, options) {
|
|
11832
11959
|
const $xeTable = this;
|
|
11833
|
-
return handleScrollToRowColumn($xeTable, fieldOrColumn);
|
|
11960
|
+
return handleScrollToRowColumn($xeTable, null, fieldOrColumn, options);
|
|
11834
11961
|
},
|
|
11835
11962
|
/**
|
|
11836
11963
|
* 如果有滚动条,则滚动到第一列
|
|
11837
11964
|
*/
|
|
11838
|
-
scrollToStartColumn() {
|
|
11965
|
+
scrollToStartColumn(options) {
|
|
11839
11966
|
const $xeTable = this;
|
|
11840
11967
|
const internalData = $xeTable;
|
|
11841
11968
|
const { visibleColumn } = internalData;
|
|
11842
|
-
return $xeTable.scrollToColumn(visibleColumn[0]);
|
|
11969
|
+
return $xeTable.scrollToColumn(visibleColumn[0], options);
|
|
11843
11970
|
},
|
|
11844
11971
|
/**
|
|
11845
11972
|
* 如果有滚动条,则滚动到最后一列
|
|
11846
11973
|
*/
|
|
11847
|
-
scrollToEndColumn() {
|
|
11974
|
+
scrollToEndColumn(options) {
|
|
11848
11975
|
const $xeTable = this;
|
|
11849
11976
|
const internalData = $xeTable;
|
|
11850
11977
|
const { visibleColumn } = internalData;
|
|
11851
|
-
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1]);
|
|
11978
|
+
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1], options);
|
|
11852
11979
|
},
|
|
11853
11980
|
/**
|
|
11854
11981
|
* 对于树形结构中,可以直接滚动到指定深层节点中
|
|
@@ -11952,9 +12079,11 @@ const tableMethods = {
|
|
|
11952
12079
|
updateStatus(slotParams, cellValue) {
|
|
11953
12080
|
const $xeTable = this;
|
|
11954
12081
|
const props = $xeTable;
|
|
12082
|
+
const internalData = $xeTable;
|
|
11955
12083
|
return this.$nextTick().then(() => {
|
|
11956
12084
|
const { editRules } = props;
|
|
11957
|
-
|
|
12085
|
+
const { isActivated } = internalData;
|
|
12086
|
+
if (isActivated && slotParams && editRules) {
|
|
11958
12087
|
return $xeTable.handleCellRuleUpdateStatus('change', slotParams, cellValue);
|
|
11959
12088
|
}
|
|
11960
12089
|
});
|
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
|
// 校验规则配置项
|