VUE项目笔记

273 阅读1分钟

自查笔记,来自coderwhy老师的vue项目

1. 项目目录结构划分

image.png

2. 引入两个CSS文件

3.vue.config.js 和 .editorconfig

vue.config.js

//别名的配置。新建的。以后写文件路径的时候可以不写 ./  ../
module.exports = {
  configureWebpack: {
    resolve: {
      // extensions:[], 文件扩展名
      alias: {
        // '@':'src'  默认配置的别名
        'assets': '@/assets',
        'common': '@/common',
        'components': '@/components',
        'network': '@/network',
        'router':'@/router', //router 和store 不需要配置,因为只有一处会引用 $this.store $this.router
        'store':'store',
        'views': '@/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

4. 项目的模块划分:tabbar->路由映射关系

5. tabbar的封装思路

image.png