美文网首页
小程序列表单选

小程序列表单选

作者: 糖醋里脊120625 | 来源:发表于2023-10-26 14:29 被阅读0次
         <van-radio-group value="{{checkBusiness}}"  bind:change="handleChecked">
                <view class="business-item-wrap" wx:for="{{businessData}}" wx:for-item="item" wx:key="index" data-bean="{{item}}">
                    <view class="list-item-check">
                        <van-radio icon-size="30px" name="{{item.licenseNo}}" data-bean="{{item}}" ></van-radio>
                    </view>
                    <view class="business-item-contact" data-bean="{{item}}" catchtap="checkItem">
                        <view class="item-con">
                            <view class="business-item-name">{{item.name}}</view>
                            <view class="business-item-tanwei">商户许可证:{{item.licenseNo}}</view>
                            <view class="business-item-tanwei">{{item.address}}</view>
                        </view>
                    </view>
                </view>
                        
            </van-radio-group>
    
    handleChecked(event){
            
            var objData=this.data.businessData.find(function (x) {
                return x.licenseNo === event.detail
            })
            this.setData({
                checkBusiness: event.detail,
            });
            this.checkedSameResultFun(objData)
        },
    
    checkItem(event){
            let itemData= event.currentTarget.dataset.bean;
           
            this.setData({
                checkBusiness: itemData.licenseNo,
            });
            this.checkedSameResultFun(itemData)
        },
    

    相关文章

      网友评论

          本文标题:小程序列表单选

          本文链接:https://www.haomeiwen.com/subject/xfnyidtx.html