|
|
@ -1748,15 +1748,17 @@ const getLocalData = () => { |
|
|
|
}; |
|
|
|
// 替换全部行 |
|
|
|
const setLocalData = (rows: any) => { |
|
|
|
if (props.tree && props.treeRelationship === 'parent') { |
|
|
|
const treeRows = TreeBuilder.build(rows, props.foreignKey, props.primaryKey); |
|
|
|
table.rows = treeRows; |
|
|
|
} else { |
|
|
|
table.rows = rows; |
|
|
|
} |
|
|
|
setRowDataExtraProperty(table.rows); |
|
|
|
state.pagination.rowsNumber = table.rows.length; |
|
|
|
stickyHeaderColumn(); |
|
|
|
setTimeout(() => { |
|
|
|
if (props.tree && props.treeRelationship === 'parent') { |
|
|
|
const treeRows = TreeBuilder.build(rows, props.foreignKey, props.primaryKey); |
|
|
|
table.rows = treeRows; |
|
|
|
} else { |
|
|
|
table.rows = rows; |
|
|
|
} |
|
|
|
setRowDataExtraProperty(table.rows); |
|
|
|
state.pagination.rowsNumber = table.rows.length; |
|
|
|
stickyHeaderColumn(); |
|
|
|
}, 100); |
|
|
|
}; |
|
|
|
|
|
|
|
const replaceRowHandler = (arr, row) => { |
|
|
|