100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > ant design vue 在弹窗中使用下拉框导致下拉框选项显示不出来

ant design vue 在弹窗中使用下拉框导致下拉框选项显示不出来

时间:2022-05-08 21:12:34

相关推荐

ant design vue 在弹窗中使用下拉框导致下拉框选项显示不出来

解决办法:

antd vue官网select选择器API中给出了解决方法,就是getPopupContainer这个属性,

在项目中的使用:

<a-selectv-decorator="['unit']"option-filter-prop="children":show-search="true":allow-clear="true"style="width:60%":getPopupContainer="triggerNode => {return triggerNode.parentNode || document.body;}"//作用在这段代码@change="getRoleList"placeholder="请选择关联单位"><a-select-optionv-for="item in deptIdList":key="item.id":value="item.unitCode + ';' + item.deptName">{{ item.unitCode + ";" + item.deptName }}</a-select-option></a-select>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。