mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
store first makeFetch, with loading spinner
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
:class="{'active': activeTab === 'MyWorks'}"
|
||||
@click="selectTab('MyWorks')">
|
||||
{{ $t('my_works') }}
|
||||
<!-- <span class="badge rounded-pill bg-danger counter">2</span> -->
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
@@ -43,6 +44,9 @@
|
||||
{{ $t('my_notifications') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item loading ms-auto py-2" v-if="loading">
|
||||
<i class="fa fa-circle-o-notch fa-spin fa-lg text-chill-gray" :title="$t('loading')"></i>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="my-4">
|
||||
@@ -74,6 +78,7 @@ import MyEvaluations from './MyEvaluations';
|
||||
import MyTasks from './MyTasks';
|
||||
import MyAccompanyingCourses from './MyAccompanyingCourses';
|
||||
import MyNotifications from './MyNotifications';
|
||||
import { mapState, mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
@@ -91,11 +96,16 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'loading',
|
||||
]),
|
||||
...mapGetters([
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
selectTab(tab) {
|
||||
console.log('load tab content', tab);
|
||||
this.activeTab = tab;
|
||||
this.$store.dispatch('getByTab', tab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user