mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-17 06:32:51 +00:00
perf: 触屏设备实体键盘回车发送
This commit is contained in:
parent
4957f32d06
commit
e75fbadd53
@ -357,13 +357,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['cacheProjects', 'cacheTasks', 'cacheUserBasic', 'dialogMsgs', 'cacheDialogs']),
|
...mapState([
|
||||||
|
'cacheProjects',
|
||||||
|
'cacheTasks',
|
||||||
|
'cacheUserBasic',
|
||||||
|
|
||||||
isEnterSend() {
|
'cacheDialogs',
|
||||||
if (typeof this.enterSend === "boolean") {
|
'dialogMsgs',
|
||||||
return this.enterSend;
|
|
||||||
|
'keyboardType',
|
||||||
|
'keyboardHeight',
|
||||||
|
]),
|
||||||
|
|
||||||
|
isEnterSend({enterSend, keyboardType, keyboardHeight, windowTouch}) {
|
||||||
|
if (typeof enterSend === "boolean") {
|
||||||
|
return enterSend;
|
||||||
} else {
|
} else {
|
||||||
return !this.windowTouch
|
// 如果是触屏设备而且虚拟键盘高度小于120时,考虑是实体键盘按键所以回车发送
|
||||||
|
if (windowTouch && keyboardType === "show" && keyboardHeight < 120) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return !windowTouch
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user