Fix(AI):[#3606]苹果手机键盘底部及开启新对话按钮没有留空隙
This commit is contained in:
@@ -20,6 +20,7 @@ export const chatMixins = {
|
||||
// 状态栏高度
|
||||
statusBarHeight: 20,
|
||||
fileHttpStr: Object.freeze(VUE_APP_API_URL + settings.sysPrefix),
|
||||
keyboardHeight: 0,
|
||||
optionsFrom: '',
|
||||
onFocus: false,
|
||||
loading: false,
|
||||
@@ -67,8 +68,17 @@ export const chatMixins = {
|
||||
}
|
||||
}.bind(this)).exec()
|
||||
},
|
||||
onLoad() {
|
||||
// 监听键盘高度变化
|
||||
wx.onKeyboardHeightChange((res) => {
|
||||
console.log('监听键盘高度变化%s', res.height)
|
||||
this.keyboardHeight = res.height
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
this.closeWsFn()
|
||||
// console.log('在页面卸载时取消监听')
|
||||
// wx.offKeyboardHeightChange()
|
||||
},
|
||||
created() {
|
||||
const _this = this
|
||||
@@ -215,7 +225,9 @@ export const chatMixins = {
|
||||
},
|
||||
closeWsFn() {
|
||||
this.loading = false
|
||||
this.chatMessageList[this.chatMessageListLength - 1].showCursor = false
|
||||
if (this.chatMessageListLength) {
|
||||
this.chatMessageList[this.chatMessageListLength - 1].showCursor = false
|
||||
}
|
||||
uni.closeSocket({
|
||||
success: () => {
|
||||
console.log('-----关闭连接')
|
||||
|
||||
Reference in New Issue
Block a user