feat(other): The menu supports jumping to external links and fixing some known problems

This commit is contained in:
vben
2024-05-21 21:45:48 +08:00
parent 399334ac57
commit c31d21be50
43 changed files with 505 additions and 243 deletions

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Icon } from '@vben-core/iconify';
import { VbenIcon } from '@vben-core/shadcn-ui';
import type { IBreadcrumb } from './interface';
@@ -32,7 +32,7 @@ function handleClick(path?: string) {
<li>
<a href="javascript:void 0" @click.stop="handleClick(item.path)">
<span class="flex-center h-full">
<Icon
<VbenIcon
v-if="item.icon && showIcon"
class="mr-1 size-5 flex-shrink-0"
:icon="item.icon"

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { IcRoundKeyboardArrowDown, Icon } from '@vben-core/iconify';
import { IcRoundKeyboardArrowDown } from '@vben-core/iconify';
import { VbenIcon } from '@vben-core/shadcn-ui';
import {
Breadcrumb,
@@ -49,7 +50,7 @@ function handleClick(path?: string) {
<div v-if="item.items?.length ?? 0 > 0">
<DropdownMenu>
<DropdownMenuTrigger class="flex items-center gap-1">
<Icon
<VbenIcon
v-if="item.icon && showIcon"
class="size-5"
:icon="item.icon"
@@ -74,21 +75,26 @@ function handleClick(path?: string) {
href="javascript:void 0"
@click.stop="handleClick(item.path)"
>
<Icon
v-if="item.icon && showIcon"
class="size-4"
:class="{ 'size-5': item.isHome }"
:icon="item.icon"
/>
{{ item.title }}
<div class="flex-center">
<VbenIcon
v-if="item.icon && showIcon"
class="mr-1 size-4"
:class="{ 'size-5': item.isHome }"
:icon="item.icon"
/>
{{ item.title }}
</div>
</BreadcrumbLink>
<BreadcrumbPage v-else>
<Icon
v-if="item.icon && showIcon"
class="size-4"
:icon="item.icon"
/>
{{ item.title }}
<div class="flex-center">
<VbenIcon
v-if="item.icon && showIcon"
class="mr-1 size-4"
:class="{ 'size-5': item.isHome }"
:icon="item.icon"
/>
{{ item.title }}
</div>
</BreadcrumbPage>
</BreadcrumbItem>
<BreadcrumbSeparator