--- title: 前端开发规范 date: 2018-05-8 --- # 开发规范 1.组件都要以大写字母开头 2.重复使用的属性定义出来,避免不必要的内存消耗。 ```bash let businessData = this.props.businessData.toJS(); let count = businessData.count; const percent1 = this.percent(_.get(businessData, 'count.modelCount'), _.get(businessData, 'count.useCount')); ``` 3.git提交规范。配置步骤如下: ```bash 安装core.editor: git config --global core.editor "'E:\Program Files\Microsoft VS Code\Code.exe' -w" 通过项目找到docs--》git_commit_template 然后设置模板存放路径: git config --global commit.template 'E:\devt\git_commit_template' 通过命令行输入1:git add . 2:git commit 后即可弹出对应模板界面 # feat: 新增首页报表(切记冒号后面必须有空格) # 解释为什么要做这些改动(分行描述) #