获取下拉弹窗状态
packageJ\merchantInspection\merchantDetailAdd\merchantDetailAdd.wxml
<van-dropdown-menu>
<van-dropdown-item value="{{ detailInfo.foodBusinessLicenseText }}" options="{{ option1 }}" id="dropdownItem1"
bind:close="closeDropdown"
bind:open="openDropdown"
bind:change="onDropdownChangeFoodBusiness"
custom-class="background-color: red !important;"/>
</van-dropdown-menu>
onPageScroll() {
if (this.data.dropdownOpen) {
console.log('页面滚动了');
this.setData({
dropdownOpen: false
})
if(this.selectComponent('#dropdownItem1').data.showPopup){
this.selectComponent('#dropdownItem1').toggle();
}
if(this.selectComponent('#dropdownItem2').data.showPopup){
this.selectComponent('#dropdownItem2').toggle();
}
}
},
