ZxxZ
ZxxZ
  • 发布:2024-07-09 16:03
  • 更新:2024-07-09 20:52
  • 阅读:385

uni-popup和uni-datetime-picker一起使用bug

分类:uni-app

弹窗里面使用时间选择器,时间选择器飞上天了

2024-07-09 16:03 负责人:无 分享
已邀请:
DCloud_UNI_yuhe

DCloud_UNI_yuhe

正在检查问题,临时方案,给pop中用高度把uni-datetime-picker撑开

<template>  
    <view>  
        <uni-popup ref="popup1">  
            <view class="pop">  
                <uni-datetime-picker ref="timepicker"></uni-datetime-picker>  
            </view>  
        </uni-popup>  
        <button @click="click">click</button>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  

            }  
        },  
        onLoad() {  
            // this.$nextTick(()=>{  
            //  this.$refs.popup1.open('top')  
            //  this.$nextTick(()=>{  
            //      this.$refs.timepicker.show()  
            //  })  
            // })  
        },  
        methods: {  
            click() {  
                this.$refs.popup1.open('top')  
            }  
        }  
    }  
</script>  

<style>  
    .pop {  
        height: 600px;  
        background-color: #fff;  
    }  
</style>

要回复问题请先登录注册