|
@@ -13,7 +13,7 @@
|
|
|
<div class="info-cards" :style="{ '--card-border-bg': `url(${borderBgImg})` }">
|
|
<div class="info-cards" :style="{ '--card-border-bg': `url(${borderBgImg})` }">
|
|
|
<div v-for="(card, index) in cards" :key="index" class="info-card">
|
|
<div v-for="(card, index) in cards" :key="index" class="info-card">
|
|
|
<template v-if="index === 3">
|
|
<template v-if="index === 3">
|
|
|
- <img class="badge-icon" :src="badgeIcon" alt="" />
|
|
|
|
|
|
|
+ <img class="badge-icon" :src="resolvedBadgeIcon" alt="" />
|
|
|
<span class="badge-label">{{ card.bottom }}</span>
|
|
<span class="badge-label">{{ card.bottom }}</span>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -26,16 +26,18 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+import { computed } from 'vue'
|
|
|
import { Icon } from '@iconify/vue'
|
|
import { Icon } from '@iconify/vue'
|
|
|
import boardImg from '@/assets/img/guard/board.png'
|
|
import boardImg from '@/assets/img/guard/board.png'
|
|
|
import borderBgImg from '@/assets/img/guard/border-bg.png'
|
|
import borderBgImg from '@/assets/img/guard/border-bg.png'
|
|
|
|
|
+import level1Img from '@/assets/img/guard/level-1.png'
|
|
|
|
|
|
|
|
export type GuardInfoCard = {
|
|
export type GuardInfoCard = {
|
|
|
top?: string
|
|
top?: string
|
|
|
bottom: string
|
|
bottom: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-withDefaults(
|
|
|
|
|
|
|
+const props = withDefaults(
|
|
|
defineProps<{
|
|
defineProps<{
|
|
|
title?: string
|
|
title?: string
|
|
|
subtitle?: string
|
|
subtitle?: string
|
|
@@ -45,7 +47,6 @@ withDefaults(
|
|
|
{
|
|
{
|
|
|
title: '【茜茜荔荔】',
|
|
title: '【茜茜荔荔】',
|
|
|
subtitle: '用户昵称 2025.06.22',
|
|
subtitle: '用户昵称 2025.06.22',
|
|
|
- badgeIcon: '',
|
|
|
|
|
cards: () => [
|
|
cards: () => [
|
|
|
{ top: '2025.05.16', bottom: '从化荔博园' },
|
|
{ top: '2025.05.16', bottom: '从化荔博园' },
|
|
|
{ top: '16年老树', bottom: '妃子笑荔枝' },
|
|
{ top: '16年老树', bottom: '妃子笑荔枝' },
|
|
@@ -55,6 +56,8 @@ withDefaults(
|
|
|
},
|
|
},
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+const resolvedBadgeIcon = computed(() => props.badgeIcon || level1Img)
|
|
|
|
|
+
|
|
|
const emit = defineEmits<{ edit: [] }>()
|
|
const emit = defineEmits<{ edit: [] }>()
|
|
|
|
|
|
|
|
function onEdit() {
|
|
function onEdit() {
|
|
@@ -131,12 +134,13 @@ function onEdit() {
|
|
|
bottom: calc(var(--footer-bottom-offset) + var(--footer-height) + 10rem);
|
|
bottom: calc(var(--footer-bottom-offset) + var(--footer-height) + 10rem);
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
display: grid;
|
|
display: grid;
|
|
|
- grid-template-columns: repeat(4, 1fr);
|
|
|
|
|
|
|
+ grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
|
gap: 4rem;
|
|
gap: 4rem;
|
|
|
|
|
+
|
|
|
.info-card {
|
|
.info-card {
|
|
|
- min-height: 58rem;
|
|
|
|
|
- padding: 8rem 4rem;
|
|
|
|
|
- box-sizing: border-box;
|
|
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 58rem;
|
|
|
background: var(--card-border-bg) no-repeat center / 100% 100%;
|
|
background: var(--card-border-bg) no-repeat center / 100% 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
@@ -144,32 +148,32 @@ function onEdit() {
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
color: #fff;
|
|
color: #fff;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.card-top {
|
|
.card-top {
|
|
|
- font-size: 11rem;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- line-height: 1.3;
|
|
|
|
|
- margin-bottom: 4rem;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-family: SmileySans, sans-serif;
|
|
|
|
|
+ font-size: 16rem;
|
|
|
|
|
+ margin-bottom: 3rem;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.card-bottom {
|
|
.card-bottom {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-family: SmileySans, sans-serif;
|
|
|
font-size: 10rem;
|
|
font-size: 10rem;
|
|
|
- line-height: 1.35;
|
|
|
|
|
- opacity: 0.92;
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.badge-icon {
|
|
.badge-icon {
|
|
|
- width: 28rem;
|
|
|
|
|
- height: 28rem;
|
|
|
|
|
|
|
+ width: 24rem;
|
|
|
|
|
+ height: 31rem;
|
|
|
object-fit: contain;
|
|
object-fit: contain;
|
|
|
- margin-bottom: 4rem;
|
|
|
|
|
|
|
+ margin-bottom: 2rem;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.badge-label {
|
|
.badge-label {
|
|
|
- font-size: 11rem;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: 10rem;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- color: #ffb400;
|
|
|
|
|
- line-height: 1.3;
|
|
|
|
|
|
|
+ color: #ffd2a7;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|