划分目录结构
assets资源
包含css及img
common公用
主要包含一些公用的js文件,类似const.js,utils.js
components组件
其中common是一些公用的组件,可以通用,content是自定义的组件
network网络相关
router路由
store状态
views界面
其中包含各个页面的文件夹
引入css文件
normalize.css
从github上下载
base.css
配置vue.config.js和editorconfig
vue.config.js设置别名
module.exports = {
configureWebpack: {
resolve: {
alias: {
'@' : 'src',
'assets' : 'src/assets',
'common' : 'src/common',
'components' : 'src/components',
'network' : 'src/network',
'views' : 'src/;views',
}
}
}
}
editorconfig
设置统一编程风格
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true