Number of vue v-for settings.

A list was sent to me from the background. There are more than 50 pieces of data in this list

.

I only want the first three pieces of list data to v-for

.

how do I do this?

Mar.07,2021

v-for="item in list.slice(0,3)"

arr.slice (0jin3)


the one upstairs is better. Change the answer:

<div v-for="item in items.slice(0,3)">{{ item }}</div>
Menu