File tree Expand file tree Collapse file tree 3 files changed +35
-8
lines changed Expand file tree Collapse file tree 3 files changed +35
-8
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ const routes: RouteRecordRaw[] = [
147
147
{
148
148
name : 'HideChildrenInMenuParentDemo' ,
149
149
path : '/demos/features/hide-menu-children' ,
150
- component : ( ) =>
151
- import ( '#/views/demos/features/hide-menu-children/parent.vue' ) ,
152
150
meta : {
153
151
hideChildrenInMenu : true ,
154
152
icon : 'ic:round-menu' ,
@@ -160,10 +158,10 @@ const routes: RouteRecordRaw[] = [
160
158
path : '' ,
161
159
component : ( ) =>
162
160
import (
163
- '#/views/demos/features/hide-menu-children/children .vue'
161
+ '#/views/demos/features/hide-menu-children/parent .vue'
164
162
) ,
165
163
meta : {
166
- hideInMenu : true ,
164
+ // hideInMenu: true,
167
165
title : $t ( 'demos.features.hideChildrenInMenu' ) ,
168
166
} ,
169
167
} ,
@@ -174,7 +172,10 @@ const routes: RouteRecordRaw[] = [
174
172
import (
175
173
'#/views/demos/features/hide-menu-children/children.vue'
176
174
) ,
177
- meta : { title : $t ( 'demos.features.hideChildrenInMenu' ) } ,
175
+ meta : {
176
+ activePath : '/demos/features/hide-menu-children' ,
177
+ title : $t ( 'demos.features.hideChildrenInMenu' ) ,
178
+ } ,
178
179
} ,
179
180
] ,
180
181
} ,
Original file line number Diff line number Diff line change
1
+ <script lang="ts" setup>
2
+ import { Fallback , VbenButton } from ' @vben/common-ui' ;
3
+ import { useTabs } from ' @vben/hooks' ;
4
+ import { X } from ' @vben/icons' ;
5
+
6
+ const { closeCurrentTab } = useTabs ();
7
+ </script >
8
+
1
9
<template >
2
- <div >children</div >
10
+ <Fallback
11
+ description =" 当前路由在菜单中不可见"
12
+ status =" coming-soon"
13
+ title =" 被隐藏的子菜单"
14
+ show-back
15
+ >
16
+ <template #action >
17
+ <VbenButton size =" lg" @click =" closeCurrentTab()" >
18
+ <X class =" mr-2 size-4" />
19
+ 关闭当前标签页
20
+ </VbenButton >
21
+ </template >
22
+ </Fallback >
3
23
</template >
Original file line number Diff line number Diff line change @@ -4,8 +4,14 @@ import { Fallback } from '@vben/common-ui';
4
4
5
5
<template >
6
6
<Fallback
7
- description =" 当前菜单的子菜单不可见 "
7
+ : description =" `当前路由:${String($route.name)},子菜单不可见` "
8
8
status =" coming-soon"
9
9
title =" 隐藏子菜单"
10
- />
10
+ >
11
+ <template #action >
12
+ <RouterLink to =" /demos/features/hide-menu-children/children" >
13
+ 打开子路由
14
+ </RouterLink >
15
+ </template >
16
+ </Fallback >
11
17
</template >
You can’t perform that action at this time.
0 commit comments