【issues/136】同步Vben:BasicTable 调用插入函数异常插入两条记录]
parent
4da6c77856
commit
8309e171d4
|
@ -172,11 +172,11 @@ export function useDataSource(
|
|||
}
|
||||
|
||||
function insertTableDataRecord(record: Recordable, index: number): Recordable | undefined {
|
||||
if (!dataSourceRef.value || dataSourceRef.value.length == 0) return;
|
||||
//【issues/136】同步Vben:BasicTable 调用插入函数异常插入两条记录]
|
||||
// if (!dataSourceRef.value || dataSourceRef.value.length == 0) return;
|
||||
index = index ?? dataSourceRef.value?.length;
|
||||
unref(dataSourceRef).splice(index, 0, record);
|
||||
unref(propsRef).dataSource?.splice(index, 0, record);
|
||||
return unref(propsRef).dataSource;
|
||||
return unref(dataSourceRef);
|
||||
}
|
||||
function findTableDataRecord(rowKey: string | number) {
|
||||
if (!dataSourceRef.value || dataSourceRef.value.length == 0) return;
|
||||
|
|
Loading…
Reference in New Issue