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