This commit is contained in:
fuenmao
2026-09-23 18:19:47 +08:00
parent efd71f99f3
commit aecfd2a254
8 changed files with 491 additions and 282 deletions
+19
View File
@@ -8,6 +8,7 @@ const router = useRouter()
const currentTab = computed(() => {
const path = route.path
if (path.startsWith('/assessment')) return 'assessment'
if (path.startsWith('/tcm-assessment')) return 'tcm'
if (path.startsWith('/profile')) return 'profile'
return 'home'
})
@@ -17,6 +18,8 @@ function navigate(target: string) {
router.replace('/dashboard')
} else if (target === 'assessment' && route.path !== '/assessment') {
router.replace('/assessment')
} else if (target === 'tcm' && route.path !== '/tcm-assessment') {
router.replace('/tcm-assessment')
} else if (target === 'profile' && route.path !== '/profile') {
router.replace('/profile')
}
@@ -39,6 +42,22 @@ function navigate(target: string) {
<span class="tab-label">首页</span>
</div>
<div
class="tab-item"
:class="{ active: currentTab === 'tcm' }"
@click="navigate('tcm')"
>
<div class="tab-icon">
<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="9" />
<path d="M12 3c-4 4-4 8 0 9s4 5 0 9" />
<circle cx="9" cy="8" r="1" fill="currentColor" stroke="none" />
<circle cx="15" cy="16" r="1" fill="currentColor" stroke="none" />
</svg>
</div>
<span class="tab-label">中医四诊</span>
</div>
<div
class="tab-item"
:class="{ active: currentTab === 'assessment' }"