Skip to content

Commit 25171a5

Browse files
author
Guillaume Chau
committed
feat(project-import): loading on import button
1 parent fd309b9 commit 25171a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/@vue/cli-ui/src/views/ProjectSelect.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
:label="$route.query.action || $t('org.vue.views.project-select.buttons.import')"
5252
class="big primary import-project"
5353
:disabled="!folderCurrent.isPackage"
54+
:loading="busy"
5455
@click="importProject()"
5556
/>
5657
</div>
@@ -118,7 +119,8 @@ export default {
118119
folderCurrent: {},
119120
tab: undefined,
120121
hideTabs: !!this.$route.query.hideTabs,
121-
showNoModulesModal: false
122+
showNoModulesModal: false,
123+
busy: false
122124
}
123125
},
124126
@@ -144,6 +146,8 @@ export default {
144146
},
145147
146148
async importProject () {
149+
this.busy = true
150+
await this.$nextTick()
147151
try {
148152
await this.$apollo.mutate({
149153
mutation: PROJECT_IMPORT,
@@ -159,6 +163,7 @@ export default {
159163
if (e.graphQLErrors && e.graphQLErrors.some(e => e.message === 'NO_MODULES')) {
160164
this.showNoModulesModal = true
161165
}
166+
this.busy = false
162167
}
163168
}
164169
}

0 commit comments

Comments
 (0)