fix: 解决远程数据库无法切换的问题 (#6893)

Refs #6883
This commit is contained in:
ssongliu 2024-10-30 16:14:41 +08:00 committed by ssongliu
parent cdb0f8e85c
commit c2bb422b66
3 changed files with 9 additions and 3 deletions

View File

@ -387,7 +387,9 @@ const onSetting = async () => {
};
const changeDatabase = async () => {
appStatusRef.value.onCheck();
if (currentDB.value.from === 'local') {
appStatusRef.value.onCheck();
}
for (const item of dbOptionsLocal.value) {
if (item.database == currentDBName.value) {
currentDB.value = item;

View File

@ -350,7 +350,9 @@ const onSetting = async () => {
};
const changeDatabase = async () => {
appStatusRef.value.onCheck();
if (currentDB.value.from === 'local') {
appStatusRef.value.onCheck();
}
for (const item of dbOptionsLocal.value) {
if (item.database == currentDBName.value) {
currentDB.value = item;

View File

@ -222,7 +222,9 @@ const goRouter = async (target: string) => {
};
const changeDatabase = async () => {
appStatusRef.value.onCheck();
if (currentDB.value.from === 'local') {
appStatusRef.value.onCheck();
}
for (const item of dbOptionsLocal.value) {
if (item.database == currentDBName.value) {
currentDB.value = item;