This commit is contained in:
lyc 2024-10-30 10:00:23 +08:00
parent 208c3b00dd
commit 61be71674c
5 changed files with 25 additions and 29 deletions

View File

@ -18,6 +18,5 @@ const size = ref('default')
text-align: center;
color: #2c3e50;
width: 100%;
/* height: 100vh; */
}
</style>

View File

@ -4,7 +4,10 @@
<div>
<el-popover ref="popoverRef" placement="right" trigger="hover" popper-class="popoverStyle" :tabindex="999" >
<template #reference>
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
<div class="user-info">
<el-image class="user-img" :src="dev_api + userStore.user.avatar" />
<span>{{ userStore.user.nickName }}</span>
</div>
</template>
<div class="head-aside">
<ul>
@ -15,7 +18,7 @@
</li>
<li @click="onUserTo('/profile')">个人中心</li>
<li @click="onUserTo('/class')">班级中心</li>
<li @click="logout">退出登录</li>
<li @click="logout">退出登录</li>
</ul>
</div>
</el-popover>
@ -57,6 +60,7 @@ import pkc from "../../../../../package.json"
const { ipcRenderer } = window.electron || {}
const dev_api = ref(import.meta.env.VITE_APP_BASE_API)
const userStore = useUserStore()
console.log(userStore,'userStore')
const router = useRouter()
const currentRoute = ref('')
const activeId = ref('/home')
@ -199,11 +203,19 @@ const logout = () => {
display: flex;
flex-direction: column;
justify-content: space-between;
.user-img{
width: 56px;
height: 56px;
border-radius: 50%;
cursor: pointer;
.user-info{
display: flex;
flex-direction: column;
color: #fff;
align-items: center;
font-size: 12px;
.user-img{
width: 56px;
height: 56px;
border-radius: 50%;
cursor: pointer;
margin-bottom: 10px;
}
}
.aside-tab {
@ -216,12 +228,12 @@ const logout = () => {
width: 100%;
cursor: pointer;
flex-direction: column;
padding: 5px 0;
padding: 8px 0;
align-items: center;
color: #fff;
.text {
font-size: 11px;
font-size: 12px;
}
.iconfont {
@ -255,6 +267,6 @@ const logout = () => {
.verson{
color: #fff;
font-size: 12px;
margin-top: 10px;
margin-top: 5px;
}
</style>

View File

@ -1,14 +1,4 @@
<template>
<!-- <el-container>
<el-header>
<Header />
</el-header>
<el-main>
<AppMain />
</el-main>
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
<AiChart/>
</el-container> -->
<div class="common-layout">
<el-container>
<el-aside width="70px">
@ -30,27 +20,21 @@
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import Header from './components/Header.vue'
import Aside from './components/Aside.vue'
import AppMain from './components/AppMain.vue'
import Uploader from './components/Uploader.vue'
import AiChart from '@/components/ai-chart/index.vue'
import uploaderState from '@/store/modules/uploader'
// import Chat from '@/utils/chat'
let uploaderStore = ref(uploaderState())
// window.test = Chat
// Chat.init()
</script>
<style lang="scss" scoped>
.el-container {
height: 100%;
// background: url(@/assets/images/login/login-bg.png) no-repeat center;
// background: #fff;
background: linear-gradient(to bottom right, #cce6ff 0%, #79d0fc 100%);
background: linear-gradient(#E5EEF5, #F2F2F2);
background-size: cover;
}
.common-layout{

View File

@ -146,7 +146,7 @@ watch(
padding: 10px 15px;
font-size: 13px;
flex: 1;
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
.class-item {
justify-content: space-between;
align-items: center;

View File

@ -282,6 +282,7 @@ onMounted(async ()=>{
background-color: #fff;
border-radius: 5px;
padding: 10px 0;
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
.con-ul{
justify-content: space-around;