How to implement pull-up refresh function in vux

亚连
Release: 2018-06-07 10:55:19
Original
2309 people have browsed it

Recently, the company is developing an app and has chosen the vux component library based on the Vue framework. Now we summarize the pitfalls encountered in implementing the pull-up refresh function. Interested friends can refer to it.

Recently, the company is developing an app. , chose the vux component library based on the Vue framework, and now summarizes the pitfalls encountered in implementing the pull-up refresh function:

1. Problem: only refreshes once, solution: need to manually reset the state

this.scrollerStatus.pullupStatus = ‘default',
Copy after login

2. Problem: Cannot scroll. Solution: Because keep-alive caching is enabled, you need to set

activated () { this.$refs.scroller.reset() }
Copy after login

If it still doesn’t work, please execute the following code after obtaining the background data

this.$nxtTick(() => { this.$refs.scroller.reset() })
Copy after login

Post the code of the entire page.

   
Copy after login

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Using better-scroll scrolling plug-in in vue

How to implement single image cross-domain upload in VUE UEditor Function

Problems in vue about watch not being able to detect changes in object properties

The above is the detailed content of How to implement pull-up refresh function in vux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!