美文网首页
UniApp 遍历显示 uni-tag标签

UniApp 遍历显示 uni-tag标签

作者: Rinaloving | 来源:发表于2024-01-17 12:01 被阅读0次

    效果

    image.png

    代码

    <view class="people">
                    <view class="con" v-for="(item, index) in list" :key="index">
                        <view class="info">
                            <view class="right">
    
                                <view class="tit" style="color: rgb(255, 122, 82); font-weight: 700">
                                    <uni-icons style="padding-right: 2px;" type="contact" color="#ff5252"
                                        :size="25"></uni-icons>
                                    姓名:{{ item.name }}
                                </view>
                                <view class="cons">身份证号:{{ item.idcrad }}</view>
                                <view class="cons">地址:{{ item.address }}</view>
                                <view class="cons" @click="makingACall(item.phone)">联系电话:{{ item.phone }}</view>
                                <view class="cons">服务模式:
                                <template v-for="(serviceModeItem,serviceModeIndex) in item.serviceModeList">
                                    <uni-tag  :inverted="true" text="评估" type="success"  v-show="serviceModeItem == 1">
                                        </uni-tag>
                                        <uni-tag  :inverted="true" text="回访" type="primary" style="margin-left: 2px;"  v-show="serviceModeItem == 2">
                                            </uni-tag>
                                </template>
                                
                                </view>
                            </view>
                        </view>
                        <view class="times">
                            <view>
                                <button :disabled="returnVisitVisible" @click="ReturnVisit(item)">开始评估</button>
                            </view>
                        </view>
                    </view>
    

    相关文章

      网友评论

          本文标题:UniApp 遍历显示 uni-tag标签

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