完善设定tab精确路由

This commit is contained in:
Allen
2024-05-30 15:16:49 +08:00
parent ce91c0cc30
commit 528a4ddb03
3 changed files with 3 additions and 3 deletions
@@ -160,7 +160,7 @@ const superUser = store.state.auth.superUser
:item="{ :item="{
title: '设定', title: '设定',
icon: 'mdi-cog', icon: 'mdi-cog',
to: '/setting', to: '/setting/account',
}" }"
/> />
</template> </template>
+1 -1
View File
@@ -73,7 +73,7 @@ const tabs = [
<template> <template>
<div> <div>
<VTabs v-model="activeTab" show-arrows class="v-tabs-pill"> <VTabs v-model="activeTab" show-arrows class="v-tabs-pill">
<VTab v-for="item in tabs" :key="item.icon" :value="item.tab"> <VTab v-for="item in tabs" :key="item.icon" :value="item.tab" :to="'/setting/' + item.tab">
<VIcon size="20" start :icon="item.icon" /> <VIcon size="20" start :icon="item.icon" />
{{ item.title }} {{ item.title }}
</VTab> </VTab>
+1 -1
View File
@@ -92,7 +92,7 @@ const router = createRouter({
}, },
}, },
{ {
path: 'setting', path: 'setting/:tab',
component: () => import('../pages/setting.vue'), component: () => import('../pages/setting.vue'),
meta: { meta: {
requiresAuth: true, requiresAuth: true,