当前位置:网站首页>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" />
边栏推荐
- 从色情直播到直播电商
- Network engineer test questions and answers in May of the first half of 2022
- 单调性约束与反单调性约束的区别 monotonicity and anti-monotonicity constraint
- IDEA快捷键大全
- 长列表性能优化方案 memo
- seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
- verilog设计抢答器【附源码】
- When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?
- Typescript interface inheritance
- Une fois que l'uniapp a sauté de la page dans onlaunch, cliquez sur Event Failure resolution
猜你喜欢

Qtcreator sets multiple qmake

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

2021 summary and 2022 outlook

2022年7月10日“五心公益”活动通知+报名入口(二维码)

Mysql的json格式查询
![[untitled]](/img/c2/d70d052b7e9587dc81c622f62f8566.jpg)
[untitled]

shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)

Opencv installation and environment configuration - vs2017

The concept, implementation and analysis of binary search tree (BST)

China Southern Airlines pa3.1
随机推荐
书签整理-程序员常用网站导航
Laya common script commands
香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
shardingsphere分库分表示例(逻辑表,真实表,绑定表,广播表,单表)
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
IDEA快捷键大全
Mendeley -- a free document management tool that automatically inserts references into papers
Socket socket programming
uniCloud
seata 1.3.0 四种模式解决分布式事务(AT、TCC、SAGA、XA)
2022.7.3DAY595
[recommendation system 01] rechub
深入理解Apache Hudi异步索引机制
Ffmpeg record a video command from RTSP
VR development optimization
[untitled]
基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
MPX plug-in
Transaction rolled back because it has been marked as rollback-only解决
Bookmarking - common website navigation for programmers