随笔分类 -  vue-router

进入特定页面才会缓存页面数据
摘要:// 进入当前路由拿数据 beforeRouteEnter (to, from, next) { next(vm => { // 通过 `vm` 访问组件实例 if (from.path '/pa') { const { groupValue, queryPaymentBillParamModelL 阅读全文

posted @ 2021-06-15 16:24 章画 阅读(97) 评论(0) 推荐(0)

beforeEach
摘要:router.beforeEach((to, from, next) => { let path = to.path.split('/').pop() if (obj[path]) { document.title = obj[path] next() } // 跳转到其他暂无数据页面 next() 阅读全文

posted @ 2020-10-19 13:02 章画 阅读(258) 评论(0) 推荐(0)

0spa和前端路由
摘要:SPA: Single Page Application(单页面复应用程序) 就是只有一个Web网页(通常是index.html)的应用。vue开发的页面典型就是spa。 后台服务器通常有两种类型:静态资源服务器+api数据接口服务器。 本地vue开发默认会新起一个http://localhost: 阅读全文

posted @ 2020-09-23 10:00 章画 阅读(154) 评论(0) 推荐(0)

导航