mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 09:08:51 +08:00
fix: 🐛 修复wd-drop-menu-item组件在popup数据较多在滚动区下拉时和页面onPullDownRefresh之间的冲突 (#1113)
✅ Closes: #1107
This commit is contained in:
parent
9943011b4c
commit
73027c0cef
@ -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
|
||||
|
||||
@ -72,6 +72,10 @@ export const dorpMenuItemProps = {
|
||||
* 自定义下拉菜单popup样式
|
||||
*/
|
||||
customPopupStyle: makeStringProp(''),
|
||||
/**
|
||||
* 弹出层高度 这里设置了 就取这里的
|
||||
*/
|
||||
popupHeight: makeStringProp(''),
|
||||
/**
|
||||
* 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal)
|
||||
*/
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user