zhangyuang / ssr

A most advanced ssr framework support React17/React18/Vue2/Vue3 on Earth that implemented serverless-side render specification.
http://doc.ssr-fc.com/
MIT License
2.59k stars 283 forks source link

怎么使用路由守卫 #231

Closed pmh1314 closed 2 years ago

pmh1314 commented 2 years ago

以往纯vue项目,可以在router.beforeEach路由守卫判断是否有token等,在这个ssr框架应该怎么实现此功能??

zhangyuang commented 2 years ago

能拿到router就行了,vue2就是this.$router,vue3就是useRouter

zhangyuang commented 1 year ago

搜文档

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: pmh1314 @.> 发送时间: 2022年8月2日 12:29 收件人: zhangyuang/ssr @.> 抄送: Subscribed @.***> 主题: Re: [zhangyuang/ssr] 怎么使用路由守卫 (Issue #231)

以往纯vue项目,可以在router.beforeEach路由守卫判断是否有token等,在这个ssr框架应该怎么实现此功能??

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>