Several pieces of data are displayed by default in the vue list, click to show all

Ideas:

1. When obtaining interface data, add a showmore: false variable to each piece of data

2. Show hiddenly, add a constant to show several items by default, judge showmore: false, show several items, show all if it is true

3. When you click on each item, the hidden problem will be displayed, using this.$set() to dynamically set it! showmore

Insert picture description here

Insert picture description here

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45108907/article/details/108215759