feat(other): The menu supports jumping to external links and fixing some known problems
This commit is contained in:
@@ -100,12 +100,7 @@ onBeforeUnmount(() => {
|
||||
</VbenTooltip>
|
||||
<div v-show="!showTooltip" :class="[e('content')]">
|
||||
<VbenMenuBadge v-bind="props" />
|
||||
<VbenIcon
|
||||
v-if="isTopLevelMenuItem"
|
||||
:class="nsMenu.e('icon')"
|
||||
:icon="icon"
|
||||
fallback
|
||||
/>
|
||||
<VbenIcon :class="nsMenu.e('icon')" :icon="icon" fallback />
|
||||
|
||||
<slot></slot>
|
||||
<slot name="title"></slot>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { IcRoundMoreHoriz } from '@vben-core/iconify';
|
||||
import { useNamespace } from '@vben-core/toolkit';
|
||||
import { isHttpUrl, useNamespace } from '@vben-core/toolkit';
|
||||
|
||||
import { UseResizeObserverReturn, useResizeObserver } from '@vueuse/core';
|
||||
import {
|
||||
@@ -241,7 +241,10 @@ function handleMenuItemClick(data: MenuItemClicked) {
|
||||
if (!path || !parentPaths) {
|
||||
return;
|
||||
}
|
||||
activePath.value = path;
|
||||
if (!isHttpUrl(path)) {
|
||||
activePath.value = path;
|
||||
}
|
||||
|
||||
emit('select', path, parentPaths);
|
||||
}
|
||||
|
||||
|
@@ -86,7 +86,7 @@ const iconArrowStyle = computed(() => {
|
||||
<slot></slot>
|
||||
|
||||
<VbenIcon
|
||||
v-if="isTopLevelMenuSubmenu && !isMenuMore"
|
||||
v-if="!isMenuMore"
|
||||
:class="nsMenu.e('icon')"
|
||||
:icon="icon"
|
||||
fallback
|
||||
|
@@ -16,7 +16,7 @@
|
||||
--menu-item-collapse-margin-y: 4px;
|
||||
--menu-item-collapse-margin-x: 0px;
|
||||
--menu-item-radius: 0px;
|
||||
--menu-item-indent: 24px;
|
||||
--menu-item-indent: 16px;
|
||||
--menu-font-size: 14px;
|
||||
--menu-dark-background: 0deg 0% 100% / 10%;
|
||||
--menu-light-background: 192deg 1% 93%;
|
||||
|
Reference in New Issue
Block a user