fix: 修复面包屑 fullPath 在平级模式下追加时为绑定问题

This commit is contained in:
XiaoDaiGua-Ray 2024-01-18 14:41:36 +08:00
parent 43bf252d84
commit b41d0490ca
2 changed files with 6 additions and 4 deletions

View File

@ -53,6 +53,7 @@
- 修复 `RChart` 组件 `RChartInst` 类型不完整的问题
- 修复读取默认缓存语言的时候没有正确使用 `APP_CATCH_KEY.localeLanguage` 的问题
- 修复 `RTable` 全屏没有正确弹出提示信息问题
- 修复面包屑 `fullPath` 在平级模式下追加时为绑定问题
## 4.5.0

View File

@ -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),
})
}
}
}