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; text-align: center;
color: #2c3e50; color: #2c3e50;
width: 100%; width: 100%;
/* height: 100vh; */
} }
</style> </style>

View File

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

View File

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

View File

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

View File

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