export default ({app,redirect}) => { app.router.beforeEach(async (to,from,next)=>{ if( /* 非認証ページ */ ) { next(); } else if( /* 別途ストアの中に認証用データがないとき */ ){ redirect('/login'); } else { const auth = await なんらかの非同期メソッド(); if( /* なんらかの非同期メソッドがオッケーだった時 */ ){ next(); } else { redirect('/login'); } } }) } リダイレクト後のページのlayoutが遷移前のPageComponentのlayoutのママだったんですね。 Vue-devtoolで見てもlayoutそのまま。 これも、universalモードで、直接ア
