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',
2. Problem: Cannot scroll. Solution: Because keep-alive caching is enabled, you need to set
activated () { this.$refs.scroller.reset() }
If it still doesn’t work, please execute the following code after obtaining the background data
this.$nxtTick(() => { this.$refs.scroller.reset() })
Post the code of the entire page.
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!