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 5800f2e..0000000 Binary files a/src/assets/logo.png and /dev/null differ