傍晚代码还好好的 吃个饭回来后出现28个错误 我也不清楚为什么
https://img-mid.csdnimg.cn/release/static/image/mid/ask/68402471356617.png "#left")
```javascript
<template>
<el-container class="bookhome-container">
<el-header>
<div>
<img class="el-header-logo" src="../assets/img/logo.jpg">
<span> 图书管理系统</span>
</div>
<el-button @click="loginOut" type="info">退出</el-button>
</el-header>
<el-container>
<el-aside :width="isCollapse ?'64px':'200px'">
<div class="toggle-button" @click="toggleCollapse">|||</div>
<el-menu :router="true" unique-opened :collapse="isCollapse" :collapse-transition="false"
background-color="#333744" text-color="#fff" active-text-color="#409BFF">
<el-submenu index="1">
<template slot="title">
</template>
<el-menu-item index="/getallbook">
<template slot="title">
</template>
</el-menu-item>
</el-submenu>
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</template>
<script>
import { response } from 'express'
export default {
name:'BookName',
data(){
return{
// 控制侧边栏是否折叠
isCollapse:false,
}
},
created(){
this.getMenuList()
},
methods:{
// 退出登录
loginOut(){
// 把taken清空
window.sessionStorage.clear()
// 进入到登录页面
this.$router.push('/userLogin')
},
// 获取侧边栏菜单
getMenuList(){
// 查看我们自己写的后端文档
this.$http.get('/menus')
.then(
// 请求成功时的回调
response=>{
console.log(response.data)
},
// 请求失败时的回调
error=>{
this.$message.warning("服务器出现错误")
}
)
},
// 控制侧边栏是否折叠
toggleCollapse(){
this.isCollapse = !this.isCollapse
},
}
}
</script>
<style lang="less" scoped>
```