vue 代码规范

83 阅读1分钟
import { method_1, method_2 } from 'sdk/xxxxx'

  

export default {

name: ‘xxx’,

components:{},

data () {},

props:{},

computed () {},

watch: {},

created () {},

mounted () {},

methods: {}

}

  


单个文件尽量不要超过**300行**(css 除外)

不要使用**EventBus,** 统一使用**vuex**

文件取名一律是有意义的**英文(** 小驼峰式命名法 **)**

每个页面都有一个属于自己的文件夹,文件夹内有modules,modules存放当前页面的组件

公共组件放components