当前位置:网站首页>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" />
边栏推荐
- Compile QT project script with qmake
- shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)
- TypeScript 接口继承
- Opencv installation and environment configuration - vs2017
- Some online academic report websites and machine learning videos
- Poj1821 fence problem solving Report
- [untitled]
- Mysql的json格式查询
- 关于jmeter中编写shell脚本json的应用
- Qtcreator sets multiple qmake
猜你喜欢
Unity script visualization about layout code
简单易修改的弹框组件
【pyqt】tableWidget里的cellWidget使用信号与槽机制
Network engineer test questions and answers in May of the first half of 2022
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
Basic knowledge of process (orphan, zombie process)
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
Ping tool ICMP message learning
【安装系统】U盘安装系统教程,使用UltraISO制作U盘启动盘
Still cannot find RPC dispatcher table failed to connect in virtual KD
随机推荐
2022.7.4DAY596
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
Which securities company is the best and safest to open an account for the subscription of new shares
PR Lecture Notes
[C #] the solution of WinForm operation zoom (blur)
Wallhaven壁纸桌面版
SQL Server 知识汇集9 : 修改数据
[installation system] U disk installation system tutorial, using UltraISO to make U disk startup disk
Mysql的json格式查询
[untitled]
QT document
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
The seventh training assignment
2022.7.5DAY597
【机器学习 03】拉格朗日乘子法
Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)
I plan to take part in security work. How about information security engineers and how to prepare for the soft exam?
基于STC8G1K08的0.96寸IIC液晶屏驱动程序
Those confusing concepts (3): function and class