master
wangxia 1 month ago
parent 1dc647705d
commit 7ae76dfe48

@ -468,11 +468,11 @@ const keyboardheightchange = (e) => {
// uni.$emit("msgKeyHeight", availableHeight); // // uni.$emit("msgKeyHeight", availableHeight); //
// writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; // writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
if (systemInfo.platform === 'ios') { if (systemInfo.platform === "ios") {
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34; const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value + 34;
uni.$emit("msgKeyHeight", availableHeight); // uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
}else{ } else {
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
uni.$emit("msgKeyHeight", availableHeight); // uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
@ -845,7 +845,6 @@ 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);
@ -855,7 +854,7 @@ onMounted(() => {
if (safeTop === 0) { if (safeTop === 0) {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
// iOS // iOS
if (systemInfo.platform === 'ios') { if (systemInfo.platform === "ios") {
safeTop = systemInfo.statusBarHeight || 44; // iOS 44 safeTop = systemInfo.statusBarHeight || 44; // iOS 44
} else { } else {
safeTop = systemInfo.statusBarHeight || 30; safeTop = systemInfo.statusBarHeight || 30;

Loading…
Cancel
Save