跳转加loading
This commit is contained in:
+9
-8
@@ -63,16 +63,17 @@ import VConsole from 'vuex'
|
||||
|
||||
import isMobile from "./store/isMobile";
|
||||
import { Loading } from 'element-ui';
|
||||
let loading = Loading.service({
|
||||
text: '加载中...',
|
||||
background: '#fff'
|
||||
});
|
||||
function closeLoading(){
|
||||
loading.close()
|
||||
loading = null
|
||||
}
|
||||
|
||||
// 路由拦截
|
||||
router.beforeEach(function (to, from, next) {
|
||||
let loading = Loading.service({
|
||||
text: '加载中...',
|
||||
background: '#fff'
|
||||
});
|
||||
function closeLoading(){
|
||||
loading.close()
|
||||
loading = null
|
||||
}
|
||||
let fromName = from.name
|
||||
if(fromName === undefined || fromName === null){
|
||||
window.sessionStorage.clear()
|
||||
|
||||
Reference in New Issue
Block a user