|
@@ -38,10 +38,12 @@ function handleMenu(context: SetupContext) {
|
|
|
const menuList = APP.getRef('menus');
|
|
const menuList = APP.getRef('menus');
|
|
|
function menuClick(value: any) {
|
|
function menuClick(value: any) {
|
|
|
const arr = value.keyPath.reverse();
|
|
const arr = value.keyPath.reverse();
|
|
|
- const first = menuList.value.find((e: OperationTabMenu) => e.code === arr[0]);
|
|
|
|
|
- if (first) {
|
|
|
|
|
- const seconde = first.children.find((e: OperationTabMenu) => e.code === arr[1]);
|
|
|
|
|
- seconde && context.emit('chooseMenu', seconde);
|
|
|
|
|
|
|
+ if (arr.length > 1 && arr[1] !== selectedKeys.value[0]) {
|
|
|
|
|
+ const first = menuList.value.find((e: OperationTabMenu) => e.code === arr[0]);
|
|
|
|
|
+ if (first) {
|
|
|
|
|
+ const seconde = first.children.find((e: OperationTabMenu) => e.code === arr[1]);
|
|
|
|
|
+ seconde && context.emit('chooseMenu', seconde);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 一级菜单图标
|
|
// 一级菜单图标
|