Compare commits

..

No commits in common. '9c551c58a0ec54163f54e8124b43e02d1272bac2' and '81d7ae175c191253dab6e60b24e45c07a946170a' have entirely different histories.

@ -363,15 +363,14 @@ const keyHeight = ref(350);
const msgKeyHeight = ref("100%"); const msgKeyHeight = ref("100%");
// message-input.vuekeyboardheightchange // message-input.vuekeyboardheightchange
// message-input.vuekeyboardheightchange const keyboardheightchange = (e) => {
const keyboardheightchange = (e) => {
keyHeight.value = e.detail.height; keyHeight.value = e.detail.height;
uni.$emit(events.KeyboardEvent, e.detail.height); uni.$emit(events.KeyboardEvent, e.detail.height);
uni.$emit('KeyboardHeight', e.detail.height); uni.$emit("KeyboardHeight", e.detail.height);
if (e.detail.height === 0) { if (e.detail.height === 0) {
writeStyle.value = "bottom: 0"; writeStyle.value = "bottom: 0";
uni.$emit('msgKeyHeight', '100%'); // uni.$emit("msgKeyHeight", "100%"); //
} else { } else {
// //
emojiVisible.value = false; emojiVisible.value = false;
@ -386,21 +385,15 @@ const msgKeyHeight = ref("100%");
// //
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
if (systemInfo.platform === 'ios') { const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 120;
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 64; uni.$emit("msgKeyHeight", availableHeight); //
uni.$emit('msgKeyHeight', availableHeight); //
}else{
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 94;
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))`;
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
// //
let availableHeight, bottomValue; let availableHeight, bottomValue;
if (systemInfo.platform === 'ios') { if (systemInfo.platform === "ios") {
// //
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom; availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom;
bottomValue = e.detail.height - safeBottom - 34; bottomValue = e.detail.height - safeBottom - 34;
@ -410,11 +403,11 @@ const msgKeyHeight = ref("100%");
bottomValue = e.detail.height - safeBottom; bottomValue = e.detail.height - safeBottom;
} }
uni.$emit('msgKeyHeight', availableHeight); // uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: ${bottomValue}px`; writeStyle.value = `bottom: ${bottomValue}px`;
// #endif // #endif
} }
}; };
const handleInputBlur = () => { const handleInputBlur = () => {
isFocus.value = false; isFocus.value = false;

Loading…
Cancel
Save