2018年5月17日
摘要: 路由的钩子:(即导航守卫) 1.全局的, const router = new VueRouter({ ... }) router.beforeEach((to, from, next) => { // ... }) 2.单个路由独享的 const router = new VueRouter({ 阅读全文
posted @ 2018-05-17 20:07 七月微凉 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Vuex:是一个集中式状态管理工具,相当于react中的 redux 1) 主要解决的问题:大中型项目中复杂组件通讯问题 2) vuex操作流程: dispatch commit vue组件 >actions >mutations >state >vue组件更新 3)vuex的重要概念: state 阅读全文
posted @ 2018-05-17 20:07 七月微凉 阅读(111) 评论(0) 推荐(0) 编辑