未选择
scroll_view下面写
white-space: nowrap;
height: 700rpx;
fx_k类样式下面写
display: inline-block;
border-bottom: 2rpx solid #F4F4F4;
padding: 20rpx 24rpx;
color: #333333;
font-size: 28rpx;
display: flex;
justify-content: space-between;
align-items: center;
<!-- @touchmove.prevent.stop @mousewheel.prevent 这是禁止鼠标和触摸对底层页面的滚动用的复制我注释的这个
,不用的下面那个知识禁止触摸-->
<view class="res_tk" v-if="r_ly" @touchmove.stop.prevent="">
<view class="tk_bs">
<view class="bts">
<view class="bt_h1">取消订单</view>
<view class="Xx_xxi" @click="Xx_xxi">
<view class="nei_x1"></view>
<view class="nei_x2"></view>
</view>
</view>
这个可一滑动你想要用的内容 scroll-view,不过你的设置高度 如fx_k这个类
<scroll-view class="scroll_view" scroll-y="true" >
<view class="fx_k" v-for="(item,index) in reasons" :Key="item.id" @click="re_son(index)">
{{item.reason}}
<radio :value="item.fz_dx" :checked="index === current " />
<!-- index === current -->
</view>
</scroll-view>
<view class="bt_qd" @click="getCancelOrder">确定</view>
</view>
</view>
data里面
reasons: [], //取消订单按钮传的参
current: null,//默认radio 未选择
fz_dx: '',
fz_id: 0,
methods里面
re_son: function(index) {
let ta = this;
console.log(index)
if (index=='') {
ta.current=null //默认radio 未选择
}else{
ta.current = index
console.log(ta.reasons[index].reason)
ta.fz_dx = ta.reasons[index].reason
ta.fz_id = ta.reasons[index].id
}
},
版权声明:本文为YUlangML原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。