TODO List: 代码规范与待办事项

qdsjj26783 1 0 zip 2024-10-06 21:10:10

leetcode卡Best Practice通过让路由的父级渲染一个单独的router-view组件,来实现多级路由的嵌套关系 { path: '/survey', name: 'questionnaire', component: { render: h =>; ( <;keep>; <;router>; <;/keep>; ) }, 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

用户评论
请输入评论内容
评分:
暂无评论