Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <v-container v-if="loading">
- <v-progress-circular></v-progress-circular>
- </v-container>
- <v-content v-if="!loading">
- <router-view></router-view>
- </v-content>
- export default {
- computed: {
- loading () {
- return this.$store.getters.getLoading
- },
- }
- }
- export default {
- created () {
- this.$store.dispatch('startWork')
- },
- actions: {
- startWork ({commit}) {
- commit('clearError')
- commit('setLoading', true)
- setTimeout(() => {
- console.log('make HTTP request')
- commit('setLoading', false)
- }, 1000)
- }
- },
Add Comment
Please, Sign In to add comment