摘要:
全局导航守卫:(在router.js中添加) router.beforeEach((to,from,next)=>{ if(to.name!=='login'){ if(localStorage.getItem('userid')){ next() }else{ next('login') } }e 阅读全文
摘要:
父组件: <template> <div class="box"> <Header > <div slot="left">你好</div> <div slot="right" @click="userFn">你好</div> </Header> <div class="content"> <h1 r 阅读全文