0.1.4 • Published 4 years ago

gepm-framework v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

前端规范

原则上每一个文件的代码量不应超过300行

两个空格缩进

目录采用小写英文,多单词之间用中划线分隔

文件名采用驼峰命名法,首字母小写

vue的单文件(.vue)的命名采用驼峰命名法但首字母大写

api目录下方法名以api_为前缀

store中mutations方法以mutate_为前缀

router中modules中的路由配置路径以文件名为前缀(防冲突)

vue单文件总体顺序从上到下为template-script-style

vue单文件script中属性顺序为:name,components,mixin,props,data,computed,watch,created,mounted,destroy,methods,filter

样式处理使用less,尽可能的使用scoped,禁止使用元素选择器