mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-15 11:18:12 +00:00
perf: 触摸返回中禁止滚动消息列表
This commit is contained in:
parent
178b511a24
commit
e750d2ae80
@ -53,7 +53,7 @@
|
|||||||
"vue-resize-observer": "^2.0.16",
|
"vue-resize-observer": "^2.0.16",
|
||||||
"vue-router": "^3.5.3",
|
"vue-router": "^3.5.3",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
"vue-virtual-scroller-hi": "^1.0.10-1",
|
"vue-virtual-scroller-hi": "^1.0.10-2",
|
||||||
"vuedraggable": "^2.24.3",
|
"vuedraggable": "^2.24.3",
|
||||||
"vuex": "^3.6.2",
|
"vuex": "^3.6.2",
|
||||||
"webpack": "^5.69.1",
|
"webpack": "^5.69.1",
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mobile-back" :style="style"></div>
|
<div v-if="show" class="mobile-back" :style="style"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MobileBack",
|
name: "MobileBack",
|
||||||
props: {
|
props: {
|
||||||
@ -37,10 +39,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['windowScrollY']),
|
||||||
|
|
||||||
style() {
|
style() {
|
||||||
return {
|
return {
|
||||||
top: this.y + 'px',
|
top: (this.y + this.windowScrollY) + 'px',
|
||||||
left: this.x > 20 && this.show ? 0 : '-50px',
|
left: this.x > 20 ? 0 : '-50px',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -65,10 +65,14 @@
|
|||||||
</slot>
|
</slot>
|
||||||
<DynamicScroller
|
<DynamicScroller
|
||||||
ref="scroller"
|
ref="scroller"
|
||||||
|
class="dialog-scroller"
|
||||||
|
:class="{
|
||||||
|
'overlay-y': !touchBackInProgress
|
||||||
|
}"
|
||||||
|
:disabled="touchBackInProgress"
|
||||||
:items="allMsgs"
|
:items="allMsgs"
|
||||||
:min-item-size="58"
|
:min-item-size="58"
|
||||||
@onScroll="onScroll"
|
@onScroll="onScroll">
|
||||||
class="dialog-scroller overlay-y">
|
|
||||||
<template #before>
|
<template #before>
|
||||||
<template v-if="allMsgs.length === 0">
|
<template v-if="allMsgs.length === 0">
|
||||||
<div v-if="dialogData.loading > 0" class="dialog-item loading"><Loading/></div>
|
<div v-if="dialogData.loading > 0" class="dialog-item loading"><Loading/></div>
|
||||||
@ -239,7 +243,8 @@ export default {
|
|||||||
'cacheDialogs',
|
'cacheDialogs',
|
||||||
'dialogMsgs',
|
'dialogMsgs',
|
||||||
'wsOpenNum',
|
'wsOpenNum',
|
||||||
'windowScrollY'
|
'windowScrollY',
|
||||||
|
'touchBackInProgress'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
isReady() {
|
isReady() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user