feat: 名称为空时用第一张表的名称填上
This commit is contained in:
@@ -183,7 +183,10 @@ function lookup(tablename: string) {
|
||||
}
|
||||
|
||||
function setPicked(names: string[]) {
|
||||
chosen.value = names.map(lookup).filter((item): item is QueryTable => Boolean(item));
|
||||
const wasEmpty = chosen.value.length === 0;
|
||||
const next = names.map(lookup).filter((item): item is QueryTable => Boolean(item));
|
||||
if (wasEmpty && next.length && !name.value.trim()) name.value = next[0].name;
|
||||
chosen.value = next;
|
||||
}
|
||||
|
||||
function removeTable(tablename: string) {
|
||||
|
||||
Reference in New Issue
Block a user