diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md
index c8a728f6d..7565be1c8 100644
--- a/CHANGELOG.zh_CN.md
+++ b/CHANGELOG.zh_CN.md
@@ -6,6 +6,8 @@
- 新增左侧菜单混合模式
- 新增 markdown 嵌入表单内示例
- 新增主框架外页面示例
+- `route.meta` 新增`currentActiveMenu`,`hideTab`,`hideMenu`参数 用于控制详情页面包屑级菜单显示隐藏。
+- 新增面包屑导航示例
### 🐛 Bug Fixes
@@ -14,6 +16,7 @@
- 修复图表库切换页面导致宽高计算错误
- 修复多语言配置 `Locale.show`导致配置不生效
- 修复路由类型错误
+- 修复菜单分割时权限失效问题
## 2.0.0-rc.14 (2020-12-15)
diff --git a/src/components/Menu/src/BasicMenu.vue b/src/components/Menu/src/BasicMenu.vue
index 463b0516c..1c454fd76 100644
--- a/src/components/Menu/src/BasicMenu.vue
+++ b/src/components/Menu/src/BasicMenu.vue
@@ -118,16 +118,21 @@
listenerLastChangeTab((route) => {
if (route.name === REDIRECT_NAME) return;
handleMenuChange(route);
- }, false);
+ const currentActiveMenu = route.meta?.currentActiveMenu;
+ if (currentActiveMenu) {
+ menuState.selectedKeys = [currentActiveMenu];
+ setOpenKeys(currentActiveMenu);
+ }
+ });
watch(
() => props.items,
() => {
handleMenuChange();
- },
- {
- immediate: true,
}
+ // {
+ // immediate: true,
+ // }
);
async function handleMenuClick({ key, keyPath }: { key: string; keyPath: string[] }) {
@@ -149,9 +154,7 @@
return;
}
const path = (route || unref(currentRoute)).path;
- if (props.mode !== MenuModeEnum.HORIZONTAL) {
- setOpenKeys(path);
- }
+ setOpenKeys(path);
if (props.isHorizontal && unref(getSplit)) {
const parentPath = await getCurrentParentPath(path);
menuState.selectedKeys = [parentPath];
diff --git a/src/components/Menu/src/components/BasicSubMenuItem.vue b/src/components/Menu/src/components/BasicSubMenuItem.vue
index cf883db7b..990460e6d 100644
--- a/src/components/Menu/src/components/BasicSubMenuItem.vue
+++ b/src/components/Menu/src/components/BasicSubMenuItem.vue
@@ -1,6 +1,9 @@
-
-
+
+
@@ -16,7 +19,7 @@
diff --git a/src/layouts/default/setting/handler.ts b/src/layouts/default/setting/handler.ts
index 2e8f64839..7e034c283 100644
--- a/src/layouts/default/setting/handler.ts
+++ b/src/layouts/default/setting/handler.ts
@@ -59,7 +59,7 @@ export function handler(event: HandlerEnum, value: any): DeepPartial
+ 进入子级详情页
+
+
+
diff --git a/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue b/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue
new file mode 100644
index 000000000..f37c36755
--- /dev/null
+++ b/src/views/demo/feat/breadcrumb/ChildrenListDetail.vue
@@ -0,0 +1,8 @@
+
+ 子级详情页
+
+
diff --git a/src/views/demo/feat/breadcrumb/FlatList.vue b/src/views/demo/feat/breadcrumb/FlatList.vue
new file mode 100644
index 000000000..5a5aba272
--- /dev/null
+++ b/src/views/demo/feat/breadcrumb/FlatList.vue
@@ -0,0 +1,10 @@
+
+
+ 进入平级详情页
+
+
+
diff --git a/src/views/demo/feat/breadcrumb/FlatListDetail.vue b/src/views/demo/feat/breadcrumb/FlatListDetail.vue
new file mode 100644
index 000000000..1dfc75a9b
--- /dev/null
+++ b/src/views/demo/feat/breadcrumb/FlatListDetail.vue
@@ -0,0 +1,8 @@
+
+ 平级详情页
+
+