mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-19 05:48:14 +00:00
perf: 滑动列表自动隐藏键盘
This commit is contained in:
parent
55a922c7b3
commit
9be0642ba5
@ -243,6 +243,17 @@ export default {
|
|||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容区域触摸开始事件
|
||||||
|
* @param e
|
||||||
|
*/
|
||||||
|
onContentTouchStart(e) {
|
||||||
|
const focusedElement = document.activeElement;
|
||||||
|
if (focusedElement) {
|
||||||
|
focusedElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 滚动区域滚动事件
|
* 滚动区域滚动事件
|
||||||
* @param e
|
* @param e
|
||||||
@ -383,6 +394,7 @@ export default {
|
|||||||
ref: 'content',
|
ref: 'content',
|
||||||
class: this.contentClass,
|
class: this.contentClass,
|
||||||
on: {
|
on: {
|
||||||
|
touchstart: this.onContentTouchStart,
|
||||||
scroll: this.onContentScroll,
|
scroll: this.onContentScroll,
|
||||||
mouseenter: this.onContentMouseenter,
|
mouseenter: this.onContentMouseenter,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul @scroll="operateVisible = false">
|
<ul @touchstart="onTouchStart" @scroll="onScroll">
|
||||||
<template v-if="projectLists.length === 0">
|
<template v-if="projectLists.length === 0">
|
||||||
<li v-if="projectKeyLoading > 0" class="loading"><Loading/></li>
|
<li v-if="projectKeyLoading > 0" class="loading"><Loading/></li>
|
||||||
<li v-else class="nothing">
|
<li v-else class="nothing">
|
||||||
@ -153,6 +153,17 @@ export default {
|
|||||||
this.goForward({name: 'manage-' + path, params: params || {}});
|
this.goForward({name: 'manage-' + path, params: params || {}});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onTouchStart(e) {
|
||||||
|
const focusedElement = document.activeElement;
|
||||||
|
if (focusedElement) {
|
||||||
|
focusedElement.blur();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onScroll(e) {
|
||||||
|
this.operateVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
modalPercent(item) {
|
modalPercent(item) {
|
||||||
if (this.operateVisible) {
|
if (this.operateVisible) {
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user