Skip to content

Commit

Permalink
fix(ui): PluginAdd tab check
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Mar 14, 2018
1 parent 33b1e20 commit ca01d95
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/@vue/cli-ui/src/views/ProjectPluginsAdd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
},
}
},
Expand All @@ -203,6 +199,7 @@ export default {
mounted () {
requestAnimationFrame(() => {
this.$refs.searchInput.focus()
this.checkTab()
})
},
Expand All @@ -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({
Expand Down

0 comments on commit ca01d95

Please sign in to comment.