You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!-- 分类展示 : first - two 风格 -- >
< template >
< view >
< view class = "ss-flex flex-wrap" >
< view class = "goods-box" v-for ="item in pagination?.list" :key="item.id">
<view @click="sheep.$router.go('/pages/goods/index', { id: item.id })">
<view class="goods-img">
<image class="goods-img" :src="item.picUrl" mode="aspectFit" />
</view>
<view class="goods-content">
<view class="goods-title ss-line-1 ss-m-b-28">{{ item.title }}</view>
<view class="goods-price" > ¥ {{ fen2yuan ( item.price ) }} < / view >
< / view >
< / view >
< / view >
< / view >
< / view >
< / template >
< script setup >
import sheep from '@/sheep' ;
import { fen2yuan } from '@/sheep/hooks/useGoods' ;
const props = defineProps ( {
pagination : Object ,
} ) ;
< / script >
< style lang = "scss" scoped >
. goods - box {
width : calc ( ( 100 % - 20 rpx ) / 2 ) ;
margin - bottom : 20 rpx ;
. goods - img {
width : 100 % ;
height : 246 rpx ;
border - radius : 10 rpx 10 rpx 0 px 0 px ;
}
. goods - content {
width : 100 % ;
background : # ffffff ;
box - shadow : 0 px 0 px 20 rpx 4 rpx rgba ( 199 , 199 , 199 , 0.22 ) ;
padding : 20 rpx 0 32 rpx 16 rpx ;
box - sizing : border - box ;
border - radius : 0 0 10 rpx 10 rpx ;
. goods - title {
font - size : 26 rpx ;
font - weight : bold ;
color : # 333333 ;
}
. goods - price {
font - size : 24 rpx ;
font - family : OPPOSANS ;
font - weight : 500 ;
color : # e1212b ;
}
}
& : nth - child ( 2 n + 1 ) {
margin - right : 20 rpx ;
}
}
< / style >