<uni-pop ref="uniPopUp" type="center">
<view class="pop-up-box"></view>
</uni-pop>
let uniPopUp:any = ref(null);
const open = (e:any) => {
uniPopUp.value.open('center')
console.log(uniPopUp.value)
}
- 发布:2022-03-22 16:09
- 更新:2022-03-28 11:26
- 阅读:1158
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
第三方开发者工具版本号: webstrom2021..2.1
基础库版本号: 2.22
项目创建方式: CLI
CLI版本号: 5.0.1
操作步骤:
预期结果:
<uni-pop ref="uniPopUp" type="center">
<view class="pop-up-box"></view>
</uni-pop>
let uniPopUp:any = ref(null);
const open = (e:any) => {
uniPopUp.value.open('center')
console.log(uniPopUp.value)
}
<uni-pop ref="uniPopUp" type="center">
<view class="pop-up-box"></view>
</uni-pop>
let uniPopUp:any = ref(null);
const open = (e:any) => {
uniPopUp.value.open('center')
console.log(uniPopUp.value)
}
实际结果:
<uni-pop ref="uniPopUp" type="center">
<view class="pop-up-box"></view>
</uni-pop>
let uniPopUp:any = ref(null);
const open = (e:any) => {
uniPopUp.value.open('center')
console.log(uniPopUp.value)
}
<uni-pop ref="uniPopUp" type="center">
<view class="pop-up-box"></view>
</uni-pop>
let uniPopUp:any = ref(null);
const open = (e:any) => {
uniPopUp.value.open('center')
console.log(uniPopUp.value)
}
bug描述:
uni-pop-up 组件里面的 windowTop属性 在微信小程序发开文档里面是没有的 https://developers.weixin.qq.com/miniprogram/dev/api/base/system/wx.getSystemInfo.html;
获取系统信息时由于该属性(windowTop)的缺失 导致popupHeight = NAN; 弹窗无法显示