From b41d0490ca6fc7bc241daabea47670138196b6c4 Mon Sep 17 00:00:00 2001 From: XiaoDaiGua-Ray <443547225@qq.com> Date: Thu, 18 Jan 2024 14:41:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=20`fullPath`=20=E5=9C=A8=E5=B9=B3=E7=BA=A7=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E8=BF=BD=E5=8A=A0=E6=97=B6=E4=B8=BA=E7=BB=91?= =?UTF-8?q?=E5=AE=9A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/store/modules/menu/index.ts | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 021d3b1c..3685fad1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,7 @@ - 修复 `RChart` 组件 `RChartInst` 类型不完整的问题 - 修复读取默认缓存语言的时候没有正确使用 `APP_CATCH_KEY.localeLanguage` 的问题 - 修复 `RTable` 全屏没有正确弹出提示信息问题 +- 修复面包屑 `fullPath` 在平级模式下追加时为绑定问题 ## 4.5.0 diff --git a/src/store/modules/menu/index.ts b/src/store/modules/menu/index.ts index 7b5f8ecf..3ee5bdb7 100644 --- a/src/store/modules/menu/index.ts +++ b/src/store/modules/menu/index.ts @@ -203,7 +203,7 @@ export const piniaMenuStore = defineStore( 'name', 'path', 'show', - ]) + ]) as unknown as AppMenuOption // 查看是否重复 const find = menuState.breadcrumbOptions.find( (curr) => curr.key === breadcrumbOption.key, @@ -211,9 +211,10 @@ export const piniaMenuStore = defineStore( // 如果未重复追加 if (!find) { - menuState.breadcrumbOptions.push( - breadcrumbOption as unknown as AppMenuOption, - ) + menuState.breadcrumbOptions.push({ + ...breadcrumbOption, + fullPath: String(breadcrumbOption.key), + }) } } }