mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-15 19:28:11 +00:00
perf: 客户端窗口激活自动获取聊天焦点
This commit is contained in:
parent
82fad2c17d
commit
f6b7eca0f5
@ -479,6 +479,7 @@ export default {
|
||||
'cacheDialogs',
|
||||
'wsOpenNum',
|
||||
'touchBackInProgress',
|
||||
'dialogIns'
|
||||
]),
|
||||
|
||||
...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) {
|
||||
if (val) {
|
||||
this.operateVisible = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user