From 2ae368128606f8bf3aa290c029bdc71296ad152e Mon Sep 17 00:00:00 2001
From: zlyx <1242874891@qq.com>
Date: 星期三, 18 一月 2023 20:23:11 +0800
Subject: [PATCH] add common 依赖 spring-boot-properties-migrator ; add 新增 modules 模块, 包含 demo, generator, job, system 模块 ; update 更新模块包名 rateLimiter => ratelimiter ; refactor 重构 ratelimiter 模块, 参考幂等模块加入自动装配相关配置 ; fix 修正 AsyncConfig 实现接口 ; fix 修正 SwaggerConfig 注解写法 ; fix 修正 ruoyi-common-doc pom 描述 ; delete LogAspect 去掉无用注解 ;

---
 ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue
index 7289ddf..4853fbb 100644
--- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue
+++ b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue
@@ -1,7 +1,7 @@
 <template>
   <div v-if="!item.hidden">
     <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
-      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
+      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
           <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
         </el-menu-item>
@@ -56,6 +56,9 @@
   },
   methods: {
     hasOneShowingChild(children = [], parent) {
+      if (!children) {
+        children = [];
+      }
       const showingChildren = children.filter(item => {
         if (item.hidden) {
           return false
@@ -79,13 +82,17 @@
 
       return false
     },
-    resolvePath(routePath) {
+    resolvePath(routePath, routeQuery) {
       if (isExternal(routePath)) {
         return routePath
       }
       if (isExternal(this.basePath)) {
         return this.basePath
       }
+      if (routeQuery) {
+        let query = JSON.parse(routeQuery);
+        return { path: path.resolve(this.basePath, routePath), query: query }
+      }
       return path.resolve(this.basePath, routePath)
     }
   }

--
Gitblit v1.9.3