grid-cell的评分显示在图片的右下角

This commit is contained in:
zhl 2019-04-04 17:33:30 +08:00
parent f5cb1300df
commit 03e2d47ac2

View File

@ -3,15 +3,24 @@
width: 33.333333%; width: 33.333333%;
text-align: center; text-align: center;
overflow: hidden; overflow: hidden;
margin-bottom:5px;
} }
.grid-cell-item .item-inner{ .grid-cell-item .item-inner{
margin: 5rpx; margin: 5rpx;
color: #666; color: #666;
font-size: 28rpx; font-size: 28rpx;
} }
.grid-cell-item .item-image .item-score {
position: absolute;
right: 5px;
bottom: 0;
font-weight: bold;
color: #fd6300;
}
.grid-cell-item .item-image{ .grid-cell-item .item-image{
width: 100%; width: 100%;
height: 300rpx; height: 300rpx;
position: relative;
} }
.grid-cell-item .bigstar{ .grid-cell-item .bigstar{
width: 120rpx; width: 120rpx;
@ -29,11 +38,13 @@
<template> <template>
<view class='grid-cell-item' @tap="gameTap({{item.gid}})"> <view class='grid-cell-item' @tap="gameTap({{item.gid}})">
<view class='item-inner'> <view class='item-inner'>
<image mode="aspectFill" src="{{item.icon}}" class='item-image'/> <image mode="aspectFill" src="{{item.icon}}" class='item-image'>
<text class="item-score">{{item.score}}</text>
</image>
<view> <view>
<text class="item-name">{{item.name}}</text> <text class="item-name">{{item.name}}</text>
</view> </view>
<rating :score.sync="currentScore"></rating> <!--<rating :score.sync="currentScore"></rating>-->
</view> </view>
</view> </view>
</template> </template>