浏览代码

修改桌号

sunshibo 1 月之前
父节点
当前提交
03a720969d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue

+ 2 - 1
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -203,6 +203,7 @@
 				} = uni.getWindowInfo()
 				// #endif
 				// #ifndef MP-WEIXIN
+				const info = (typeof uni.getWindowInfo === 'function' ? uni.getWindowInfo() : uni.getSystemInfoSync()) || {}
 				const {
 					windowWidth,
 					windowHeight,
@@ -210,7 +211,7 @@
 					safeArea,
 					screenHeight,
 					safeAreaInsets
-				} = uni.getSystemInfoSync()
+				} = info
 				// #endif
 				this.popupWidth = windowWidth
 				this.popupHeight = windowHeight + (windowTop || 0)