File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868- [ 通过 vuex 和 router 管理 登陆、注销 vuex. module 实现模块化 开启命名空间防止命名冲突 开启严格模式后,只允许通过 mutations 改变状态 getters 计算属性 mapState 简化命名空间相关代码 通过 template 逻辑容器处理同级元素] ( https://github.com/ceilf6/Lab/commit/5c77685db2f57937d161d20ac8152c08558d82a9 )
6969- [ 使用 route 对 vuex 的登陆态进行路由守卫、鉴权拦截 在路由对象中带上目标页信息,方便在登录之后重定向、鉴权 添加 exact-path 防止路由中 hash 和 query 对样式匹配的影响] ( https://github.com/ceilf6/Lab/commit/290f01b2b9d7a15321b3823007e559d90d8babfc )
7070- [ 公共库体积优化 利用 tree-shaking 优化 Vuex 利用 CDN: 对 webpack 声明不要对公共库进行打包(私有的要收费) 通过模版代码在index中进行分流,否则开发环境也用CDN资源就无法使用Vue-dev 生产环境传统CDN导入会自动"污染"全局 --modern 开启现代模式打包] ( https://github.com/ceilf6/Lab/commit/475030a855b06fd49e0bb7943a4ec25a38c2d1a3 )
71+ - [ 项目包体积优化 利用webpack对动态import的支持实现页面分包] ( https://github.com/ceilf6/Lab/commit/a9ad2ba0c1c58f6e711b671919dd5ac814f5ef54 )
You can’t perform that action at this time.
0 commit comments