Global loading done.

This commit is contained in:
chiayin
2023-02-15 16:26:07 +08:00
parent 79b503bd8a
commit 819199864d
9 changed files with 110 additions and 19 deletions

View File

@@ -4,28 +4,34 @@
<Navbar/>
</header>
<main>
<Loading v-if="loadingStore.isLoading" />
<router-view></router-view>
</main>
</template>
<script>
import loginStore from '@/stores/login.js';
import LoginStore from '@/stores/login.js';
import LoadingStore from '@/stores/loading.js';
import Header from "@/components/Header.vue";
import Navbar from "@/components/Navbar.vue";
import Loading from '@/components/Loading.vue';
export default {
name: 'MainContainer',
setup() {
const store = loginStore();
const { checkLogin } = store;
const loginStore = LoginStore();
const loadingStore = LoadingStore();
const { checkLogin } = loginStore;
return {
checkLogin,
loadingStore,
}
},
components: {
Header,
Navbar,
Loading,
},
created() {
/**