TODO List: 代码规范与待办事项
leetcode卡Best Practice通过让路由的父级渲染一个单独的router-view组件,来实现多级路由的嵌套关系 { path: '/survey', name: 'questionnaire', component: { render: h => ( <> <router> </> ) }, children:[ //... ] }
路由name按照层级命名 { component: () => import('@/views/Withdraw/Result/Description/Index.vue'), name: 'withdraw-result-description', path: '/withdraw/result/description' }
。避免使用魔术数字,声明常量保存魔术数字 const SELECTED = 1
,例如: if(x === SELECTED){ //... }
。DOM/自定义事件处理程序的函数名用 handle
作为开头,例如: <button onclick=\"handl