From 661e8cf7b40d79d2024969e56f04100b31abef1a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 11 Feb 2026 15:38:13 +0800
Subject: [PATCH] 优化字典类型属性提醒说明

---
 ruoyi-ui/src/components/Breadcrumb/index.vue |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/ruoyi-ui/src/components/Breadcrumb/index.vue b/ruoyi-ui/src/components/Breadcrumb/index.vue
index c97e59d..6b56f51 100644
--- a/ruoyi-ui/src/components/Breadcrumb/index.vue
+++ b/ruoyi-ui/src/components/Breadcrumb/index.vue
@@ -41,14 +41,15 @@
           if (index !== 0) item = item.slice(1)
           return item
         })
-        this.getMatched(pathList, this.$store.getters.sidebarRouters, matched)
+        this.getMatched(pathList, this.$store.getters.defaultRoutes, matched)
       } else {
-        matched = router.matched.filter((item) => item.meta && item.meta.title)
+        matched = router.matched.filter(item => item.meta && item.meta.title)
       }
+      // 判断是否为首页
       if (!this.isDashboard(matched[0])) {
         matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched)
       }
-      this.levelList = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false)
+      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
     },
     findPathNum(str, char = "/") {
       let index = str.indexOf(char)
@@ -60,11 +61,13 @@
       return num
     },
     getMatched(pathList, routeList, matched) {
-      let data = routeList.find((item) => item.path == pathList[0])
-      matched.push(data)
-      if (data.children && pathList.length) {
-        pathList.shift()
-        this.getMatched(pathList, data.children, matched)
+      let data = routeList.find(item => item.path == pathList[0] || (item.name += '').toLowerCase() == pathList[0])
+      if (data) {
+        matched.push(data)
+        if (data.children && pathList.length) {
+          pathList.shift()
+          this.getMatched(pathList, data.children, matched)
+        }
       }
     },
     isDashboard(route) {
@@ -91,7 +94,6 @@
   display: inline-block;
   font-size: 14px;
   line-height: 50px;
-  margin-left: 8px;
   .no-redirect {
     color: #97a8be;
     cursor: text;

--
Gitblit v1.9.3