From 40905cbd04c2e332cd4bc2b9e0c5b3e1da9cccfa Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 30 三月 2026 08:17:32 +0800
Subject: [PATCH] feat: complete rsf-design phase 1 integration
---
rsf-design/src/utils/navigation/route.js | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/rsf-design/src/utils/navigation/route.js b/rsf-design/src/utils/navigation/route.js
index 822ab32..bdd1f47 100644
--- a/rsf-design/src/utils/navigation/route.js
+++ b/rsf-design/src/utils/navigation/route.js
@@ -1,6 +1,11 @@
+import { PHASE_1_COMPONENTS } from '../../router/adapters/backendMenuAdapter.js'
+
+const RELEASED_COMPONENT_PATHS = new Set(Object.values(PHASE_1_COMPONENTS))
+
function isIframe(url) {
return url.startsWith('/outside/iframe/')
}
+
const isNavigableMenuItem = (menuItem) => {
if (!menuItem.path || !menuItem.path.trim()) {
return false
@@ -13,6 +18,15 @@
const normalizePath = (path) => {
return path.startsWith('/') ? path : `/${path}`
}
+
+const hasReleasedComponent = (menuItem) => {
+ if (!menuItem || typeof menuItem !== 'object') {
+ return false
+ }
+ const componentPath = typeof menuItem.component === 'string' ? menuItem.component.trim() : ''
+ return RELEASED_COMPONENT_PATHS.has(componentPath)
+}
+
const getFirstMenuPath = (menuList) => {
if (!Array.isArray(menuList) || menuList.length === 0) {
return ''
@@ -27,7 +41,9 @@
return childPath
}
}
- return normalizePath(menuItem.path)
+ if (hasReleasedComponent(menuItem)) {
+ return normalizePath(menuItem.path)
+ }
}
return ''
}
--
Gitblit v1.9.1