别再只懂install_github了!深入聊聊R包管理:GitHub PAT、依赖与Linux系统库的那些事儿
2026/5/16 22:30:15
如果你发现:
那说明:Layout 没设计好。
一句话总结:
Layout 负责页面结构,不负责业务。
layouts/ ├── MainLayout.vue ├── BlankLayout.vue ├── AdminLayout.vue{path:'/',component:MainLayout,children:[...]}登录页:
{path:'/login',component:BlankLayout,children:[...]}<template> <Header /> <router-view /> </template>因为这样可以:
{path:'/admin',component:AdminLayout,children:adminRoutes}不同角色看到不同布局,不用改页面代码。
Layout 是 UI 骨架,Router 是应用骨架。
这两个分清楚,项目可维护性直接上一个台阶。