对齐测测交互:首页「+」支持邀请填档案/添加档案/邀请合盘;各 Tab 与工具页按同一视觉与功能标准落地;本地对照截图目录显式忽略。 Co-authored-by: Cursor <cursoragent@cursor.com>
94 lines
1.8 KiB
Vue
94 lines
1.8 KiB
Vue
<template>
|
||
<component
|
||
:is="to ? 'router-link' : 'div'"
|
||
:to="to"
|
||
class="lr"
|
||
:class="{ link: !!to }"
|
||
>
|
||
<span v-if="$slots.icon || icon" class="lr-ico" aria-hidden="true">
|
||
<slot name="icon">
|
||
<HomeToolIcon v-if="icon" :name="icon" :size="40" />
|
||
</slot>
|
||
</span>
|
||
<span class="lr-body">
|
||
<strong class="lr-title">
|
||
{{ title }}
|
||
<span v-if="badge" class="lr-badge">{{ badge }}</span>
|
||
</strong>
|
||
<span v-if="desc" class="lr-desc">{{ desc }}</span>
|
||
</span>
|
||
<span v-if="chevron" class="lr-chev" aria-hidden="true">›</span>
|
||
</component>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import HomeToolIcon, { type HomeToolIconName } from './HomeToolIcon.vue'
|
||
|
||
withDefaults(
|
||
defineProps<{
|
||
title: string
|
||
desc?: string
|
||
to?: string
|
||
icon?: HomeToolIconName
|
||
badge?: string
|
||
chevron?: boolean
|
||
}>(),
|
||
{ chevron: true },
|
||
)
|
||
</script>
|
||
|
||
<style scoped>
|
||
.lr {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 12px 4px;
|
||
color: inherit;
|
||
text-decoration: none;
|
||
}
|
||
.lr.link:active {
|
||
opacity: 0.85;
|
||
}
|
||
.lr-ico {
|
||
flex-shrink: 0;
|
||
width: 40px;
|
||
height: 40px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
.lr-body {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
.lr-title {
|
||
display: block;
|
||
font-size: 15px;
|
||
font-weight: 650;
|
||
color: var(--color-text-primary);
|
||
line-height: 1.35;
|
||
}
|
||
.lr-badge {
|
||
font-size: 10px;
|
||
font-weight: 650;
|
||
color: #fff;
|
||
background: linear-gradient(135deg, #ff7a6e, var(--color-primary));
|
||
padding: 1px 6px;
|
||
border-radius: 6px;
|
||
margin-left: 4px;
|
||
vertical-align: middle;
|
||
}
|
||
.lr-desc {
|
||
display: block;
|
||
font-size: 12px;
|
||
color: var(--color-text-tertiary);
|
||
margin-top: 4px;
|
||
line-height: 1.45;
|
||
}
|
||
.lr-chev {
|
||
flex-shrink: 0;
|
||
color: #d0d0d0;
|
||
font-size: 16px;
|
||
}
|
||
</style>
|