Compare commits

...

2 Commits

Author SHA1 Message Date
lyc c3c94132bf Merge pull request '2.5init' (#3) from lyc-dev into main 2024-10-29 15:05:24 +08:00
lyc 4e6d619762 2.5init 2024-10-29 15:06:02 +08:00
1 changed files with 31 additions and 14 deletions

View File

@ -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>