@@ -226,6 +226,7 @@ watch(
|
|||||||
width="24"
|
width="24"
|
||||||
height="24"
|
height="24"
|
||||||
object-fit="cover"
|
object-fit="cover"
|
||||||
|
:class="{ 'earned-badge': badge.is_earned }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<n-flex vertical size="small">
|
<n-flex vertical size="small">
|
||||||
@@ -241,6 +242,9 @@ watch(
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
<n-text type="primary" v-if="badge.is_earned">
|
||||||
|
✓ 已获得
|
||||||
|
</n-text>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
</n-tooltip>
|
</n-tooltip>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
@@ -260,4 +264,10 @@ watch(
|
|||||||
<n-empty v-if="problemSets.length === 0"></n-empty>
|
<n-empty v-if="problemSets.length === 0"></n-empty>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.earned-badge {
|
||||||
|
border: 2px solid #ffd700;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ export interface ProblemSetBadge {
|
|||||||
icon: string
|
icon: string
|
||||||
condition_type: "all_problems" | "problem_count" | "score"
|
condition_type: "all_problems" | "problem_count" | "score"
|
||||||
condition_value: number
|
condition_value: number
|
||||||
|
is_earned?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserBadge {
|
export interface UserBadge {
|
||||||
|
|||||||
Reference in New Issue
Block a user