@@ -335,7 +335,7 @@ const onChangeConn = async () => {
335335
336336const goRemoteDB = async () => {
337337 if (currentDB .value ) {
338- globalStore .setCurrentDB (currentDB .value .database );
338+ globalStore .setCurrentPgDB (currentDB .value .database );
339339 }
340340 routerToName (' PostgreSQL-Remote' );
341341};
@@ -348,7 +348,7 @@ const passwordRef = ref();
348348
349349const onSetting = async () => {
350350 if (currentDB .value ) {
351- globalStore .setCurrentDB (currentDB .value .database );
351+ globalStore .setCurrentPgDB (currentDB .value .database );
352352 }
353353 routerToNameWithParams (' PostgreSQL-Setting' , { type: currentDB .value .type , database: currentDB .value .database });
354354};
@@ -357,6 +357,7 @@ const changeDatabase = async () => {
357357 for (const item of dbOptionsLocal .value ) {
358358 if (item .database == currentDBName .value ) {
359359 currentDB .value = item ;
360+ globalStore .setCurrentPgDB (currentDB .value .database );
360361 appKey .value = item .type ;
361362 appName .value = item .database ;
362363 search ();
@@ -368,6 +369,7 @@ const changeDatabase = async () => {
368369 if (item .database == currentDBName .value ) {
369370 maskShow .value = false ;
370371 currentDB .value = item ;
372+ globalStore .setCurrentPgDB (currentDB .value .database );
371373 break ;
372374 }
373375 }
@@ -461,7 +463,7 @@ const loadDBOptions = async () => {
461463 let datas = res .data || [];
462464 dbOptionsLocal .value = [];
463465 dbOptionsRemote .value = [];
464- currentDBName .value = globalStore .currentDB ;
466+ currentDBName .value = globalStore .currentPgDB ;
465467 for (const item of datas ) {
466468 if (currentDBName .value && item .database === currentDBName .value ) {
467469 currentDB .value = item ;
@@ -480,7 +482,6 @@ const loadDBOptions = async () => {
480482 if (currentDB .value ?.from === ' remote' ) {
481483 maskShow .value = false ;
482484 }
483- globalStore .setCurrentDB (' ' );
484485 search ();
485486 return ;
486487 }
0 commit comments