ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
* 在pages目录下创建layout.vue组件 * 在router.js文件内配置layout组件的路由 ~~~  import Vue from "vue"  import Router from "vue-router"  ​  Vue.use(Router)  ​  export default new Router({   routes : [   {   path : "/login",   name : "login",   component : ()=> import("./pages/login.vue")   },   {   path : "/",   name : "layout",   component : ()=> import("./pages/layout.vue")   }   ]  }) ~~~ * 使用iview的布局组件实现主页布局 ~~~  <template>   <Layout class="layout">   <Header class="bg-white px-0">导航栏</Header>   <Layout>   <Sider hide-trigger class="bg-light">侧边栏</Sider>   <Content class="bg-white">主内容</Content>   </Layout>   <Footer class="bg-white d-flex p-0 ">   <div class="bg-light footer-left">   空间容量信息   </div>   <div>分页</div>   </Footer>   </Layout>  </template>  ​  <script>  </script>  ​  <style scoped="scoped">   .layout {   height: 100%;   }   .footer-left{   width: 200px;   }  </style>  ​ ~~~