fix(04): work name => name being use (delete), re select
This commit is contained in:
parent
1dd7873fce
commit
b53ec8e91c
2 changed files with 15 additions and 4 deletions
|
|
@ -66,8 +66,9 @@ watch(
|
|||
const oldList = o.map((v: { name: string }) => v.name);
|
||||
const index = oldList.indexOf(workName.value);
|
||||
|
||||
if (list[index] !== oldList[index]) {
|
||||
workName.value = list[index];
|
||||
if (list[index] !== oldList[index] && !list.includes(workName.value)) {
|
||||
if (list.length - 1 === index - 1) workName.value = list[index - 1];
|
||||
else workName.value = list[index];
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue