Compare commits
2 Commits
1decd5505a
...
c3c94132bf
Author | SHA1 | Date |
---|---|---|
lyc | c3c94132bf | |
lyc | 4e6d619762 |
|
@ -2,13 +2,16 @@
|
|||
<div class="page-aside">
|
||||
<div>
|
||||
<div>
|
||||
<el-popover placement="right" trigger="hover" :width="120" popper-class="popoverStyle">
|
||||
<el-popover placement="right" trigger="hover" :width="120" popper-class="popoverStyle" >
|
||||
<template #reference>
|
||||
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
|
||||
</template>
|
||||
<div class="head-aside">
|
||||
<span>11</span>
|
||||
<el-button type="primary" @click="logout">退出登录</el-button>
|
||||
<ul>
|
||||
<li @click="onUserTo('/profile')">个人中心</li>
|
||||
<li @click="onUserTo('/class')">班级中心</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
|
@ -50,6 +53,8 @@ const router = useRouter()
|
|||
const currentRoute = ref('')
|
||||
const activeId = ref('/home')
|
||||
|
||||
|
||||
|
||||
const headerMenus = [
|
||||
{
|
||||
name: '教学大模型',
|
||||
|
@ -57,21 +62,15 @@ const headerMenus = [
|
|||
icon: 'icon-shouye',
|
||||
path: '/index'
|
||||
},
|
||||
{
|
||||
name: '班级中心',
|
||||
id: 2,
|
||||
icon: 'icon-banji2',
|
||||
path: '/class'
|
||||
},
|
||||
{
|
||||
name: '教学工作台',
|
||||
id: 3,
|
||||
id: 2,
|
||||
icon: 'icon-gongzuotai',
|
||||
path: '/home'
|
||||
},
|
||||
{
|
||||
name: '资源中心',
|
||||
id: 4,
|
||||
id: 3,
|
||||
icon: 'icon-kechengziyuan1',
|
||||
path: '/resource'
|
||||
},
|
||||
|
@ -80,19 +79,23 @@ const headerMenus = [
|
|||
const sideBottomMenu = [
|
||||
{
|
||||
name: '设置',
|
||||
id: 5,
|
||||
id: 4,
|
||||
icon: 'icon-set',
|
||||
path: '/setting'
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
|
||||
const clickMenu = ({ id, disabled, path }) => {
|
||||
if (disabled) return
|
||||
activeId.value = id
|
||||
router.push(path)
|
||||
}
|
||||
|
||||
const onUserTo = (path) =>{
|
||||
router.push(path)
|
||||
}
|
||||
|
||||
// 监听当前路由
|
||||
watch(
|
||||
() => router.currentRoute.value,
|
||||
|
@ -133,7 +136,8 @@ const logout = () => {
|
|||
|
||||
<style>
|
||||
.el-popover.popoverStyle{
|
||||
min-width:120px
|
||||
min-width:120px;
|
||||
padding: 0;
|
||||
}
|
||||
.popoverStyle .head-aside{
|
||||
width: 100%;
|
||||
|
@ -141,6 +145,19 @@ const logout = () => {
|
|||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
ul{
|
||||
width: 100%;
|
||||
li{
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
border-bottom: solid #d9dce2 1px;
|
||||
&:hover{
|
||||
background: #d9dce2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in New Issue