当前位置:网站首页>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" />
边栏推荐
- Use load_ decathlon_ Datalist (Monai) fast loading JSON data
- JS implementation chain call
- Socket socket programming
- 【C#】WinForm运行缩放(变糊)的解决方法
- Deeply understand the characteristics of database transaction isolation
- Go redis Middleware
- Qtcreator sets multiple qmake
- Hash / (understanding, implementation and application)
- TypeScript 接口继承
- Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
猜你喜欢

【亲测可行】error while loading shared libraries的解决方案

JSON format query of MySQL
![[pro test feasible] error while loading shared libraries solution](/img/e2/688ffa07861f38941cbf2cafdd9939.png)
[pro test feasible] error while loading shared libraries solution

深入理解Apache Hudi异步索引机制

CSAPP bomb lab parsing

在线硬核工具

SQL Server 知识汇集9 : 修改数据

Shardingsphere sub database and table examples (logical table, real table, binding table, broadcast table, single table)

Is the soft test intermediate useful??

【机器学习 03】拉格朗日乘子法
随机推荐
Verilog 实现数码管显视驱动【附源码】
Bookmarking - common website navigation for programmers
Mysql的json格式查询
2021-05-21
Unable to open kernel device '\.\vmcidev\vmx': operation completed successfully. Reboot after installing vmware workstation? Module "devicepoweron" failed to start. Failed to start the virtual machine
July 10, 2022 "five heart public welfare" activity notice + registration entry (two-dimensional code)
Using tansformer to segment three-dimensional abdominal multiple organs -- actual battle of unetr
[pyqt] the cellwidget in tablewidget uses signal and slot mechanism
Go-Redis 中间件
Une fois que l'uniapp a sauté de la page dans onlaunch, cliquez sur Event Failure resolution
Unity script generates configurable files and loads
Network foundation (1)
What are the test preparation materials and methods for soft exam information processing technicians?
Operation method of Orange Pie orangepi 4 lts development board connecting SATA hard disk through mini PCIe
uniCloud
VR development optimization
mif 文件格式记录
Network engineer test questions and answers in May of the first half of 2022
2021 summary and 2022 outlook
[untitled]