当前位置:网站首页>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" />
边栏推荐
- Transaction rolled back because it has been marked as rollback-only解决
- Unity websocket server
- [recommendation system 01] rechub
- China Southern Airlines pa3.1
- Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
- The difference between monotonicity constraint and anti monotonicity constraint
- 简单易修改的弹框组件
- 【pyqt】tableWidget里的cellWidget使用信号与槽机制
- mif 文件格式记录
- 长列表性能优化方案 memo
猜你喜欢
Transaction rolled back because it has been marked as rollback-only解决
Network engineer test questions and answers in May of the first half of 2022
[untitled]
香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
Mpx 插件
Monai version has been updated to 0.9. See what new functions it has
[C #] the solution of WinForm operation zoom (blur)
基于DE2 115开发板驱动HC_SR04超声波测距模块【附源码】
[actual combat] transformer architecture of the major medical segmentation challenges on the list --nnformer
随机推荐
Wallhaven壁纸桌面版
【亲测可行】error while loading shared libraries的解决方案
Transaction rolled back because it has been marked as rollback only
[untitled]
[installation system] U disk installation system tutorial, using UltraISO to make U disk startup disk
[untitled]
【OneNote】无法连接到网络,无法同步问题
Long list performance optimization scheme memo
uniCloud
Some online academic report websites and machine learning videos
Hash / (understanding, implementation and application)
PR Lecture Notes
[untitled]
【PyTorch 07】 动手学深度学习——chapter_preliminaries/ndarray 习题动手版
基于STC8G1K08的0.96寸IIC液晶屏驱动程序
Bookmarking - common website navigation for programmers
Which securities company is the best and safest to open an account for the subscription of new shares
MPX plug-in
When initializing 'float', what is the difference between converting to 'float' and adding 'f' as a suffix?
[untitled]