mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-29 08:40:43 +00:00
优化返回手势抖动问题
This commit is contained in:
parent
b855312cf9
commit
6c7c17cd61
@ -44,11 +44,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['windowScrollY']),
|
...mapState(['windowHeight', 'windowScrollY']),
|
||||||
|
|
||||||
style() {
|
style() {
|
||||||
|
const offset = 135;
|
||||||
|
const top = Math.max(offset, this.y) + this.windowScrollY,
|
||||||
|
maxTop = this.windowHeight - offset;
|
||||||
return {
|
return {
|
||||||
top: (this.y + this.windowScrollY) + 'px',
|
top: Math.min(top, maxTop) + 'px',
|
||||||
left: this.x > 20 ? 0 : '-50px',
|
left: this.x > 20 ? 0 : '-50px',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user