Introduction to the pull-up refresh function based on the Vue framework vux component library

不言
Release: 2018-06-29 16:16:52
Original
1631 people have browsed it

This article mainly introduces in detail the pull-up refresh function based on the Vue framework vux component library. It has a certain reference value. Interested friends can refer to it

The company is currently developing apps , 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 refresh once, solution: need to manually reset the status
this.scrollerStatus .pullupStatus = 'default',
2. Problem: Cannot scroll. Solution: Because keep-alive cache is enabled, you need to set

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

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

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

to post the code of the entire page.


   
Copy after login

The above is the entire content of this article. I hope it will be helpful to everyone’s study. Please pay attention to more related content. PHP Chinese website!

Related recommendations:

How vue achieves the effect of forward refresh and backward without refresh

vue2.0 mobile terminal implements drop-down Refresh and pull up to load more examples

The above is the detailed content of Introduction to the pull-up refresh function based on the Vue framework vux component library. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
vue
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