47 lines
803 B
Vue
47 lines
803 B
Vue
<template>
|
|
<div id="app" :class="mainClass">
|
|
<div class='loader' v-if="isLoading">
|
|
<div class='spinner-grow text-primary' role='status'>
|
|
<span class='sr-only'>Loading...</span>
|
|
</div>
|
|
</div>
|
|
<router-view/>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
|
|
import Alert from '@/components/Alert.vue';
|
|
import { mapGetters, mapState } from 'vuex';
|
|
|
|
export default {
|
|
data(){
|
|
return {
|
|
isLoading:true
|
|
}
|
|
},
|
|
computed:{
|
|
/**
|
|
* 授权页面添加特定类名
|
|
* @returns {string}
|
|
*/
|
|
mainClass(){
|
|
const path = this.$route.path
|
|
if(path.startsWith('/auth')){
|
|
return 'login-page'
|
|
}
|
|
}
|
|
},
|
|
mounted(){
|
|
this.isLoading = false
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
#app {
|
|
width: 100%;
|
|
height:100%;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
</style> |