vue的v-for循环出来的列表里面的列表点击事件只对当前列表有效
vue的v-for循环出来的列表里面的列表点击事件只对当前列表有效
·
<view class="dropDown" @click="downAction(item)"></view>
<view class="uni-combox__selectors" v-if="item.hideShow">
</view>
listss: [
{
start_time: '',
end_time: '',
hideShow: false,
stuList: [{ name: 'dsf ', state: '0' }, { name: '张三 ', state: '1' }],
},
{
start_time: '',
end_time: '',
hideShow: false,
stuList: [{ name: 'dsf ', state: '0' }, { name: '张三 ', state: '2' }],
},
],
downAction(data) {
let this_ = this;
if (!data.hideShow) {
data.hideShow = true;
} else if (data.hideShow == true) {
data.hideShow = false;
}
},
更多推荐
已为社区贡献2条内容
所有评论(0)