Browse Source

ios键盘高度优化

master
xsx 4 months ago
parent
commit
de0cfa0b5a
  1. 4
      im-uniapp/manifest.json
  2. 13
      im-uniapp/pages/chat/chat-box.vue

4
im-uniapp/manifest.json

@ -2,8 +2,8 @@
"name" : "盒子IM", "name" : "盒子IM",
"appid" : "__UNI__69DD57A", "appid" : "__UNI__69DD57A",
"description" : "", "description" : "",
"versionName" : "3.4.0", "versionName" : "3.10.0",
"versionCode" : 3400, "versionCode" : 31000,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

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

@ -848,12 +848,6 @@ export default {
h -= 50; h -= 50;
// //
if (this.isShowKeyBoard || this.chatTabBox != 'none') { if (this.isShowKeyBoard || this.chatTabBox != 'none') {
// ios app
// #ifdef APP-PLUS
if (sysInfo.platform == 'ios') {
h += this.screenHeight - this.windowHeight;
}
// #endif
h -= this.keyboardHeight; h -= this.keyboardHeight;
this.scrollToBottom(); this.scrollToBottom();
} }
@ -922,6 +916,13 @@ export default {
this.isShowKeyBoard = res.height > 0; this.isShowKeyBoard = res.height > 0;
if (this.isShowKeyBoard) { if (this.isShowKeyBoard) {
this.keyboardHeight = res.height; // this.keyboardHeight = res.height; //
// #ifdef APP-PLUS
// ios app
let sysInfo = uni.getSystemInfoSync();
if (sysInfo.platform == 'ios') {
this.keyboardHeight -= this.screenHeight - this.windowHeight;
}
// #endif
} }
setTimeout(() => this.reCalChatMainHeight(), 30); setTimeout(() => this.reCalChatMainHeight(), 30);
}, },

Loading…
Cancel
Save