实现商品两列布局
效果图如下:
具体的步骤如下:
在components文件夹下新建一个文件 shopList.vue 文件
代码如下:
<template>
<view>
<view class="shopList">
<view class="itemshop" v-for="(item,index) in shopList" @click="toDetail(item)" :key='index'>
<view class="itemIcon">
<image :src="item[proImgKey]" style="width: 100%;height: 100%;border-radius: 8rpx 8rpx 0rpx 0rpx;" mode=""></image>
</view>
<view class="itemBottem">
<view class="title">
{
{
item[nameKey]}}
</view>
<view v-if="featuredType!=4" class="money">
<view class="money_left">
<text class="text">¥</text>
<text v-if="item[priceKey]" class="miney">{
{
item[priceKey].toFixed(