l***@163.com
l***@163.com
  • 发布:2024-09-03 10:01
  • 更新:2025-02-27 11:51
  • 阅读:181

uni-popup和uni-datetime-picker一起使用显示不全bug

分类:uni-app

飞了

2024-09-03 10:01 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

在popup上添加一个高度可以暂时解决,或者是弹出位置选择bottom,之后会做出调整

DCloud_UNI_yuhe

DCloud_UNI_yuhe

可以尝试以下代码,看看能否解决你的需求:
当type为top时使用以下代码:

<uni-popup ref="popup" type="top">  
        <view :style="{ height: 'calc(100vh - 37px)' }">  
            <uni-datetime-picker type="date" :clear-icon="false" v-model="single" @maskClick="maskClick" />  
        </view>  
</uni-popup>  

当type为left或right时,设置style为width:100vw

当type为bottom时不需要设置

3***@qq.com

3***@qq.com

外层的transform属性设置导致position: fixed;的参考位置发生变化使用

要回复问题请先登录注册