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