How to use Scroll in vue and iview to realize data unlimited scrolling function
This article introduces the relevant knowledge of "how to use Scroll to realize unlimited data scrolling function in ue and iview". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Here are some ways to capture and encapsulate data:
The principle is to define two global variables, one to store all data and one to store rendered data.
When data is first obtained, store the first ten items of all data in the rendered variables:
Then pull up and load ten new pieces of data at the bottom:
Several of these problems have been solved:
1. How to display when the data is less than ten
2. When data rendering is complete, no more data rendering
3. Scroll height, because it is a fixed value, will get the height of the entire screen after mounting, according to their own needs, the height of the middle scroll to calculate and set
"How to use Scroll to realize unlimited data scrolling function in ue and iview" is introduced here. Thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!