From e02f16c2f6e6aa0bec4b464728e0b20f916622dc Mon Sep 17 00:00:00 2001 From: xiongqin <3323939337@qq.com> Date: Fri, 4 Jul 2025 15:54:18 +0800 Subject: [PATCH] =?UTF-8?q?xq=20feat:"=E4=BF=AE=E6=94=B9=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=8E=A5=E5=85=A5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/customDialog.scss | 12 ++++++++++++ src/layout/components/Sidebar/index.vue | 22 ++++++++++++++++++++++ src/main.ts | 2 ++ src/views/system/user/index.vue | 7 ++++--- 4 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 src/assets/styles/customDialog.scss diff --git a/src/assets/styles/customDialog.scss b/src/assets/styles/customDialog.scss new file mode 100644 index 0000000..fda0452 --- /dev/null +++ b/src/assets/styles/customDialog.scss @@ -0,0 +1,12 @@ +.cus-dia{ + .el-dialog__body{ + border: 1px solid #409EFF; + border-radius: 5px; + .detail-head{ + color:#409EFF; + font-weight: bold; + } + } +} + + diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index accc25c..8c67351 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -12,6 +12,7 @@ :active-text-color="theme" :collapse-transition="false" mode="vertical" + v-if="showSide" > @@ -28,6 +29,7 @@ import { useAppStore } from '@/store/modules/app'; import { useSettingsStore } from '@/store/modules/settings'; import { usePermissionStore } from '@/store/modules/permission'; import { RouteRecordRaw } from 'vue-router'; +import { useProgram } from '@/store/modules/program'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -41,6 +43,26 @@ const sideTheme = computed(() => settingsStore.sideTheme); const theme = computed(() => settingsStore.theme); const isCollapse = computed(() => !appStore.sidebar.opened); +const programState = useProgram(); +const programID = computed(() => { + return programState.programID; +}); + +const showSide = ref(true); + +watch( + programID, + (nv, ov) => { + if (nv !== ov) { + showSide.value = false; + setTimeout(() => { + showSide.value = true; + }, 200); + } + }, + { deep: true } +); + const activeMenu = computed(() => { const { meta, path } = route; // if set path, the sidebar will highlight the path you set diff --git a/src/main.ts b/src/main.ts index 63a5c35..ebc7365 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,7 @@ import { createApp } from 'vue'; import 'virtual:uno.css'; import '@/assets/styles/index.scss'; import 'element-plus/theme-chalk/dark/css-vars.css'; +import '@/assets/styles/customDialog.scss'; // App、router、store import App from './App.vue'; @@ -40,6 +41,7 @@ VXETable.setConfig({ // 修改 el-dialog 默认点击遮照为不关闭 import { ElDialog } from 'element-plus'; + ElDialog.props.closeOnClickModal.default = false; const app = createApp(App); diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d12aeed..f4ba5a4 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -146,8 +146,9 @@ - - + + +
账号信息
@@ -244,6 +245,7 @@
+