style: 修改样式

This commit is contained in:
zerosaturation 2026-05-08 17:24:30 +08:00
parent 852b02f014
commit 86f32cd4df
5 changed files with 54 additions and 9 deletions

View File

@ -81,6 +81,8 @@
@tap="goToAssetDetail(item.id)">
<!-- 卡片主体 -->
<view class="liked-item" :class="index === 0 ? 'liked-item-first' : ''">
<!-- 排名图标 -->
<image v-if="index < 3" :src="rankIcons[index]" :class="'rank-icon rank-icon-' + (index + 1)" mode="aspectFit"></image>
<!-- 作品封面 -->
<view class="liked-cover-wrap" :class="index === 0 ? 'liked-cover-wrap-first' : ''">
<image class="liked-cover" :src="item.cover_url || '/static/nft/placeholder.png'"
@ -152,6 +154,12 @@ const formatScore = (score) => {
return Number(score).toLocaleString();
};
const rankIcons = [
'/static/rank/rank-icon1.png',
'/static/rank/rank-icon2.png',
'/static/rank/rank-icon3.png',
];
//
const exhibitionWorks = ref([]);
@ -502,6 +510,29 @@ onMounted(() => {
padding-left: 20%;
}
/* 排名图标 - 排名越靠前越大 */
.rank-icon {
flex-shrink: 0;
/* margin-right: 8rpx; */
position: relative;
left: 32rpx;
}
.rank-icon-1 {
width: 72rpx;
height: 88rpx;
}
.rank-icon-2 {
width: 64rpx;
height: 78rpx;
}
.rank-icon-3 {
width: 56rpx;
height: 68rpx;
}
.liked-cover-wrap {
width: 88rpx;
height: 88rpx;

View File

@ -101,7 +101,7 @@
<view v-for="(item, index) in likedWorks" :key="item.id" class="liked-row"
@tap="goToAssetDetail(item.id)">
<!-- 排名图标绝对定位在卡片左侧 -->
<!-- <image v-if="index < 3" :src="rankIcons[index]" class="rank-icon-img" mode="aspectFit"></image> -->
<image v-if="index < 3" :src="rankIcons[index]" :class="'rank-icon rank-icon-' + (index + 1)" mode="aspectFit"></image>
<!-- 卡片主体 -->
<view class="liked-item" :class="index === 0 ? 'liked-item-first' : ''">
@ -291,9 +291,9 @@ const handleExhibitionCardTap = (item, index) => {
};
const rankIcons = [
'/static/rank/rank-icon1.png',
'/static/rank/rank-icon2.png',
'/static/rank/rank-icon3.png',
'/static/square/icon1.png',
'/static/square/icon2.png',
'/static/square/icon3.png',
];
const formatScore = (score) => {
@ -773,12 +773,26 @@ onShow(() => {
padding-left: 20%;
}
/* 排名徽章 */
.rank-icon-img {
width: 56rpx;
height: 68rpx;
/* 排名图标 - 排名越靠前越大 */
.rank-icon {
flex-shrink: 0;
margin-right: 8rpx;
position: relative;
left: 32rpx;
}
.rank-icon-1 {
width: 96rpx;
height: 128rpx;
}
.rank-icon-2 {
width: 72rpx;
height: 104rpx;
}
.rank-icon-3 {
width: 64rpx;
height: 88rpx;
}
.rank-number-badge {

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB