forked from xxhjsb/hbt-prevention-ui
feat:新增删完后要删除tab页签
parent
d59299863f
commit
b154d1bf45
|
@ -559,8 +559,14 @@ export default class PlanComponent extends BaseRecordComponent<any> {
|
||||||
this.currentTable.tableItems.splice(index,1);
|
this.currentTable.tableItems.splice(index,1);
|
||||||
if(!this.currentTable.tableItems.length){
|
if(!this.currentTable.tableItems.length){
|
||||||
this.sendParams.tables.splice(this.sendParams.tables.findIndex(item=>item === this.currentTableId),1);
|
this.sendParams.tables.splice(this.sendParams.tables.findIndex(item=>item === this.currentTableId),1);
|
||||||
this.currentTableId = this.tableTabs[0]?.id;
|
this.tableTabs.splice(this.tableTabs.findIndex(item=>item.id===this.currentTableId),1)
|
||||||
this.currentTable = this.tableTabs[0]
|
if(this.tableTabs.length){
|
||||||
|
this.currentTableId = this.tableTabs[0]?.id;
|
||||||
|
this.currentTable = this.tableTabs[0]
|
||||||
|
}else{
|
||||||
|
this.currentTableId = null;
|
||||||
|
this.currentTable = {tableItems:[]} as any
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue