Skip to content

Commit

Permalink
fix: 解决远程数据库无法切换的问题 (#6893)
Browse files Browse the repository at this point in the history
Refs #6883
  • Loading branch information
ssongliu authored Oct 30, 2024
1 parent 79e9dc9 commit 784b8da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion frontend/src/views/database/mysql/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/views/database/postgresql/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/views/database/redis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 784b8da

Please sign in to comment.