Browse Source

!132 兼容ios设备键盘高度问题

Merge pull request !132 from blue/v_3.0.0
master
blue 1 year ago
committed by Gitee
parent
commit
c78f774872
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
  1. 6
      im-uniapp/pages/chat/chat-box.vue
  2. 2
      im-web/src/components/common/RightMenu.vue

6
im-uniapp/pages/chat/chat-box.vue

@ -750,9 +750,12 @@ export default {
// ios h5
window.addEventListener('focusin', this.focusInListener);
window.addEventListener('focusout', this.focusOutListener);
// ios13
if(window.visualViewport){
window.visualViewport.addEventListener('resize', this.resizeListener);
}
} else {
// h5
let initHeight = window.innerHeight;
window.addEventListener('resize', this.resizeListener);
}
// #endif
@ -763,7 +766,6 @@ export default {
},
unListenKeyboard() {
// #ifdef H5
// h5
window.removeEventListener('resize', this.resizeListener);
window.removeEventListener('focusin', this.focusInListener);
window.removeEventListener('focusout', this.focusOutListener);

2
im-web/src/components/common/RightMenu.vue

@ -1,5 +1,5 @@
<template>
<div class="right-menu-mask" @click="close()" @contextmenu.prevent="close()">
<div class="right-menu-mask" @click.stop="close()" @contextmenu.prevent="close()">
<div class="right-menu" :style="{ 'left': pos.x + 'px', 'top': pos.y + 'px' }">
<el-menu text-color="#333333">
<el-menu-item v-for="(item) in items" :key="item.key" :title="item.name"

Loading…
Cancel
Save