dataease-dm/frontend/代码规范.MD
2021-02-19 16:34:02 +08:00

24 lines
873 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

####文件命名:
- html 小写字母+横线,例如:index.htmlorg-list.html
- js 小写字母+横线,例如:i18n.jsen-US.js
- vue 驼峰命名首字母大写例如Login.vueHeaderUser.vue
####变量命名:
- 常量 大写字母加下划线,例如:const ROLE_ADMIN='admin'
- 变量 驼峰命名首字母小写例如let namelet currentProject
- 方法 驼峰命名首字母小写例如function open(){}function openDialog()
####Vue组件:
- 导出名称 驼峰命名首字母大写以Ms开头例如MsUser
####样式规范:
- 控件的样式写在vue文件的<style scoped></style>
- 公共样式多个控件使用写在单独的scss文件中
- 命名 小写字母+横线,例如.menu.header-menu#header-top
####格式要求:
- 遵循.editorconfig
####Vue风格指南:
- https://cn.vuejs.org/v2/style-guide/