From f216eabb948321d38e5185d959421eef068bf24c Mon Sep 17 00:00:00 2001 From: zhengshunjin <2667579369@qq.com> Date: Thu, 23 Apr 2026 17:58:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ui):=20=E9=87=8D=E6=9E=84=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E5=AF=BC=E8=88=AA=E7=BB=93=E6=9E=84=E5=B9=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=84=E4=BB=B6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除嵌套子菜单结构,简化为平铺式菜单项 - 添加首页路由导航项,优化导航体验 - 更新 .gitignore 文件,忽略 package-lock.json - 注释掉 AboutView 中的动态按钮渲染逻辑 - 在组件声明文件中添加 ElSubItem 组件类型定义 - 调整侧边栏样式,固定宽度为 200px 并优化高度计算 --- .gitignore | 3 +- flask-ui/components.d.ts | 2 + .../src/layout/components/Sidebar/index.vue | 37 +++++-------------- flask-ui/src/views/AboutView.vue | 9 +++-- 4 files changed, 19 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index cb5c952..e5d8cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ download .venv flask-ui/node_modules -.idea \ No newline at end of file +.idea +flask-ui/package-lock.json \ No newline at end of file diff --git a/flask-ui/components.d.ts b/flask-ui/components.d.ts index 420c9d7..0ba90a2 100644 --- a/flask-ui/components.d.ts +++ b/flask-ui/components.d.ts @@ -35,6 +35,7 @@ declare module 'vue' { ElSelect: typeof import('element-plus/es')['ElSelect'] ElSplitter: typeof import('element-plus/es')['ElSplitter'] ElSplitterPanel: typeof import('element-plus/es')['ElSplitterPanel'] + ElSubItem: typeof import('element-plus/es')['ElSubItem'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] @@ -69,6 +70,7 @@ declare global { const ElSelect: typeof import('element-plus/es')['ElSelect'] const ElSplitter: typeof import('element-plus/es')['ElSplitter'] const ElSplitterPanel: typeof import('element-plus/es')['ElSplitterPanel'] + const ElSubItem: typeof import('element-plus/es')['ElSubItem'] const ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] diff --git a/flask-ui/src/layout/components/Sidebar/index.vue b/flask-ui/src/layout/components/Sidebar/index.vue index fbee928..c1c3a3c 100644 --- a/flask-ui/src/layout/components/Sidebar/index.vue +++ b/flask-ui/src/layout/components/Sidebar/index.vue @@ -17,30 +17,12 @@ const iconComponent = ref("location") :collapse="isCollapse" class="el-menu-vertical-demo" router> - - - - - - - - item one - - item two - - - item three - - - - item one - - + + + + + 首页 + @@ -66,10 +48,9 @@ const iconComponent = ref("location") diff --git a/flask-ui/src/views/AboutView.vue b/flask-ui/src/views/AboutView.vue index 828024b..79b2eb6 100644 --- a/flask-ui/src/views/AboutView.vue +++ b/flask-ui/src/views/AboutView.vue @@ -37,9 +37,12 @@ const getThirdLevelOptions = () => {