From d3ddb8e7593feed822498f0d886fe54a48e28386 Mon Sep 17 00:00:00 2001 From: lihui Date: Thu, 6 Nov 2025 17:49:44 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=B6=88=E6=81=AF=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=9F=BA=E7=A1=80=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dialogs/MessageDialog.vue | 92 ++++++++++ src/components/{ => dialogs}/changePassword.vue | 4 +- src/views/home.vue | 235 ++++++++++++++---------- 3 files changed, 233 insertions(+), 98 deletions(-) create mode 100644 src/components/dialogs/MessageDialog.vue rename src/components/{ => dialogs}/changePassword.vue (98%) diff --git a/src/components/dialogs/MessageDialog.vue b/src/components/dialogs/MessageDialog.vue new file mode 100644 index 0000000..e35922b --- /dev/null +++ b/src/components/dialogs/MessageDialog.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/components/changePassword.vue b/src/components/dialogs/changePassword.vue similarity index 98% rename from src/components/changePassword.vue rename to src/components/dialogs/changePassword.vue index 083172e..729fe75 100644 --- a/src/components/changePassword.vue +++ b/src/components/dialogs/changePassword.vue @@ -4,8 +4,8 @@ import {ref, reactive, computed, watch, onMounted} from 'vue' import {CircleCloseFilled, SuccessFilled} from '@element-plus/icons-vue' import {ElMessage} from "element-plus"; -import API from '@/util/http' -import PasswordSuccess from './PasswordSuccess.vue'; +import API from '@/util/http.js' +import PasswordSuccess from '../PasswordSuccess.vue'; import router from "@/router/index.js"; // 父组件调用 diff --git a/src/views/home.vue b/src/views/home.vue index 68928c7..597cc0e 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -1,17 +1,19 @@ @@ -353,15 +388,17 @@ const toggleFlag = () => { /* 侧边栏容器 */ .sidebar-container { flex-shrink: 0; - + } + .logo { display: flex; align-items: center; justify-content: center; height: 12vh; - + } + /* 中间可滚动菜单容器 */ .menu-scroll-container { flex: 1; @@ -376,6 +413,12 @@ const toggleFlag = () => { align-items: center; /* 垂直居中 */ } +.message-container { + padding: 10px 50px 10px 50px; /* 上,右, 下,左 */ + display: flex; + align-items: center; /* 垂直居中 */ +} + /* 调整下拉菜单的样式,确保它向上弹出 */ .el-dropdown-link:focus { @@ -383,12 +426,14 @@ const toggleFlag = () => { outline: none; text-decoration: none; } + .el-dropdown-link { display: flex; align-items: center; cursor: pointer; - gap:10px; /* 图标和文字左右间距 */ + gap: 10px; /* 图标和文字左右间距 */ } + .sidebar-layout { width: 15vw; height: 100%; @@ -439,7 +484,6 @@ const toggleFlag = () => { } - /* 确保el-menu撑满容器 */ .sidebar-layout .el-menu { width: 100%; @@ -456,6 +500,7 @@ const toggleFlag = () => { ::v-deep(.el-menu-item:hover) { background: #E5EBFE; } + /* 子菜单展开时和背景同色 */ ::v-deep(.el-sub-menu__title), ::v-deep(.el-menu-item) { @@ -470,7 +515,6 @@ const toggleFlag = () => { } - /* 确保全局el-container适应容器 */ :deep(.el-container) { /* vue3的深度选择器,用于覆盖element-plus的默认样式 */ @@ -480,7 +524,6 @@ const toggleFlag = () => { } - /* 为侧边栏和主内容区域添加滚动条样式 */ .menu-scroll-container, .el-main {