fix: 🐛 修复wd-drop-menu-item组件在popup数据较多在滚动区下拉时和页面onPullDownRefresh之间的冲突 (#1113)

 Closes: #1107
This commit is contained in:
gogHeroDream 2025-09-24 12:43:15 +08:00 committed by GitHub
parent 9943011b4c
commit 73027c0cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 3 deletions

View File

@ -209,6 +209,7 @@ const handleBeforeToggle: DropMenuItemBeforeToggle = ({ status, resolve }) => {
| value-key | 选项对象中value 对应的 key | string | - | value | - |
| label-key | 选项对象中,展示的文本对应的 key | string | - | label | - |
| tip-key | 选项对象中,选项说明对应的 key | string | - | tip | - |
| popup-height | popup弹出容器的高度不设置默认为80% | string | - | - | $LOWEST_VERSION$ |
| root-portal | 是否从页面中脱离出来,用于解决各种 fixed 失效问题 | boolean | - | false | 1.11.0 |
## DropdownItem Events

View File

@ -72,6 +72,10 @@ export const dorpMenuItemProps = {
* popup样式
*/
customPopupStyle: makeStringProp(''),
/**
*
*/
popupHeight: makeStringProp(''),
/**
* fixed (H5: teleport, APP: renderjs, 小程序: root-portal)
*/

View File

@ -9,7 +9,7 @@
:z-index="zIndex"
:duration="duration"
:position="position"
:custom-style="`position: absolute; pointer-events: auto; max-height: 80%;${customPopupStyle}`"
:custom-style="`position: absolute; pointer-events: auto; max-height: ${popupHeight ? popupHeight : '80%'}; ${customPopupStyle}`"
:custom-class="customPopupClass"
:modal="false"
:close-on-click-modal="false"
@ -19,7 +19,7 @@
@before-leave="beforeLeave"
@after-leave="afterLeave"
>
<view v-if="options.length">
<scroll-view v-if="options.length" :style="popupHeight ? { height: popupHeight } : ''" scroll-y scroll-with-animation :show-scrollbar="true">
<view
v-for="(item, index) in options"
:key="index"
@ -36,7 +36,7 @@
:custom-class="`wd-drop-item__icon ${customIcon}`"
/>
</view>
</view>
</scroll-view>
<slot v-else />
</wd-popup>
</view>