当前位置:网站首页>Antd select selector drop-down box follows the scroll bar to scroll through the solution
Antd select selector drop-down box follows the scroll bar to scroll through the solution
2022-07-07 11:09:00 【Have a good time I】
The selector is as follows :
After scrolling the scroll bar :
The original code
<div class="title"> submission </div>
<a-form-model-item ref="submitType" prop="submitType" class="select-item">
<a-select v-model="form.submitType" >
<a-select-option v-for="item in typeArray" :key="item.id" :value="item.value" >
{
{ item.name }}
</a-select-option>
</a-select>
According to the official documents, there is no problem
I always thought I wrote the positioning problem , As a result, I found the hidden properties of official documents for a long time getPopupContainer,
Use it directly getPopupContainer={triggerNode => triggerNode.parentNode}
So the code changes to
<div class="title"> submission </div>
<a-form-model-item ref="submitType" prop="submitType" class="select-item">
<a-select v-model="form.submitType" :getPopupContainer="triggerNode=> triggerNode.parentNode">
<a-select-option v-for="item in typeArray" :key="item.id" :value="item.value" >
{
{ item.name }}
</a-select-option>
</a-select>
Solve the problem directly .
summary :
1.select Components ,Cascader Components use :
Add getPopupContainer attribute , Use it directly getPopupContainer={triggerNode => triggerNode.parentNode}, As shown above :
2. date 、 Components of time class (DatePicker、TimePicker)
Add getCalendarContainer attribute , As shown below :
<a-range-picker @change="changeRangeList" :value="dateRangeListVal" :placeholder="[' Select Start Date ', ' Select deadline ']" :getCalendarContainer="triggerNode=> triggerNode.parentNode" />
边栏推荐
- Opencv installation and environment configuration - vs2017
- Force buckle 1002 Find common characters
- [système recommandé 01] rechub
- seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
- 2022.7.4DAY596
- Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
- The difference between monotonicity constraint and anti monotonicity constraint
- [OneNote] can't connect to the network and can't sync the problem
- Wallhaven wallpaper desktop version
- 2022.7.6DAY598
猜你喜欢

When do you usually get grades in the soft exam? Online pedaling?

How to successfully pass the senior system architecture designer in the second half of the year?

How much review time does it usually take to take the intermediate soft exam?

关于jmeter中编写shell脚本json的应用

JSON format query of MySQL

Arduino board description

Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe

Wallhaven壁纸桌面版

How to prepare for the advanced soft test (network planning designer)?

China Southern Airlines pa3.1
随机推荐
Go-Redis 中间件
2022.7.3DAY595
Records on the use of easyflash v3.3
Interprocess communication (IPC)
基于STC8G1K08的0.96寸IIC液晶屏驱动程序
JS implementation chain call
关于jmeter中编写shell脚本json的应用
Those confusing concepts (3): function and class
【pyqt】tableWidget里的cellWidget使用信号与槽机制
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
长列表性能优化方案 memo
滚动踩坑--UNI_APP(八)
The use of list and Its Simulation Implementation
变量的解构赋值
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
2021-05-21
Process control (creation, termination, waiting, program replacement)
[OneNote] can't connect to the network and can't sync the problem
Some online academic report websites and machine learning videos
Go Slice 比较