# src 代码目录
#assets 静态资源
#font 字体图标
#index.less 公共样式
#variable.less公共变量
#其他图片文件
#components 组件
#ripple 点击效果插件
#loader-picker.vue 加载提示组件
#router 路由
#index.js 路由文件
const index = r => require(['../views/index'], r)
const index = r => require.ensure([], () => r(require('../views/index')), 'index') 建议使用,异步模块化加载,最后面的index参数同名的会打包成同个chunk文件
base:'root', 配置项目的根文件路径名
mode:'history', 模式,history表示不会使用?号这种模式
#store 状态管理及api
#modules 状态模块
#index.js 导出所有的模块
#其他文件 其他模块 (可参考项目写法?)
1.import 导入依赖
2.const state 声明状态
3.const mutations 声明mutations
4.const actions 声明actions
5.export 导出去
#api.js 接口api
vue 开发目录结构实践分析
最新推荐文章于 2024-06-20 10:26:21 发布