uni-app 实现购物车
要实现的效果
具体实现代码
<template>
<view>
<view class="">
<view class="cartlist">
<view class="cartitem" v-for="(item,index) of cartlist" :key="index" @touchstart="drawStart"
@touchmove="drawMove"
@touchend="drawEnd"
:data-index="index"
:style="'right:'+item.right+'px'">
<view class="">
<checkbox-group @change="selected(item)">
<checkbox class="xuanzhong" :checked="item.flag" />
</checkbox-group>
<image src="../../static/indexImg/u=100059035,2545312220&fm=26&gp=0.jpg" mode=""></image>
<view class="itemright">
<view class="shopCarName">
{
{item.proname}}
</view>
<view class="shopCarPrice">
¥{
{item.price}}
<!-- <text class="del" @click="del(item,index)">删除</text> -->
</view>
<view class="bgImg">
<text class=&#