feat: 名称为空时用第一张表的名称填上

This commit is contained in:
2026-11-10 10:08:25 +08:00
parent b1750a62d7
commit 144c7f6e3d
+4 -1
View File
@@ -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) {