Files
cz-web/src/views/profile/cpns/ProfileSider.vue
2026-10-13 15:12:51 +08:00

64 lines
1.4 KiB
Vue

<script setup lang="ts">
interface MenuItem {
to: string
label: string
}
const menus: MenuItem[] = [
{ to: '/profile/security', label: '账号安全' },
{ to: '/profile/address', label: '地址管理' },
{ to: '/favorites', label: '收藏列表' },
{ to: '/profile/qualifications', label: '资质列表' },
{ to: '/profile/feedback', label: '意见反馈' },
{ to: '/profile/help', label: '帮助中心' },
{ to: '/profile/about', label: '关于我们' },
{ to: '/profile/hotline', label: '专属客服热线' },
]
</script>
<template>
<nav class="profile-sider" aria-label="个人中心导航">
<RouterLink
v-for="item in menus"
:key="item.to"
:to="item.to"
class="profile-sider__item"
>
{{ item.label }}
</RouterLink>
</nav>
</template>
<style lang="less" scoped>
.profile-sider {
.flex(column, flex-start);
gap: 2px;
padding: @spacing-sm 0;
border-radius: @radius-base;
background: @white;
&__item {
.flex(row, flex-start, center);
height: 40px;
margin: 0 @spacing-sm;
padding: 0 @spacing-base;
border-radius: @radius-sm;
color: @text-color;
font-size: @font-size-sm;
font-weight: 400;
transition: all 0.2s;
&:hover {
color: @primary-strong;
background: @bg-color-light;
}
&.router-link-active {
background: @filter-selected-bg;
color: @primary-strong;
font-weight: 500;
}
}
}
</style>