提交 cd1bb170 编写于 作者: shutao-dc's avatar shutao-dc

update custom-refresher.uvue

上级 de3a0618
...@@ -12,19 +12,19 @@ ...@@ -12,19 +12,19 @@
</view> </view>
<refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box> <refresh-box slot="refresher" :state="state" :pullingDistance="pullingDistance"></refresh-box>
</scroll-view> </scroll-view>
</template> </template>
<script> <script>
import refreshBox from './refresh-box/refresh-box.uvue'; import refreshBox from './refresh-box/refresh-box.uvue';
export default { export default {
components:{refreshBox}, components:{refreshBox},
data() { data() {
return { return {
refresherTriggered:false, refresherTriggered:false,
refresherThreshold:40, refresherThreshold:40,
pullingDistance:0, pullingDistance:0,
resetting: false resetting: false
} }
}, },
computed:{ computed:{
state():number{ state():number{
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
return 0 return 0
} }
} }
}, },
methods: { methods: {
onRefresherpulling(e:RefresherEvent){ onRefresherpulling(e:RefresherEvent){
// console.log('onRefresherpulling',e.detail.dy) // console.log('onRefresherpulling',e.detail.dy)
this.pullingDistance = e.detail.dy this.pullingDistance = e.detail.dy
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
this.refresherTriggered = true this.refresherTriggered = true
setTimeout(()=>{ setTimeout(()=>{
this.refresherTriggered = false this.refresherTriggered = false
this.resetting = true
},1500) },1500)
}, },
onRefreshrestore() { onRefreshrestore() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册