Compare commits

..

2 Commits

2 changed files with 2 additions and 2 deletions

View File

@ -174,10 +174,10 @@ const onAdd = async () => {
tabStore.setSelectedKeys(server, nodeKey) tabStore.setSelectedKeys(server, nodeKey)
browserStore.reloadKey({ server, db, key }) browserStore.reloadKey({ server, db, key })
} }
dialogStore.closeNewKeyDialog()
} else if (!isEmpty(msg)) { } else if (!isEmpty(msg)) {
$message.error(msg) $message.error(msg)
} }
dialogStore.closeNewKeyDialog()
} catch (e) { } catch (e) {
return false return false
} }

View File

@ -198,6 +198,7 @@ const useTabStore = defineStore('tab', {
}) })
this.tabList.push(tabItem) this.tabList.push(tabItem)
tabIndex = this.tabList.length - 1 tabIndex = this.tabList.length - 1
this._setActivatedIndex(tabIndex, true, subTab)
} else { } else {
const tab = this.tabList[tabIndex] const tab = this.tabList[tabIndex]
tab.blank = false tab.blank = false
@ -219,7 +220,6 @@ const useTabStore = defineStore('tab', {
tab.value = undefined tab.value = undefined
} }
} }
this._setActivatedIndex(tabIndex, true, subTab)
}, },
/** /**