From 441bccb5c90971aaf86ee035cc7dc3f52ec4494c Mon Sep 17 00:00:00 2001 From: saatana <1041367524@qq.com> Date: Wed, 23 Mar 2022 15:15:17 +0800 Subject: [PATCH] doc: readme --- .eslintcache | 1 - .gitignore | 3 +- README.md | 144 ++++++++++++++++++++++++++++++++++++++++++- TODO.md | 5 +- commitlint.config.js | 4 +- src/assets/logo.png | Bin 9176 -> 0 bytes 6 files changed, 149 insertions(+), 8 deletions(-) delete mode 100644 .eslintcache delete mode 100644 src/assets/logo.png diff --git a/.eslintcache b/.eslintcache deleted file mode 100644 index de63735..0000000 --- a/.eslintcache +++ /dev/null @@ -1 +0,0 @@ -[{"F:\\vue\\shop-admin\\src\\main.js":"1","F:\\vue\\shop-admin\\src\\App.vue":"2","F:\\vue\\shop-admin\\src\\icons\\index.js":"3","F:\\vue\\shop-admin\\src\\store\\index.js":"4","F:\\vue\\shop-admin\\src\\router\\index.js":"5","F:\\vue\\shop-admin\\src\\plugins\\index.js":"6","F:\\vue\\shop-admin\\src\\store\\modules\\demo.js":"7","F:\\vue\\shop-admin\\src\\store\\modules\\layout.js":"8","F:\\vue\\shop-admin\\src\\store\\modules\\auth.js":"9","F:\\vue\\shop-admin\\src\\store\\modules\\local.js":"10","F:\\vue\\shop-admin\\src\\store\\modules\\system\\user.js":"11","F:\\vue\\shop-admin\\src\\router\\demo.js":"12","F:\\vue\\shop-admin\\src\\router\\modules\\system.js":"13","F:\\vue\\shop-admin\\src\\configs\\index.js":"14","F:\\vue\\shop-admin\\src\\plugins\\element-plus.js":"15","F:\\vue\\shop-admin\\src\\plugins\\global-api.js":"16","F:\\vue\\shop-admin\\src\\api\\auth.js":"17","F:\\vue\\shop-admin\\src\\api\\system\\user.js":"18","F:\\vue\\shop-admin\\src\\utils\\request.js":"19","F:\\vue\\shop-admin\\src\\layouts\\default.vue":"20","F:\\vue\\shop-admin\\src\\views\\system\\user\\index.vue":"21","F:\\vue\\shop-admin\\src\\layouts\\components\\main.vue":"22","F:\\vue\\shop-admin\\src\\layouts\\components\\aside.vue":"23","F:\\vue\\shop-admin\\src\\layouts\\components\\menu.vue":"24","F:\\vue\\shop-admin\\src\\layouts\\components\\header.vue":"25","F:\\vue\\shop-admin\\src\\layouts\\components\\tabs.vue":"26","F:\\vue\\shop-admin\\src\\layouts\\components\\footer.vue":"27","F:\\vue\\shop-admin\\src\\components\\TableList.vue":"28","F:\\vue\\shop-admin\\src\\components\\extra\\ElInput.vue":"29","F:\\vue\\shop-admin\\src\\components\\extra\\ElDropdown.vue":"30","F:\\vue\\shop-admin\\src\\components\\extra\\ElButton.vue":"31","F:\\vue\\shop-admin\\src\\components\\extra\\ElImage.vue":"32","F:\\vue\\shop-admin\\src\\layouts\\components\\view.vue":"33","F:\\vue\\shop-admin\\src\\components\\extra\\ElIcon.vue":"34","F:\\vue\\shop-admin\\src\\layouts\\components\\logo.vue":"35","F:\\vue\\shop-admin\\src\\layouts\\components\\title.vue":"36","F:\\vue\\shop-admin\\src\\layouts\\components\\menu-item.vue":"37","F:\\vue\\shop-admin\\src\\layouts\\components\\breakcrumb.vue":"38","F:\\vue\\shop-admin\\src\\layouts\\components\\profile.vue":"39","F:\\vue\\shop-admin\\src\\layouts\\components\\operation.vue":"40","F:\\vue\\shop-admin\\src\\components\\extra\\ElDialog.vue":"41","F:\\vue\\shop-admin\\src\\components\\extra\\ElRadioGroup.vue":"42","F:\\vue\\shop-admin\\src\\components\\extra\\ElTable.vue":"43","F:\\vue\\shop-admin\\src\\views\\system\\user\\form.vue":"44","F:\\vue\\shop-admin\\src\\components\\extra\\ElUploadImage.vue":"45"},{"size":296,"mtime":1647912669488,"results":"46","hashOfConfig":"47"},{"size":662,"mtime":1648009242359,"results":"48","hashOfConfig":"47"},{"size":72,"mtime":1647912669459,"results":"49","hashOfConfig":"50"},{"size":1676,"mtime":1647912669493,"results":"51","hashOfConfig":"47"},{"size":5460,"mtime":1647999198730,"results":"52","hashOfConfig":"47"},{"size":267,"mtime":1647912669489,"results":"53","hashOfConfig":"47"},{"size":378,"mtime":1647912669494,"results":"54","hashOfConfig":"47"},{"size":2330,"mtime":1647937447465,"results":"55","hashOfConfig":"47"},{"size":4204,"mtime":1647999150874,"results":"56","hashOfConfig":"47"},{"size":526,"mtime":1647912669495,"results":"57","hashOfConfig":"47"},{"size":2420,"mtime":1648008829876,"results":"58","hashOfConfig":"47"},{"size":957,"mtime":1647937631999,"results":"59","hashOfConfig":"47"},{"size":1949,"mtime":1648004326412,"results":"60","hashOfConfig":"47"},{"size":394,"mtime":1647943242423,"results":"61","hashOfConfig":"47"},{"size":826,"mtime":1647912669489,"results":"62","hashOfConfig":"47"},{"size":458,"mtime":1647936508332,"results":"63","hashOfConfig":"47"},{"size":860,"mtime":1647912669448,"results":"64","hashOfConfig":"47"},{"size":2217,"mtime":1648008527834,"results":"65","hashOfConfig":"47"},{"size":2091,"mtime":1648008377687,"results":"66","hashOfConfig":"47"},{"size":1416,"mtime":1647945572403,"results":"67","hashOfConfig":"47"},{"size":4645,"mtime":1648008936701,"results":"68","hashOfConfig":"50"},{"size":1120,"mtime":1648008492949,"results":"69","hashOfConfig":"47"},{"size":2891,"mtime":1647944953099,"results":"70","hashOfConfig":"47"},{"size":2610,"mtime":1648008492949,"results":"71","hashOfConfig":"47"},{"size":1441,"mtime":1647944973602,"results":"72","hashOfConfig":"47"},{"size":6084,"mtime":1648008492949,"results":"73","hashOfConfig":"47"},{"size":593,"mtime":1648008805484,"results":"74","hashOfConfig":"47"},{"size":21846,"mtime":1647912697030,"results":"75","hashOfConfig":"50"},{"size":1313,"mtime":1648008763695,"results":"76","hashOfConfig":"47"},{"size":1806,"mtime":1647912669455,"results":"77","hashOfConfig":"47"},{"size":561,"mtime":1647912669454,"results":"78","hashOfConfig":"47"},{"size":2368,"mtime":1648009016471,"results":"79","hashOfConfig":"50"},{"size":494,"mtime":1647937512421,"results":"80","hashOfConfig":"47"},{"size":1704,"mtime":1648008492948,"results":"81","hashOfConfig":"47"},{"size":755,"mtime":1648008492948,"results":"82","hashOfConfig":"47"},{"size":1168,"mtime":1648008815841,"results":"83","hashOfConfig":"47"},{"size":2133,"mtime":1647943954155,"results":"84","hashOfConfig":"47"},{"size":945,"mtime":1647912669483,"results":"85","hashOfConfig":"47"},{"size":921,"mtime":1648008954708,"results":"86","hashOfConfig":"47"},{"size":1189,"mtime":1647912669486,"results":"87","hashOfConfig":"47"},{"size":3483,"mtime":1647912669455,"results":"88","hashOfConfig":"50"},{"size":1859,"mtime":1647912669457,"results":"89","hashOfConfig":"47"},{"size":10387,"mtime":1647914304818,"results":"90","hashOfConfig":"50"},{"size":4226,"mtime":1648008492949,"results":"91","hashOfConfig":"47"},{"size":6783,"mtime":1648009137102,"results":"92","hashOfConfig":"47"},{"filePath":"93","messages":"94","suppressedMessages":"95","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1ultby",{"filePath":"96","messages":"97","suppressedMessages":"98","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"99","messages":"100","suppressedMessages":"101","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"102"},"v8rxji",{"filePath":"103","messages":"104","suppressedMessages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"106","messages":"107","suppressedMessages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"109","messages":"110","suppressedMessages":"111","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"112","messages":"113","suppressedMessages":"114","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"115","messages":"116","suppressedMessages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","suppressedMessages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","suppressedMessages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","suppressedMessages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","suppressedMessages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","suppressedMessages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","suppressedMessages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","suppressedMessages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","suppressedMessages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","suppressedMessages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","suppressedMessages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"157"},{"filePath":"158","messages":"159","suppressedMessages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"161","messages":"162","suppressedMessages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"164","messages":"165","suppressedMessages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"167","messages":"168","suppressedMessages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"170","messages":"171","suppressedMessages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"173","messages":"174","suppressedMessages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"176","messages":"177","suppressedMessages":"178","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"157"},{"filePath":"179","messages":"180","suppressedMessages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"182","messages":"183","suppressedMessages":"184","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"185","messages":"186","suppressedMessages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"188","messages":"189","suppressedMessages":"190","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"157"},{"filePath":"191","messages":"192","suppressedMessages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"194","messages":"195","suppressedMessages":"196","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"197","messages":"198","suppressedMessages":"199","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"200","messages":"201","suppressedMessages":"202","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"203","messages":"204","suppressedMessages":"205","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"206","messages":"207","suppressedMessages":"208","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"209","messages":"210","suppressedMessages":"211","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"212","messages":"213","suppressedMessages":"214","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"215","messages":"216","suppressedMessages":"217","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"157"},{"filePath":"218","messages":"219","suppressedMessages":"220","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"221","messages":"222","suppressedMessages":"223","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"157"},{"filePath":"224","messages":"225","suppressedMessages":"226","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"227","messages":"228","suppressedMessages":"229","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"F:\\vue\\shop-admin\\src\\main.js",[],[],"F:\\vue\\shop-admin\\src\\App.vue",[],[],"F:\\vue\\shop-admin\\src\\icons\\index.js",[],[],[],"F:\\vue\\shop-admin\\src\\store\\index.js",[],[],"F:\\vue\\shop-admin\\src\\router\\index.js",[],[],"F:\\vue\\shop-admin\\src\\plugins\\index.js",[],[],"F:\\vue\\shop-admin\\src\\store\\modules\\demo.js",[],[],"F:\\vue\\shop-admin\\src\\store\\modules\\layout.js",[],[],"F:\\vue\\shop-admin\\src\\store\\modules\\auth.js",[],[],"F:\\vue\\shop-admin\\src\\store\\modules\\local.js",[],[],"F:\\vue\\shop-admin\\src\\store\\modules\\system\\user.js",[],[],"F:\\vue\\shop-admin\\src\\router\\demo.js",[],[],"F:\\vue\\shop-admin\\src\\router\\modules\\system.js",[],[],"F:\\vue\\shop-admin\\src\\configs\\index.js",[],[],"F:\\vue\\shop-admin\\src\\plugins\\element-plus.js",[],[],"F:\\vue\\shop-admin\\src\\plugins\\global-api.js",[],[],"F:\\vue\\shop-admin\\src\\api\\auth.js",[],[],"F:\\vue\\shop-admin\\src\\api\\system\\user.js",[],[],"F:\\vue\\shop-admin\\src\\utils\\request.js",[],[],"F:\\vue\\shop-admin\\src\\layouts\\default.vue",[],[],"F:\\vue\\shop-admin\\src\\views\\system\\user\\index.vue",[],[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\main.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\aside.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\menu.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\header.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\tabs.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\footer.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\TableList.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElInput.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElDropdown.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElButton.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElImage.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\view.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElIcon.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\logo.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\title.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\menu-item.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\breakcrumb.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\profile.vue",[],[],"F:\\vue\\shop-admin\\src\\layouts\\components\\operation.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElDialog.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElRadioGroup.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElTable.vue",[],[],"F:\\vue\\shop-admin\\src\\views\\system\\user\\form.vue",[],[],"F:\\vue\\shop-admin\\src\\components\\extra\\ElUploadImage.vue",[],[]] \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5d50172..aedec16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -.idea -.DS_Store +.elintchache node_modules dist *.local diff --git a/README.md b/README.md index ff1e7e0..fdf3d70 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,143 @@ -# shop-admin +# 马士兵严选管理平台 -马士兵严选后台管理 \ No newline at end of file +## 技术架构 + +- vite + > 新兴主流项目编译构建工具,与 webpack 相比构建速度极快 +- vue3 + > vue 最新版本,声明式 API,组件内各功能点代码耦合性低,易扩展维护 +- vue-router + > SPA 路由系统 +- vuex + > 数据状态管理,规范组件之间数据传递,更好得监测数据状态变化 +- axios + > AJAX 请求封装库,用于调用 API 接口 +- element-plus + > 基础组件库 + +## 插件 + +- jsx + > javascript & react 语法,封装组件时编码更加灵活方便,功能开发时不推荐使用 +- svg-icon + > 根据自定义 svg 文件生成 icon +- auto-import + > 编译时自动引入依赖 +- components + > 编译时自动局部注册 ElementPlus 组件和 src/components 目录下的自定义组件 +- style-import + > 编译时按需引用 ElementPlus 样式文件 +- global-style + > 编译时自动注入全局样式和变量 +- remove-console + > 打包时自动移除 console 语句 +- legacy + > 浏览器兼容处理 +- eslint + > 不影响 HMR 编译速度的情况下异步进行 eslint 代码校验 +- husky + > git hooks 管理 +- lint-staged + > git commit 时仅对提交部分代码进行 eslint 校验 +- commitlint + > git commit 时对提交信息进行规范校验 + +## 规范约束 + +- 使用 VS Code 进行开发,并安装项目推荐的插件 +- 不允许修改 src 目录以外的(项目配置)文件 +- 有需要优化解决的问题记录到 TODO.md 文件中,包括技术方面的踩坑记录和业务方面的 BUG 记录 +- 按照当前项目结构进行功能开发,不允许随意改变项目文件结构 + +## 项目结构 + +| SRC 目录 | 用途描述 | +| ---------- | ---------------------------- | +| api | API 接口定义 | +| assets | 资源文件,按功能模块分文件夹 | +| components | 自定义通用组件 | +| configs | 项目框架配置 | +| icons | 图标库,svg 图标文件 | +| layouts | 页面框架布局 | +| plugins | 全局插件模块 | +| router | 本地路由模块 | +| store | 数据状态模块 | +| styles | 全局样式模块 | +| utils | 工具类库模块 | +| views | SFC 模块,页面文件 | + +## 开发须知 + +### 通用组件 + +- 文件规范命名,使用简单易懂的单词概括组件的功能 +- 写好 Props 参数注释 +- 具有良好的扩展性和通用性 +- 优化、修复问题时考虑向下兼容,尽可能不影响已有代码 +- 使用 setup script 语法糖和 jsx 语法 +- 有数据绑定功能的必须支持 v-mdoel 语法 + +### 路由页面 + +- 严格遵循既定的项目模块结构 +- 单个功能页面之间通用组件应单独在页面目录创建 components 文件夹,而不是全部都放进 src/components +- 必须使用 defineComponent 包裹组件定义,并定义好具有唯一性的 name +- 不允许使用 this,严禁滥用 getCurrentInstance(),proxy 对象只用于访问全局方法 +- 规范使用 ref、reactive、toRefs、unref 等响应式 API,访问响应式数据时应使用 unref 包裹而不是访问 .value +- 各个功能点应区分代码块并写好注释,不允许延续 vue2 编码思想将各个功能点代码耦合在一起,特别复杂逻辑应代码分块并单独创建文件引入使用 +- 不允许以任何形式直接修改 props 传入的值,包括对象中的属性和数组中的元素,如需双向绑定应使用触发事件 update:propsName 的方式 +- 页面根元素应包含 \*-container 的 class,无特殊情况使用单根元素,多根元素会影响动画过渡效果 + +### 工具类库 + +- 项目已集成 lodash、dayjs,不要重复造轮子 +- 全局方法应在 plugins/global-api.js 中注册,而不是写成工具类到处引用 +- 注释中应有完善的功能说明、入参出参说明、注意事项等 +- 新增工具类后应及时通知所有项目开发者知悉 +- 优化修复工具类应向下兼容确保不会影响已有代码,改动较大应召集相关人员商讨解决方案 +- 应进行完善的逻辑测试和性能测试,确保不会影响项目稳定性,谨慎使用 setTimeout、setInterval 等循环\递归操作 + +### 状态管理 + +- 每个功能模块都要对应一个数据状态管理模块 +- 必须通过 mutations 修改 state 中的数据 +- 字典数据应全部存放在 state 中统一管理 +- 接口调用及后续数据逻辑处理应在 actions 中进行,保证多处调用时行为统一 + +### 样式相关 + +- 参考 src/styles/gobalVariables.module.less,颜色、字号、边距、圆角尽可能复用已有的变量 +- 没有特殊需求不允许写全局样式,stlye 标签必须加 scoped +- 深度选择器使用 :deep(<selector>){} 语法,>>> 、/deep/、v-deep:都已弃用 +- 没有特殊需求不允许定义或使用 ID 选择器、属性选择器 + +### 分支管理 + +- 分支命名:父分支-功能描述-创建日期-创建人;例如:beta-userManagement-0323-xwk +- 紧急修复应基于 dev 分支创建,功能分支应基于 beta 分支创建 +- 提测前先将 beta 分支合并到功能分支解决冲突,再将功能分支合并到 test 分支,严禁将 test 分支合并进其他任何分支 +- 测试通过后先将 beta 分支合并到功能分支解决冲突,再通过提 push request 通知负责人进行代码审查,审查通过后由负责人合并代码 +- 预发通过后先将 dev 分支合并到 beta 分支解决冲突,再将 beta 分支合并到 dev 分支,此操作只能由负责人进行 +- 解决冲突时如涉及其他开发者代码,应跟当事人确认无误后再合并 + +### 提交代码 + +- 提交前确认项目能正常运行,改动部分功能正常 +- 严格遵循 eslint、prettier 代码规范 +- 严禁使用 git commit --no-verify -m "xxx" 强制提交代码 +- 规范提交信息 + + | 前缀 | 使用场景 | 示例 | + | -------- | ------------------------------ | -------------------------- | + | feat | 新增功能点、模块 | feat: 用户管理 | + | fix | 修复 BUG | fix: 用户管理分页异常 | + | doc | 文档、注释更新 | doc: README | + | style | 样式、不影响逻辑的代码格式更新 | style: 用户管理标题字号 | + | refactor | 重构功能点、模块 | refactor: 路由模块逻辑重构 | + | test | 测试 | test: 测试工具类 | + | revert | 撤回提交 | revert: 有文件漏提交 | + | build | 编译打包 | build: 编译用户管理 | + | merge | 合并分支 | merge: beta into dev | + | perf | 性能、体验、逻辑优化 | pref: 路由模块解析性能 | + | conf | 配置更新 | conf: 项目 base 路径 | + | chore | 其他 | chore: 其他 | diff --git a/TODO.md b/TODO.md index b724286..fe68954 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1,4 @@ -- 自定义 SVG 图标颜色显示异常,初始颜色不对,鼠标移入颜色闪烁 +| 问题描述 | 作者 | 记录时间 | 状态 | 解决时间 | +| ------------------------------------------------------------- | ---- | --------- | -------- | -------- | +| 自定义 SVG 图标颜色显示异常,初始颜色不对,鼠标移入颜色闪烁 | xwk | 2022.3.22 | _待解决_ | +| perttier 保存时不会自动格式化属性排序、需要执行命令才能格式化 | xwk | 2022.3.23 | _待解决_ | diff --git a/commitlint.config.js b/commitlint.config.js index 724f695..2d880dc 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -4,8 +4,8 @@ module.exports = { 'type-enum': [ 2, 'always', - // 新增、修复、文档、不影响逻辑的代码格式、重构、测试、回滚、编译、持续集成、优化、配置、其他 - ['feat', 'fix', 'doc', 'style', 'refactor', 'test', 'revert', 'build', 'ci', 'perf', 'conf', 'chore'], + // 新增、修复、文档、不影响逻辑的代码格式、重构、测试、回滚、编译、合并、优化、配置、其他 + ['feat', 'fix', 'doc', 'style', 'refactor', 'test', 'revert', 'build', 'merge', 'perf', 'conf', 'chore'], ], }, }; diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index 5800f2e73d009742f815065b21332733285ce7c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9176 zcmbVS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