vxe-table 4.19.24 → 4.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/README.md +4 -2
- package/dist/all.esm.js +5 -5
- package/dist/style.css +1 -1
- package/es/style.css +1 -1
- package/es/table/src/table.js +3 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +4 -4
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/table.js +2 -2
- 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 +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -5
- package/packages/table/src/table.ts +3 -3
- package/types/all.d.ts +40 -1
- /package/es/{iconfont.1783331249334.ttf → iconfont.1783442178628.ttf} +0 -0
- /package/es/{iconfont.1783331249334.woff → iconfont.1783442178628.woff} +0 -0
- /package/es/{iconfont.1783331249334.woff2 → iconfont.1783442178628.woff2} +0 -0
- /package/lib/{iconfont.1783331249334.ttf → iconfont.1783442178628.ttf} +0 -0
- /package/lib/{iconfont.1783331249334.woff → iconfont.1783442178628.woff} +0 -0
- /package/lib/{iconfont.1783331249334.woff2 → iconfont.1783442178628.woff2} +0 -0
package/lib/table/src/table.js
CHANGED
|
@@ -351,8 +351,8 @@ if(_xeUtils.default.isArray(row)){itemValue=row[_columnIndex];}else{itemValue=_x
|
|
|
351
351
|
*/removeInsertRow(){const{insertRowMaps}=internalData;return $xeTable.remove(_xeUtils.default.values(insertRowMaps));},/**
|
|
352
352
|
* 检查行或列数据是否发生改变
|
|
353
353
|
*/isUpdateByRow(rowidOrRow,field){const{keepSource}=props;const{fullDataRowIdData,sourceDataRowIdData}=internalData;const keepFields=computeKeepFields.value;if(keepSource){const rowid=_xeUtils.default.isString(rowidOrRow)||_xeUtils.default.isNumber(rowidOrRow)?rowidOrRow:(0,_util.getRowid)($xeTable,rowidOrRow);const rowRest=fullDataRowIdData[rowid];// 新增的数据不需要检测
|
|
354
|
-
if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[rowid];if(!oRow){return false;}if(arguments.length>1){return!eqCellValue(oRow,
|
|
355
|
-
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,
|
|
354
|
+
if(!rowRest){return false;}const row=rowRest.row;const oRow=sourceDataRowIdData[rowid];if(!oRow){return false;}if(arguments.length>1){return!eqCellValue(row,oRow,field).result;}for(let i=0;i<keepFields.length;i++){if(!eqCellValue(row,oRow,keepFields[i]).result){return true;}}}return false;},getUpdateCells(){const{keepSource,treeConfig}=props;const{tableFullData,tableFullTreeData,fullDataRowIdData,sourceDataRowIdData,fullColumnFieldData}=internalData;const treeOpts=computeTreeOpts.value;const keepFields=computeKeepFields.value;const cellList=[];if(keepSource){const{handleGetRowId}=(0,_util.createHandleGetRowId)($xeTable);const handleCell=item=>{const rowid=handleGetRowId(item);const rowRest=fullDataRowIdData[rowid];// 新增的数据不需要检测
|
|
355
|
+
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(row,oRow,field);if(!result){const column=fullColumnFieldData[field]?fullColumnFieldData[field].column:null;cellList.push({row,rowid,column,field,newValue,oldValue});}}};if(treeConfig){_xeUtils.default.eachTree(tableFullTreeData,handleCell,treeOpts);}else{tableFullData.forEach(handleCell);}}return cellList;},/**
|
|
356
356
|
* 获取表格的可视列,也可以指定索引获取列
|
|
357
357
|
* @param {Number} columnIndex 索引
|
|
358
358
|
*/getColumns(columnIndex){const{visibleColumn}=internalData;return _xeUtils.default.isUndefined(columnIndex)?visibleColumn.slice(0):visibleColumn[columnIndex];},/**
|