Compare commits

..

No commits in common. '98f8c41ca169449f87f47594592feb41adffd292' and 'c9bc3d23eaf32b9cef7d6cd99e4b980721543b03' have entirely different histories.

@ -63,7 +63,7 @@
</div> </div>
</div> </div>
<!-- {{ssff}}键盘高度{{keyHeight}} 输入框距离底部距离{{writeStyle}}屏幕高度{{screenHeight}}顶部聊天区域高度{{msgKeyHeight}} --> <!--键盘高度{{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" /> <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> </div>
@ -361,73 +361,59 @@ const pushUp = ref(false);
const keyHeight = ref(350); const keyHeight = ref(350);
const msgKeyHeight = ref("100%"); const msgKeyHeight = ref("100%");
const ssff = ref(uni.getWindowInfo().safeArea.top);
console.log('安全域高度安全域高度安全域高度安全域高度安全域高度安全域高度',ssff);
// message-input.vuekeyboardheightchange
// message-input.vuekeyboardheightchange // message-input.vuekeyboardheightchange
const keyboardheightchange = (e) => { // message-input.vuekeyboardheightchange
keyHeight.value = e.detail.height; const keyboardheightchange = (e) => {
uni.$emit(events.KeyboardEvent, e.detail.height); keyHeight.value = e.detail.height;
uni.$emit('KeyboardHeight', e.detail.height); uni.$emit(events.KeyboardEvent, e.detail.height);
uni.$emit('KeyboardHeight', e.detail.height);
if (e.detail.height === 0) {
writeStyle.value = "bottom: 0"; if (e.detail.height === 0) {
uni.$emit('msgKeyHeight', '100%'); // writeStyle.value = "bottom: 0";
} else { uni.$emit('msgKeyHeight', '100%'); //
// } else {
emojiVisible.value = false; //
extVisible.value = false; emojiVisible.value = false;
audioPanelVisible.value = false; extVisible.value = false;
sendMoreVisible.value = false; audioPanelVisible.value = false;
sendMoreVisible.value = false;
const systemInfo = uni.getSystemInfoSync();
// let safeBottom = 0; // APP
const systemInfo = uni.getSystemInfoSync();
// // #ifdef MP-WEIXIN const safeBottom = systemInfo.safeAreaInsets?.bottom || 0;
// if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) { // = - -
// safeBottom = systemInfo.safeAreaInsets.bottom;
// } //
// // #endif // #ifdef MP-WEIXIN
if (systemInfo.platform === 'ios') {
// // #ifdef APP-PLUS const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 64;
// if (systemInfo.safeAreaInsets && systemInfo.safeAreaInsets.bottom) { uni.$emit('msgKeyHeight', availableHeight); //
// safeBottom = systemInfo.safeAreaInsets.bottom; }else{
// } const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 94;
// // #endif uni.$emit('msgKeyHeight', availableHeight); //
}
// //
// // #ifdef MP-WEIXIN
// if (systemInfo.platform === 'ios') { writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
// const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; // #endif
// uni.$emit('msgKeyHeight', availableHeight); // // #ifdef APP-PLUS
// }else{ //
// const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; let availableHeight, bottomValue;
// uni.$emit('msgKeyHeight', availableHeight); // if (systemInfo.platform === 'ios') {
// } //
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom;
const availableHeight = systemInfo.windowHeight - e.detail.height - ssff.value; bottomValue = e.detail.height - safeBottom - 34;
uni.$emit('msgKeyHeight', availableHeight); // } else {
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`; //
// #endif availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34;
// #ifdef APP-PLUS bottomValue = e.detail.height - safeBottom;
// }
let availableHeight, bottomValue;
if (systemInfo.platform === 'ios') { uni.$emit('msgKeyHeight', availableHeight); //
// writeStyle.value = `bottom: ${bottomValue}px`;
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom; // #endif
bottomValue = e.detail.height - safeBottom - 34; }
} else {
//
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34;
bottomValue = e.detail.height - safeBottom;
}
uni.$emit('msgKeyHeight', availableHeight); //
writeStyle.value = `bottom: ${bottomValue}px`;
// #endif
}
}; };
const handleInputBlur = () => { const handleInputBlur = () => {

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

Loading…
Cancel
Save