chore: update demo
parent
0023964eb7
commit
6c092e284c
|
@ -29,12 +29,24 @@ const routes: RouteRecordRaw[] = [
|
|||
{
|
||||
name: 'Menu2',
|
||||
path: 'menu2',
|
||||
component: () => import('@/views/nested/menu-2.vue'),
|
||||
meta: {
|
||||
icon: 'ic:round-menu',
|
||||
keepAlive: true,
|
||||
title: $t('page.nested.menu2'),
|
||||
},
|
||||
redirect: '/nested/menu2/menu2-1',
|
||||
children: [
|
||||
{
|
||||
name: 'Menu21',
|
||||
path: 'menu2-1',
|
||||
component: () => import('@/views/nested/menu-2-1.vue'),
|
||||
meta: {
|
||||
icon: 'ic:round-menu',
|
||||
keepAlive: true,
|
||||
title: $t('page.nested.menu21'),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'Menu3',
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'Menu1' });
|
||||
|
||||
onMounted(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Menu1');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-5">
|
||||
menu1
|
||||
<input class="bg-background border-border" />
|
||||
</div>
|
||||
<Fallback status="hello" />
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'Menu21' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fallback status="hello" />
|
||||
</template>
|
|
@ -1,16 +0,0 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
defineOptions({ name: 'Menu2' });
|
||||
|
||||
onMounted(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Menu2');
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="p-5">
|
||||
menu2
|
||||
<input class="bg-background border-border" />
|
||||
</div>
|
||||
</template>
|
|
@ -1,15 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'Menu31' });
|
||||
onMounted(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Menu3-1');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-5">
|
||||
Menu3-1
|
||||
<input class="bg-background border-border" />
|
||||
</div>
|
||||
<Fallback status="hello" />
|
||||
</template>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
<script lang="ts" setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Fallback } from '@vben/universal-ui';
|
||||
|
||||
defineOptions({ name: 'Menu321' });
|
||||
onMounted(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Menu3-2-1');
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-5">
|
||||
menu-3-2-1
|
||||
<input class="bg-background border-border" />
|
||||
</div>
|
||||
<Fallback status="hello" />
|
||||
</template>
|
||||
|
|
|
@ -136,14 +136,14 @@ function refresh() {
|
|||
<slot v-if="$slots.title" name="title"></slot>
|
||||
<p
|
||||
v-else-if="titleText"
|
||||
class="text-foreground mt-12 text-3xl md:text-4xl lg:text-5xl"
|
||||
class="text-foreground mt-8 text-2xl md:text-3xl lg:text-4xl"
|
||||
>
|
||||
{{ titleText }}
|
||||
</p>
|
||||
<slot v-if="$slots.describe" name="describe"></slot>
|
||||
<p
|
||||
v-else-if="descText"
|
||||
class="text-muted-foreground md:text-md my-6 lg:text-lg"
|
||||
class="text-muted-foreground md:text-md my-4 lg:text-lg"
|
||||
>
|
||||
{{ descText }}
|
||||
</p>
|
||||
|
|
|
@ -109,6 +109,7 @@ page:
|
|||
page: Nested Menu
|
||||
menu1: Menu 1
|
||||
menu2: Menu 2
|
||||
menu21: Menu 2-1
|
||||
menu3: Menu 3
|
||||
menu31: Menu 3-1
|
||||
menu32: Menu 3-2
|
||||
|
|
|
@ -108,6 +108,7 @@ page:
|
|||
page: 嵌套菜单
|
||||
menu1: 菜单 1
|
||||
menu2: 菜单 2
|
||||
menu21: 菜单 2-1
|
||||
menu3: 菜单 3
|
||||
menu31: 菜单 3-1
|
||||
menu32: 菜单 3-2
|
||||
|
|
Loading…
Reference in New Issue