perf: 客户端窗口激活自动获取聊天焦点

This commit is contained in:
kuaifan 2022-07-08 16:23:14 +08:00
parent 82fad2c17d
commit f6b7eca0f5

View File

@ -479,6 +479,7 @@ export default {
'cacheDialogs', 'cacheDialogs',
'wsOpenNum', 'wsOpenNum',
'touchBackInProgress', 'touchBackInProgress',
'dialogIns'
]), ]),
...mapGetters(['isLoad']), ...mapGetters(['isLoad']),
@ -793,6 +794,15 @@ export default {
} }
}, },
windowActive(active) {
if (active && this.autoFocus) {
const lastDialog = $A.last(this.dialogIns)
if (lastDialog && lastDialog.uid === this._uid) {
this.inputFocus()
}
}
},
dialogDrag(val) { dialogDrag(val) {
if (val) { if (val) {
this.operateVisible = false; this.operateVisible = false;