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

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


正在检查问题,临时方案,给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>