vxe-table 3.21.18 → 3.21.19
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/style.css +1 -1
- package/es/table/module/edit/mixin.js +16 -4
- package/es/table/src/methods.js +59 -13
- package/es/table/src/table.js +1 -2
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +4 -3
- package/lib/index.umd.js +27 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +18 -4
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/src/methods.js +3 -2
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +1 -1
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +4 -3
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +15 -4
- package/packages/table/src/methods.ts +58 -14
- package/packages/table/src/table.ts +1 -2
- package/packages/ui/src/log.ts +3 -2
- /package/es/{iconfont.1782186465261.ttf → iconfont.1782286848090.ttf} +0 -0
- /package/es/{iconfont.1782186465261.woff → iconfont.1782286848090.woff} +0 -0
- /package/es/{iconfont.1782186465261.woff2 → iconfont.1782286848090.woff2} +0 -0
- /package/lib/{iconfont.1782186465261.ttf → iconfont.1782286848090.ttf} +0 -0
- /package/lib/{iconfont.1782186465261.woff → iconfont.1782286848090.woff} +0 -0
- /package/lib/{iconfont.1782186465261.woff2 → iconfont.1782286848090.woff2} +0 -0
|
@@ -780,16 +780,28 @@ export default {
|
|
|
780
780
|
const props = $xeTable;
|
|
781
781
|
const internalData = $xeTable;
|
|
782
782
|
const { keepSource, treeConfig } = props;
|
|
783
|
-
const { tableFullData } = internalData;
|
|
783
|
+
const { tableFullData, tableFullTreeData } = internalData;
|
|
784
784
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
785
|
+
const updateRecords = [];
|
|
785
786
|
if (keepSource) {
|
|
786
787
|
syncActivedCell($xeTable);
|
|
787
788
|
if (treeConfig) {
|
|
788
|
-
|
|
789
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
790
|
+
XEUtils.eachTree(tableFullTreeData, row => {
|
|
791
|
+
if ($xeTable.isUpdateByRow(row)) {
|
|
792
|
+
updateRecords.push(row);
|
|
793
|
+
}
|
|
794
|
+
}, { children: childrenField });
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
tableFullData.forEach((row) => {
|
|
798
|
+
if ($xeTable.isUpdateByRow(row)) {
|
|
799
|
+
updateRecords.push(row);
|
|
800
|
+
}
|
|
801
|
+
});
|
|
789
802
|
}
|
|
790
|
-
return tableFullData.filter((row) => $xeTable.isUpdateByRow(row));
|
|
791
803
|
}
|
|
792
|
-
return
|
|
804
|
+
return updateRecords;
|
|
793
805
|
},
|
|
794
806
|
/**
|
|
795
807
|
* 处理激活编辑
|
package/es/table/src/methods.js
CHANGED
|
@@ -17,16 +17,20 @@ const maxYHeight = 5e6;
|
|
|
17
17
|
const maxXWidth = 5e6;
|
|
18
18
|
const sourceType = 'table';
|
|
19
19
|
let crossTableDragRowObj = null;
|
|
20
|
-
function eqCellValue(
|
|
21
|
-
const val1 = XEUtils.get(
|
|
22
|
-
const val2 = XEUtils.get(
|
|
20
|
+
function eqCellValue(newRow, oldRow, field) {
|
|
21
|
+
const val1 = XEUtils.get(newRow, field);
|
|
22
|
+
const val2 = XEUtils.get(oldRow, field);
|
|
23
|
+
let result = false;
|
|
23
24
|
if (eqEmptyValue(val1) && eqEmptyValue(val2)) {
|
|
24
|
-
|
|
25
|
+
result = true;
|
|
25
26
|
}
|
|
26
|
-
if (XEUtils.isString(val1) || XEUtils.isNumber(val1)) {
|
|
27
|
-
|
|
27
|
+
else if (XEUtils.isString(val1) || XEUtils.isNumber(val1)) {
|
|
28
|
+
result = ('' + val1) === ('' + val2);
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
+
else {
|
|
31
|
+
result = XEUtils.isEqual(val1, val2);
|
|
32
|
+
}
|
|
33
|
+
return { newValue: val1, oldValue: val2, result };
|
|
30
34
|
}
|
|
31
35
|
function hangleStorageDefaultValue(value, isAll) {
|
|
32
36
|
return XEUtils.isBoolean(value) ? value : isAll;
|
|
@@ -5815,18 +5819,60 @@ const tableMethods = {
|
|
|
5815
5819
|
}
|
|
5816
5820
|
const row = rowRest.row;
|
|
5817
5821
|
const oRow = sourceDataRowIdData[rowid];
|
|
5818
|
-
if (oRow) {
|
|
5819
|
-
|
|
5820
|
-
|
|
5822
|
+
if (!oRow) {
|
|
5823
|
+
return false;
|
|
5824
|
+
}
|
|
5825
|
+
if (arguments.length > 1) {
|
|
5826
|
+
return !eqCellValue(oRow, row, field).result;
|
|
5827
|
+
}
|
|
5828
|
+
for (let i = 0; i < keepFields.length; i++) {
|
|
5829
|
+
if (!eqCellValue(oRow, row, keepFields[i]).result) {
|
|
5830
|
+
return true;
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
}
|
|
5834
|
+
return false;
|
|
5835
|
+
},
|
|
5836
|
+
getUpdateCells() {
|
|
5837
|
+
const $xeTable = this;
|
|
5838
|
+
const props = $xeTable;
|
|
5839
|
+
const internalData = $xeTable;
|
|
5840
|
+
const { keepSource, treeConfig } = props;
|
|
5841
|
+
const { tableFullData, tableFullTreeData, fullDataRowIdData, sourceDataRowIdData, fullColumnFieldData } = internalData;
|
|
5842
|
+
const treeOpts = $xeTable.computeTreeOpts;
|
|
5843
|
+
const keepFields = $xeTable.computeKeepFields;
|
|
5844
|
+
const cellList = [];
|
|
5845
|
+
if (keepSource) {
|
|
5846
|
+
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
5847
|
+
const handleCell = (item) => {
|
|
5848
|
+
const rowid = handleGetRowId(item);
|
|
5849
|
+
const rowRest = fullDataRowIdData[rowid];
|
|
5850
|
+
// 新增的数据不需要检测
|
|
5851
|
+
if (!rowRest) {
|
|
5852
|
+
return;
|
|
5853
|
+
}
|
|
5854
|
+
const row = rowRest.row;
|
|
5855
|
+
const oRow = sourceDataRowIdData[rowid];
|
|
5856
|
+
if (!oRow) {
|
|
5857
|
+
return;
|
|
5821
5858
|
}
|
|
5822
5859
|
for (let i = 0; i < keepFields.length; i++) {
|
|
5823
|
-
|
|
5824
|
-
|
|
5860
|
+
const field = keepFields[i];
|
|
5861
|
+
const { result, newValue, oldValue } = eqCellValue(oRow, row, field);
|
|
5862
|
+
if (!result) {
|
|
5863
|
+
const column = fullColumnFieldData[field] ? fullColumnFieldData[field].column : null;
|
|
5864
|
+
cellList.push({ row, rowid, column, field, newValue, oldValue });
|
|
5825
5865
|
}
|
|
5826
5866
|
}
|
|
5867
|
+
};
|
|
5868
|
+
if (treeConfig) {
|
|
5869
|
+
XEUtils.eachTree(tableFullTreeData, handleCell, treeOpts);
|
|
5870
|
+
}
|
|
5871
|
+
else {
|
|
5872
|
+
tableFullData.forEach(handleCell);
|
|
5827
5873
|
}
|
|
5828
5874
|
}
|
|
5829
|
-
return
|
|
5875
|
+
return cellList;
|
|
5830
5876
|
},
|
|
5831
5877
|
/**
|
|
5832
5878
|
* 获取表格的可视列,也可以指定索引获取列
|
package/es/table/src/table.js
CHANGED
|
@@ -1921,8 +1921,7 @@ export default {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
if ((props.showOverflow === true || props.showOverflow === 'tooltip') ||
|
|
1923
1923
|
(props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip') ||
|
|
1924
|
-
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip')
|
|
1925
|
-
props.tooltipConfig || props.editRules) {
|
|
1924
|
+
(props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip')) {
|
|
1926
1925
|
if (!VxeUITooltipComponent) {
|
|
1927
1926
|
if (props.showOverflow === true) {
|
|
1928
1927
|
errLog('vxe.error.errProp', ['show-overflow=true', 'show-overflow=title']);
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { VxeUI } from '@vxe-ui/core';
|
|
2
2
|
const { log } = VxeUI;
|
|
3
|
-
const tableVersion = `table v${"3.21.
|
|
3
|
+
const tableVersion = `table v${"3.21.19"}`;
|
|
4
4
|
export function createComponentLog(name) {
|
|
5
5
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
6
6
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
7
7
|
const designVersion = VxeUI.designVersion ? `design v${VxeUI.designVersion}` : '';
|
|
8
|
+
const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].join(' ');
|
|
8
9
|
return {
|
|
9
|
-
warnLog: log.create('warn',
|
|
10
|
-
errLog: log.create('error',
|
|
10
|
+
warnLog: log.create('warn', versionInfo + '] [' + name),
|
|
11
|
+
errLog: log.create('error', versionInfo + '] [' + name)
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
14
|
export const warnLog = log.create('warn', tableVersion);
|
package/lib/index.umd.js
CHANGED
|
@@ -3311,7 +3311,7 @@ function getClass(property, params) {
|
|
|
3311
3311
|
/* unused harmony import specifier */ var VxeUI;
|
|
3312
3312
|
|
|
3313
3313
|
|
|
3314
|
-
const version = "3.21.
|
|
3314
|
+
const version = "3.21.19";
|
|
3315
3315
|
core_.VxeUI.version = version;
|
|
3316
3316
|
core_.VxeUI.tableVersion = version;
|
|
3317
3317
|
core_.VxeUI.setConfig({
|
|
@@ -4074,14 +4074,15 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
4074
4074
|
const {
|
|
4075
4075
|
log: log_log
|
|
4076
4076
|
} = core_.VxeUI;
|
|
4077
|
-
const tableVersion = `table v${"3.21.
|
|
4077
|
+
const tableVersion = `table v${"3.21.19"}`;
|
|
4078
4078
|
function createComponentLog(name) {
|
|
4079
4079
|
const uiVersion = core_.VxeUI.uiVersion ? `ui v${core_.VxeUI.uiVersion}` : '';
|
|
4080
4080
|
const ganttVersion = core_.VxeUI.ganttVersion ? `gantt v${core_.VxeUI.ganttVersion}` : '';
|
|
4081
4081
|
const designVersion = core_.VxeUI.designVersion ? `design v${core_.VxeUI.designVersion}` : '';
|
|
4082
|
+
const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].join(' ');
|
|
4082
4083
|
return {
|
|
4083
|
-
warnLog: log_log.create('warn',
|
|
4084
|
-
errLog: log_log.create('error',
|
|
4084
|
+
warnLog: log_log.create('warn', versionInfo + '] [' + name),
|
|
4085
|
+
errLog: log_log.create('error', versionInfo + '] [' + name)
|
|
4085
4086
|
};
|
|
4086
4087
|
}
|
|
4087
4088
|
const warnLog = log_log.create('warn', tableVersion);
|
|
@@ -7725,7 +7726,7 @@ function getCrossTableDragRowInfo($xeTable) {
|
|
|
7725
7726
|
return crossTableDragRowInfo;
|
|
7726
7727
|
}
|
|
7727
7728
|
;// ./packages/table/src/methods.ts
|
|
7728
|
-
const{warnLog: methods_warnLog,errLog: methods_errLog}=createComponentLog('table');const{getConfig: methods_getConfig,getI18n: methods_getI18n,renderer: methods_renderer,formats: methods_formats,interceptor: methods_interceptor,createEvent,globalEvents: methods_globalEvents,GLOBAL_EVENT_KEYS}=core_.VxeUI;const browseObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();const supportMaxRow=5e6;const customStorageKey='VXE_CUSTOM_STORE';const maxYHeight=5e6;const maxXWidth=5e6;const sourceType='table';let crossTableDragRowObj=null;function eqCellValue(
|
|
7729
|
+
const{warnLog: methods_warnLog,errLog: methods_errLog}=createComponentLog('table');const{getConfig: methods_getConfig,getI18n: methods_getI18n,renderer: methods_renderer,formats: methods_formats,interceptor: methods_interceptor,createEvent,globalEvents: methods_globalEvents,GLOBAL_EVENT_KEYS}=core_.VxeUI;const browseObj=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();const supportMaxRow=5e6;const customStorageKey='VXE_CUSTOM_STORE';const maxYHeight=5e6;const maxXWidth=5e6;const sourceType='table';let crossTableDragRowObj=null;function eqCellValue(newRow,oldRow,field){const val1=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(newRow,field);const val2=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(oldRow,field);let result=false;if(eqEmptyValue(val1)&&eqEmptyValue(val2)){result=true;}else if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(val1)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(val1)){result=''+val1===''+val2;}else{result=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isEqual(val1,val2);}return{newValue:val1,oldValue:val2,result};}function hangleStorageDefaultValue(value,isAll){return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(value)?value:isAll;}function getNextSortOrder($xeTable,column){const sortOpts=$xeTable.computeSortOpts;const{orders=[]}=sortOpts;const currOrder=column.order||null;const oIndex=orders.indexOf(currOrder)+1;return orders[oIndex<orders.length?oIndex:0];}const getCustomStorageMap=id=>{const version=methods_getConfig().version;const rest=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringJSON(localStorage.getItem(customStorageKey)||'');const maps=rest&&rest._v===version?rest:{_v:version};return(id?maps[id]:maps)||{};};const setCustomStorageMap=(id,data)=>{const version=methods_getConfig().version;const maps=getCustomStorageMap();maps[id]=data||undefined;maps._v=version;localStorage.setItem(customStorageKey,external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toJSONString(maps));};const getRecoverRowMaps=($xeTable,keyMaps)=>{const internalData=$xeTable;const{fullAllDataRowIdData}=internalData;const restKeys={};external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(keyMaps,(row,rowid)=>{if(fullAllDataRowIdData[rowid]){restKeys[rowid]=row;}});return restKeys;};function handleReserveRow($xeTable,reserveRowMap){const internalData=$xeTable;const{fullDataRowIdData}=internalData;const reserveList=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(reserveRowMap,(item,rowid)=>{if(fullDataRowIdData[rowid]&&reserveList.indexOf(fullDataRowIdData[rowid].row)===-1){reserveList.push(fullDataRowIdData[rowid].row);}});return reserveList;}function handleVirtualXVisible($xeTable){const reactData=$xeTable;const internalData=$xeTable;const{isScrollXBig,scrollXWidth}=reactData;const{elemStore,visibleColumn,fullColumnIdData}=internalData;const leftFixedWidth=$xeTable.computeLeftFixedWidth;const rightFixedWidth=$xeTable.computeRightFixedWidth;const bodyScrollElem=getRefElem(elemStore['main-body-scroll']);if(bodyScrollElem){const clientWidth=bodyScrollElem.clientWidth;let scrollLeft=bodyScrollElem.scrollLeft;if(isScrollXBig){scrollLeft=Math.ceil((scrollXWidth-clientWidth)*Math.min(1,scrollLeft/(maxXWidth-clientWidth)));}const startLeft=scrollLeft+leftFixedWidth;const endLeft=scrollLeft+clientWidth-rightFixedWidth;let leftIndex=0;let rightIndex=visibleColumn.length;while(leftIndex<rightIndex){const cIndex=Math.floor((leftIndex+rightIndex)/2);const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};if(colRest.oLeft<=startLeft){leftIndex=cIndex+1;}else{rightIndex=cIndex;}}let visibleSize=0;const toVisibleIndex=leftIndex===visibleColumn.length?leftIndex:Math.max(0,leftIndex<visibleColumn.length?leftIndex-2:0);for(let cIndex=toVisibleIndex,cLen=visibleColumn.length;cIndex<cLen;cIndex++){const column=visibleColumn[cIndex];const colid=column.id;const colRest=fullColumnIdData[colid]||{};visibleSize++;if(colRest.oLeft>endLeft||visibleSize>=60){break;}}return{toVisibleIndex:Math.max(0,toVisibleIndex),visibleSize:Math.max(6,visibleSize)};}return{toVisibleIndex:0,visibleSize:6};}function handleCustomRestore($xeTable,storeData){const props=$xeTable;const reactData=$xeTable;const internalData=$xeTable;const{aggregateConfig,rowGroupConfig}=props;const{collectColumn}=internalData;const customOpts=$xeTable.computeCustomOpts;const{storage,storeOptions}=customOpts;const isAllCustom=storage===true;const storageOpts=Object.assign({},isAllCustom?{}:storage||{},storeOptions);const isCustomResizable=hangleStorageDefaultValue(storageOpts.resizable,isAllCustom);const isCustomVisible=hangleStorageDefaultValue(storageOpts.visible,isAllCustom);const isCustomFixed=hangleStorageDefaultValue(storageOpts.fixed,isAllCustom);const isCustomSort=hangleStorageDefaultValue(storageOpts.sort,isAllCustom);const isCustomAggGroup=hangleStorageDefaultValue(storageOpts.aggGroup,isAllCustom);const isCustomAggFunc=hangleStorageDefaultValue(storageOpts.aggFunc,isAllCustom);let{resizableData,sortData,visibleData,fixedData,aggGroupData,aggFuncData}=storeData;// 处理还原
|
|
7729
7730
|
if(isCustomResizable&&resizableData||isCustomSort&&sortData||isCustomVisible&&visibleData||isCustomFixed&&fixedData||isCustomAggGroup&&aggGroupData||isCustomAggFunc&&aggFuncData){const sortColMaps={};if(isCustomSort&&sortData){// 转换兼容老版本数据,即将废弃兼容
|
|
7730
7731
|
if(!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(sortData)){const sortRests=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().each(sortData,(index,colKey)=>{sortRests.push({key:colKey,index});});sortData=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().orderBy(sortRests,{field:'index',order:'asc'}).map(item=>({k:item.key}));}let colNum=1;external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(sortData,(sObj,index,sOjs,path,pSObj)=>{sortColMaps[sObj.k]={key:sObj.k,sNum:colNum++,pKey:pSObj?pSObj.k:null};},{children:'c'});}const colKeyMaps={};const allCols=[];const aggGroupConfs=[];external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(collectColumn,(column,index,items,path,parentColumn)=>{const colKey=column.getKey();// 支持一级
|
|
7731
7732
|
if(!parentColumn){if(isCustomFixed&&fixedData&&fixedData[colKey]!==undefined){column.fixed=fixedData[colKey];}}if(isCustomResizable&&resizableData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(resizableData[colKey])){column.resizeWidth=resizableData[colKey];}if(isCustomVisible&&visibleData&&external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(visibleData[colKey])){column.visible=visibleData[colKey];}if(isCustomAggFunc&&aggFuncData&&(aggregateConfig||rowGroupConfig)&&aggFuncData[colKey]){column.aggFunc=aggFuncData[colKey];}if(isCustomAggGroup&&aggGroupData&&aggGroupData[colKey]){aggGroupConfs.push({field:column.field});}colKeyMaps[colKey]=column;allCols.push(column);});if((aggregateConfig||rowGroupConfig)&&aggGroupConfs.length){const groupRest=handleGroupData($xeTable,internalData.tableFullData,aggGroupConfs);internalData.tableFullTreeData=[];internalData.tableFullGroupData=groupRest.treeData;reactData.isRowGroupStatus=true;reactData.rowGroupList=aggGroupConfs;$xeTable.cacheRowMap(false);}// 如果自定义了顺序
|
|
@@ -8101,7 +8102,8 @@ if(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_defau
|
|
|
8101
8102
|
*/removeInsertRow(){const $xeTable=this;const internalData=$xeTable;const{insertRowMaps}=internalData;return $xeTable.remove(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().values(insertRowMaps));},/**
|
|
8102
8103
|
* 检查行或列数据是否发生改变
|
|
8103
8104
|
*/isUpdateByRow(rowOrId,field){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{keepSource,editConfig}=props;const{fullDataRowIdData,sourceDataRowIdData}=internalData;const keepFields=$xeTable.computeKeepFields;if(keepSource&&editConfig){const rowid=external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(rowOrId)||external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(rowOrId)?rowOrId:getRowid($xeTable,rowOrId);const rowRest=fullDataRowIdData[rowid];// 新增的数据不需要检测
|
|
8104
|
-
if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[rowid];if(oRow){if(arguments.length>1){return!eqCellValue(oRow,row,field);}for(let i=0;i<keepFields.length;i++){if(!eqCellValue(oRow,row,keepFields[i])){return true;}}}
|
|
8105
|
+
if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[rowid];if(!oRow){return false;}if(arguments.length>1){return!eqCellValue(oRow,row,field).result;}for(let i=0;i<keepFields.length;i++){if(!eqCellValue(oRow,row,keepFields[i]).result){return true;}}}return false;},getUpdateCells(){const $xeTable=this;const props=$xeTable;const internalData=$xeTable;const{keepSource,treeConfig}=props;const{tableFullData,tableFullTreeData,fullDataRowIdData,sourceDataRowIdData,fullColumnFieldData}=internalData;const treeOpts=$xeTable.computeTreeOpts;const keepFields=$xeTable.computeKeepFields;const cellList=[];if(keepSource){const{handleGetRowId}=createHandleGetRowId($xeTable);const handleCell=item=>{const rowid=handleGetRowId(item);const rowRest=fullDataRowIdData[rowid];// 新增的数据不需要检测
|
|
8106
|
+
if(!rowRest){return;}const row=rowRest.row;const oRow=sourceDataRowIdData[rowid];if(!oRow){return;}for(let i=0;i<keepFields.length;i++){const field=keepFields[i];const{result,newValue,oldValue}=eqCellValue(oRow,row,field);if(!result){const column=fullColumnFieldData[field]?fullColumnFieldData[field].column:null;cellList.push({row,rowid,column,field,newValue,oldValue});}}};if(treeConfig){external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData,handleCell,treeOpts);}else{tableFullData.forEach(handleCell);}}return cellList;},/**
|
|
8105
8107
|
* 获取表格的可视列,也可以指定索引获取列
|
|
8106
8108
|
* @param {Number} columnIndex 索引
|
|
8107
8109
|
*/getColumns(columnIndex){const $xeTable=this;const internalData=$xeTable;const{visibleColumn}=internalData;return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(columnIndex)?visibleColumn.slice(0):visibleColumn[columnIndex];},/**
|
|
@@ -15726,17 +15728,31 @@ function handleEditCell($xeTable, row, fieldOrColumn, options) {
|
|
|
15726
15728
|
treeConfig
|
|
15727
15729
|
} = props;
|
|
15728
15730
|
const {
|
|
15729
|
-
tableFullData
|
|
15731
|
+
tableFullData,
|
|
15732
|
+
tableFullTreeData
|
|
15730
15733
|
} = internalData;
|
|
15731
15734
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
15735
|
+
const updateRecords = [];
|
|
15732
15736
|
if (keepSource) {
|
|
15733
15737
|
syncActivedCell($xeTable);
|
|
15734
15738
|
if (treeConfig) {
|
|
15735
|
-
|
|
15739
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
15740
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eachTree(tableFullTreeData, row => {
|
|
15741
|
+
if ($xeTable.isUpdateByRow(row)) {
|
|
15742
|
+
updateRecords.push(row);
|
|
15743
|
+
}
|
|
15744
|
+
}, {
|
|
15745
|
+
children: childrenField
|
|
15746
|
+
});
|
|
15747
|
+
} else {
|
|
15748
|
+
tableFullData.forEach(row => {
|
|
15749
|
+
if ($xeTable.isUpdateByRow(row)) {
|
|
15750
|
+
updateRecords.push(row);
|
|
15751
|
+
}
|
|
15752
|
+
});
|
|
15736
15753
|
}
|
|
15737
|
-
return tableFullData.filter(row => $xeTable.isUpdateByRow(row));
|
|
15738
15754
|
}
|
|
15739
|
-
return
|
|
15755
|
+
return updateRecords;
|
|
15740
15756
|
},
|
|
15741
15757
|
/**
|
|
15742
15758
|
* 处理激活编辑
|
|
@@ -22169,7 +22185,7 @@ function renderBody(h, $xeTable) {
|
|
|
22169
22185
|
table_errLog('vxe.error.reqComp', ['vxe-loading']);
|
|
22170
22186
|
}
|
|
22171
22187
|
}
|
|
22172
|
-
if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip'
|
|
22188
|
+
if (props.showOverflow === true || props.showOverflow === 'tooltip' || props.showHeaderOverflow === true || props.showHeaderOverflow === 'tooltip' || props.showFooterOverflow === true || props.showFooterOverflow === 'tooltip') {
|
|
22173
22189
|
if (!VxeUITooltipComponent) {
|
|
22174
22190
|
if (props.showOverflow === true) {
|
|
22175
22191
|
table_errLog('vxe.error.errProp', ['show-overflow=true', 'show-overflow=title']);
|