mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-02-06 15:08:27 -06:00
fix(ui): PluginAdd tab check
This commit is contained in:
@@ -185,11 +185,7 @@ export default {
|
||||
query: PLUGIN_INSTALLATION,
|
||||
fetchPolicy: 'netork-only',
|
||||
result () {
|
||||
if (this.pluginInstallation.pluginId) {
|
||||
this.tabId = 'config'
|
||||
} else {
|
||||
this.tabId = 'search'
|
||||
}
|
||||
this.checkTab()
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -203,6 +199,7 @@ export default {
|
||||
mounted () {
|
||||
requestAnimationFrame(() => {
|
||||
this.$refs.searchInput.focus()
|
||||
this.checkTab()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -211,6 +208,16 @@ export default {
|
||||
this.$router.push({ name: 'project-home' })
|
||||
},
|
||||
|
||||
checkTab () {
|
||||
if (!this.pluginInstallation) return
|
||||
|
||||
if (this.pluginInstallation.pluginId) {
|
||||
this.tabId = 'config'
|
||||
} else {
|
||||
this.tabId = 'search'
|
||||
}
|
||||
},
|
||||
|
||||
async installPlugin () {
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
|
||||
Reference in New Issue
Block a user