Compare commits

..

2 Commits

@ -845,10 +845,23 @@ const screenHeight = ref(0);
screenHeight.value = uni.getSystemInfoSync().windowHeight; screenHeight.value = uni.getSystemInfoSync().windowHeight;
const chooseData = ref({}); const chooseData = ref({});
onMounted(() => { onMounted(() => {
try {
try { try {
const windowInfo = uni.getWindowInfo(); const windowInfo = uni.getWindowInfo();
console.log("windowInfo", windowInfo); console.log("windowInfo", windowInfo);
ssff.value = (windowInfo?.safeArea?.top || 30) + 14; let safeTop = windowInfo?.safeArea?.top || 0;
// safeArea.top 0使
if (safeTop === 0) {
const systemInfo = uni.getSystemInfoSync();
// iOS
if (systemInfo.platform === 'ios') {
safeTop = systemInfo.statusBarHeight || 44; // iOS 44
} else {
safeTop = systemInfo.statusBarHeight || 30;
}
}
ssff.value = safeTop + 14;
} catch (error) { } catch (error) {
ssff.value = 48; // ssff.value = 48; //
} }

Loading…
Cancel
Save