Compare commits

..

2 Commits

@ -63,7 +63,7 @@
</div>
</div>
<!--键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}}-->
<!-- {{ssff}}键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}} -->
<input v-show="!showEmojiInput" :focus="isFocus" class="msg-input-input g_flex_1" :maxlength="-1" :placeholder="isTeamMute ? t('teamMutePlaceholder') : t('chatInputPlaceHolder')" v-model="inputText" type="text" :disabled="isTeamMute" :confirm-hold="true" cursor-spacing="20" :adjust-position="pushUp" confirm-type="send" @keyboardheightchange="keyboardheightchange" @confirm="handleSendTextMsg" @blur="handleInputBlur" @input="handleInput" id="msg-input" />
</div>
@ -361,6 +361,9 @@ const pushUp = ref(false);
const keyHeight = ref(350);
const msgKeyHeight = ref("100%");
const ssff = ref(uni.getWindowInfo().safeArea.top);
console.log('安全域高度安全域高度安全域高度安全域高度安全域高度安全域高度',ssff);
// message-input.vuekeyboardheightchange
// message-input.vuekeyboardheightchange
@ -379,22 +382,33 @@ const msgKeyHeight = ref("100%");
audioPanelVisible.value = false;
sendMoreVisible.value = false;
// APP
const systemInfo = uni.getSystemInfoSync();
const safeBottom = systemInfo.safeAreaInsets?.bottom || 0;
// = - -
//
// #ifdef MP-WEIXIN
if (systemInfo.platform === 'ios') {
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 64;
uni.$emit('msgKeyHeight', availableHeight); //
}else{
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 94;
uni.$emit('msgKeyHeight', availableHeight); //
}
const systemInfo = uni.getSystemInfoSync();
// let safeBottom = 0;
// // #ifdef MP-WEIXIN
// if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) {
// safeBottom = systemInfo.safeAreaInsets.bottom;
// }
// // #endif
// // #ifdef APP-PLUS
// if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) {
// safeBottom = systemInfo.safeAreaInsets.bottom;
// }
// // #endif
// //
// // #ifdef MP-WEIXIN
// if (systemInfo.platform === 'ios') {
// const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
// uni.$emit('msgKeyHeight', availableHeight); //
// }else{
// const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
// uni.$emit('msgKeyHeight', availableHeight); //
// }
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value;
uni.$emit('msgKeyHeight', availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
// #endif
// #ifdef APP-PLUS

@ -151,7 +151,7 @@
screenHeight1.value = res;
// 100%
if (typeof res === 'number') {
msgKeyHeight.value = `${res * 2}rpx`;
msgKeyHeight.value = `${res - 34}px`;
} else {
msgKeyHeight.value = res; // '100%'
}

Loading…
Cancel
Save