<radio-group class="uni-list" @change="onClickMemberChangeItem">
<view v-for="(item, index) in memberList" :key="index" class="uni-list-item" @click.stop="onClickMemberDetailItem(item)">
<view class="uni-list-item__container">
<view>
<radio :value="item.member_id" :checked="index === currentMemberIndex" />
</view>
<view class="uni-list-item__content">
<text class="uni-list-item__content-title uni-ellipsis-2">{{ i18n.phoneTitle + ": " + item.mobile || "无" }}</text>
</view>
<uni-icons :size="16" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
</view>
</view>
</radio-group>
当点击radio时,会同时触发onClickMemberChangeItem与onClickMemberDetailItem方法。
1 个回复
ddgx
传事件对象 给radio 上 加自定义属性 根据事件对象里面的target获取 判断