yxk_pc_mdh/src/App.vue

102 lines
2.2 KiB
Vue

<template>
<div id="app">
<router-view v-if="isRouterAlive"/>
</div>
</template>
<script>
import './assets/css/reset.css'
import {mapActions} from "vuex";
export default {
name: "App",
data(){
return {
isRouterAlive:true,
}
},
provide(){
return {
reload:this.reload
}
},
// TODO: 全局状态加载及变更。请根据实际情况改写
beforeMount() {
// 首次加载/刷新时判断当前是否在登录状态
// if (Cookie.get('isLogin')) {
// console.log("重新登录")
// this.$store.dispatch('auth/relogin')
// }
// // 加载默认语言包
// let defLang = Cookie.get('lang') || this.$i18n.locale
// this.$store.dispatch("loadLang", defLang)
},
mounted() {
this.getLogoUrl()
},
methods:{
...mapActions({
getLogoUrl: "common/getLogoUrl"
}),
reload(){
this.isRouterAlive=false;
this.$nextTick(function () {
this.isRouterAlive=true;
})
},
}
};
</script>
<style>
#app {
height: 100%;
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #222;
margin-top: 0px;
}
.el-form-item{
margin-bottom: 5px !important;
}
.el-form-item__error {
position: relative !important;
top: auto !important;
left: auto !important;
display: inline-block !important;
margin-left: 10px !important;
}
.el-drawer__wrapper{
left: auto !important;
width: 860px !important;
}
.el-drawer{
padding-bottom: 60px;
box-sizing: border-box;
box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14), 0 6px 30px 5px rgba(0,0,0,.12)!important;
}
.dialog-footer{
position: absolute;
bottom: 20px;
width: 100%;
left: 0;
}
.footer_btn{
display: block;
margin: auto;
}
.sys-form textarea,.el-textarea__inner{
font-family: inherit;
}
/* .el-message__content:before{
content: '芯软云提示:';
position: relative;
} */
/*.sys-box{*/
/* min-height: calc(100vh - 124px);*/
/* box-sizing: border-box;*/
/*}*/
</style>