2018年10月24日

vue 监听state 任意值变化、监听mutations actions

摘要: // store.watch((state) => state.count + 1, (newCount) => { // console.log(' 监听') // }) // store.subscribe((mutations, state) => { // console.log(mutations) // }) // store.subscribeAction((actions, st... 阅读全文

posted @ 2018-10-24 15:31 童彪 阅读(851) 评论(0) 推荐(0) 编辑

vue 路由守卫

摘要: router.beforeEach((to, from, next) => { // store.commit('numberCardModuleConInit', { // url: to.path // }); store.state.fromPage = from; store.commit("setHeaderConfig", to.path); // se... 阅读全文

posted @ 2018-10-24 15:29 童彪 阅读(180) 评论(0) 推荐(0) 编辑

开发webapp手机返回键 退出问题 摘录

摘要: mui进行手机物理键的监听 确保引入mui 调用以下函数 阅读全文

posted @ 2018-10-24 13:39 童彪 阅读(328) 评论(0) 推荐(0) 编辑

导航