Ant select 选择器的下拉菜单固定在触发器的父元素中,不让下拉菜单随页面滚动
<a-select
v-model:value="formState.deptId"
:getPopupContainer="triggerNode => {return triggerNode.parentNode || document.body}"
>
<a-select-option v-for="item in deptList" :value="item.id" :key="item.name" :label="item.name">{{ item.name }}</a-select-option>
</a-select>
该功能是通过设置:getPopupContainer="triggerNode => {return triggerNode.parentNode || document.body}"