摘要: beforeEach 该钩子函数主要用来做权限的管理认证 router.beforeEach((to, from, next) => { if (to.matched.some(record => record.meta.requiresAuth)) { // this route requires 阅读全文
posted @ 2021-01-15 18:02 baifangzi 阅读(923) 评论(0) 推荐(0) 编辑
摘要: 在vue2中一般放在created中,但是在vue3中取消了created生命周期,请求方式有两种 直接在setup中去获取数据 setup(props) { const data = reactive({ note: [], }); getArticalLatest().then((res) => 阅读全文
posted @ 2021-01-15 16:43 baifangzi 阅读(2140) 评论(0) 推荐(0) 编辑