Compare commits

...

2 Commits

@ -363,51 +363,58 @@ const keyHeight = ref(350);
const msgKeyHeight = ref("100%"); const msgKeyHeight = ref("100%");
// 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;
// APP
const systemInfo = uni.getSystemInfoSync(); // APP
const safeBottom = systemInfo.safeAreaInsets?.bottom || 0; const systemInfo = uni.getSystemInfoSync();
// = - - const safeBottom = systemInfo.safeAreaInsets?.bottom || 0;
// = - -
//
// #ifdef MP-WEIXIN //
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 120; // #ifdef MP-WEIXIN
uni.$emit("msgKeyHeight", availableHeight); // if (systemInfo.platform === 'ios') {
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 64;
writeStyle.value = `bottom: calc(${e.detail.height}px + env(safe-area-inset-bottom))`; uni.$emit('msgKeyHeight', availableHeight); //
// #endif }else{
// #ifdef APP-PLUS const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 94;
// uni.$emit('msgKeyHeight', availableHeight); //
let availableHeight, bottomValue; }
if (systemInfo.platform === "ios") {
//
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom; writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
bottomValue = e.detail.height - safeBottom - 34; // #endif
} else { // #ifdef APP-PLUS
// //
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34; let availableHeight, bottomValue;
bottomValue = e.detail.height - safeBottom; if (systemInfo.platform === 'ios') {
} //
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom;
uni.$emit("msgKeyHeight", availableHeight); // bottomValue = e.detail.height - safeBottom - 34;
writeStyle.value = `bottom: ${bottomValue}px`; } else {
// #endif //
} 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 = () => {
isFocus.value = false; isFocus.value = false;

Loading…
Cancel
Save