后台前端开发规范

1、命名

【强制】文件名、文件夹名、变量名、方法名统一使用驼峰命名规则

1. \# 文件夹名
2. 正:userManager
3. 反:user_manager
4. 
5. \# 文件名
6. 正:productList.js
7. 反:productlist.js
8. 
9. \# 变量名
10. 正:let goodsList = [];
11. 反:let good_list_1 = [];
12. 
13. \# 方法名
14. 正:function **getUserList**(){}
15. 反:function **get_user_list**(){}

2、公共样式和脚本文件位置



1. LaiKeJaveAdminView
2. ├── src
3. │   ├── assets #静态文件
4. │   ├── common
5. │   │   ├── commonFunction 
6. │   │       └── common.js #通用js脚本位置
7. │   │   └── commonStyle
8. │   │       └── common.scss #通用样式位置

3、模块界面代码和js、css存放位置

1. LaiKeJaveAdminView
2. ├── src
3. │   ├── views
4. │   │   ├── 404.vue 
5. │   │   ├── Data #报表
6. │   │   │   ├── addvip-report
7. │   │   │   ├── goods-report
8. │   │   │   ├── orde-report
9. │   │   │   ├── vip-proportion
10. │   │   │   └── vipconsumption-report
11. │   └── webManage #js和css 分离文件夹
12. │       ├── css 
13. │       │   ├── data #报表
14. │       │   │   ├── addvip-report
15. │       │   │   ├── goods-report
16. │       │   │   ├── orde-report
17. │       │   │   └── vipconsumption-report
18. │       └── js
19. │           ├── data #报表
20. │           │   ├── addvip-report
21. │           │   ├── goods-report
22. │           │   ├── orde-report
23. │           │   ├── vip-proportion
24. │           │   └── vipconsumption-report

4、界面编码规范遵循vue规范

vue编码规范

最后更新:2022年12月30日

Copyright © www.laiketui.com all right reserved,powered by Gitbook该文件修订时间: 2024-05-30 14:22:04

results matching ""

    No results matching ""