File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ const openConnection = async (name) => {
295
295
tabStore .upsertTab ({
296
296
server: name,
297
297
db: browserStore .getSelectedDB (name),
298
+ forceSwitch: true ,
298
299
})
299
300
}
300
301
} catch (e) {
Original file line number Diff line number Diff line change @@ -161,6 +161,7 @@ const useTabStore = defineStore('tab', {
161
161
* @param {boolean } [clearValue]
162
162
* @param {string } format
163
163
* @param {string } decode
164
+ * @param {boolean } forceSwitch
164
165
* @param {* } [value]
165
166
*/
166
167
upsertTab ( {
@@ -177,6 +178,7 @@ const useTabStore = defineStore('tab', {
177
178
clearValue,
178
179
format = '' ,
179
180
decode = '' ,
181
+ forceSwitch = false ,
180
182
} ) {
181
183
let tabIndex = findIndex ( this . tabList , { name : server } )
182
184
if ( tabIndex === - 1 ) {
@@ -221,6 +223,9 @@ const useTabStore = defineStore('tab', {
221
223
if ( clearValue === true ) {
222
224
tab . value = undefined
223
225
}
226
+ if ( forceSwitch === true ) {
227
+ this . _setActivatedIndex ( tabIndex , true , subTab )
228
+ }
224
229
}
225
230
} ,
226
231
You can’t perform that action at this time.
0 commit comments