feat(cp排行榜): 弹幕情侣头像中间显示爱心图像

This commit is contained in:
hzj 2026-01-19 21:46:21 +08:00
parent a985b45945
commit b65b295ec8

View File

@ -20,12 +20,40 @@
padding: 8px; padding: 8px;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; gap: 2vw;
backdrop-filter: blur(1px); backdrop-filter: blur(1px);
" "
:style="getBarrageStyle(item)" :style="getBarrageStyle(item)"
@animationend="handleAnimationEnd(item.id)" @animationend="handleAnimationEnd(item.id)"
> >
<!-- 情侣头像 -->
<div
style="
position: relative;
display: flex;
align-items: center;
gap: 2vw;
"
>
<!-- 爱心图形 -->
<div
style="
position: absolute;
inset: 0;
display: flex;
justify-content: center;
align-items: center;
"
>
<img
:src="imageUrl('coupleSign')"
alt=""
style="width: 5vw; display: block; object-fit: cover"
/>
</div>
<!-- 发送人 --> <!-- 发送人 -->
<img <img
v-smart-img v-smart-img
@ -54,6 +82,8 @@
" "
@error="handleAvatarImageError" @error="handleAvatarImageError"
/> />
</div>
<div <div
style=" style="
white-space: nowrap; white-space: nowrap;
@ -79,10 +109,14 @@
<script setup> <script setup>
import { ref, computed, onMounted, onUnmounted, watch } from 'vue' import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { getPngUrl } from '@/config/imagePaths.js'
import { handleAvatarImageError } from '@/utils/imageHandler.js' import { handleAvatarImageError } from '@/utils/imageHandler.js'
const { locale, t } = useI18n() const { locale, t } = useI18n()
// OSSURL
const imageUrl = (filename) => getPngUrl('Ranking/Couple/', filename)
const props = defineProps({ const props = defineProps({
barrageList: { barrageList: {
type: Array, type: Array,