小程序实现多选删除列表数据

本文介绍了如何在小程序中实现多选列表,并提供了一种实现多选删除功能的方法,包括JS和CSS的相关代码实现。
摘要由CSDN通过智能技术生成

实现小程序一个类似多选列表删除的功能

<!-- 错题本 -->
<!-- 错题本 -->
<view class="contarner">
    <view class="content">
        <view class="title flex-def flex-cCenter flex-zBetween">
            <view>错题本(<text>{
   {
   list.length}}</text>)题</view>
            <view class="editBtn" bindtap="showSelIcon">{
   {
   iconStatu?'取消':'编辑'}}</view>
        </view>
        <view class="{
   {
   iconStatu?'margin-b':''}}">
            <view bindtap="toggleSel"  class="item flex-def flex-cCenter flex-zBetween" wx:for="{
   {
   list}}" wx:key="{
   {
   index}}" data-id='{
   {
   item.id}}'>
                <view class="flex-def flex-cCenter flex-zBetween" data-id='{
   {
   item.id}}'>
                    <icon wx:if="{
   {
   iconStatu}}" type="success" size="20" color="{
   {
   item.selStatu?'#0f0':'#999'}}" data-id='{
   {
   item.id}}' />
                    <view data-id='{
   {
   item.id}}'>
                        <text data-id='{
   {
   item.id}}'>{
   {
   item.letter}}-</text>
                        <text data-id='{
   {
   item.id}}'>正确:{
   {
   item.nickname}}</text>
                    </view>
                </view>
                <view data-id='{
   {
   item.id}}'>
                    <text class="wrongCount" data-id='{
   {
   item.id}}'>23</text>
                    <text class="wrongText" data-id='{
   {
   item.id}}'>错误次数</text>
                </view>
            </view>
        &
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值