fix: hideChildrenInMenu demo code (#5626)

This commit is contained in:
Netfan
2025-02-27 20:21:48 +08:00
committed by GitHub
parent c3eb4fab13
commit 86ce65e0ea
3 changed files with 35 additions and 8 deletions

View File

@@ -1,3 +1,23 @@
<script lang="ts" setup>
import { Fallback, VbenButton } from '@vben/common-ui';
import { useTabs } from '@vben/hooks';
import { X } from '@vben/icons';
const { closeCurrentTab } = useTabs();
</script>
<template>
<div>children</div>
<Fallback
description="当前路由在菜单中不可见"
status="coming-soon"
title="被隐藏的子菜单"
show-back
>
<template #action>
<VbenButton size="lg" @click="closeCurrentTab()">
<X class="mr-2 size-4" />
关闭当前标签页
</VbenButton>
</template>
</Fallback>
</template>

View File

@@ -4,8 +4,14 @@ import { Fallback } from '@vben/common-ui';
<template>
<Fallback
description="当前菜单的子菜单不可见"
:description="`当前路由:${String($route.name)}子菜单不可见`"
status="coming-soon"
title="隐藏子菜单"
/>
>
<template #action>
<RouterLink to="/demos/features/hide-menu-children/children">
打开子路由
</RouterLink>
</template>
</Fallback>
</template>