fix(接口定义): 复制优化
This commit is contained in:
parent
dcc8e2c609
commit
21935279ce
|
@ -143,7 +143,12 @@
|
|||
copyRow(row) {
|
||||
let obj = JSON.parse(JSON.stringify(row));
|
||||
obj.id = getUUID();
|
||||
this.request.hashTree.push(obj);
|
||||
const index = this.request.hashTree.findIndex(d => d.id === row.id);
|
||||
if (index != -1) {
|
||||
this.request.hashTree.splice(index, 0, obj);
|
||||
} else {
|
||||
this.request.hashTree.push(obj);
|
||||
}
|
||||
this.reload();
|
||||
},
|
||||
reload() {
|
||||
|
|
Loading…
Reference in New Issue