Vue Js - Loop via v-for X times (in a range)

前端 未结 6 1061
星月不相逢
星月不相逢 2021-01-30 04:54

How can I repeat a loop via v-for X (e.g. 10) times?

// want to repeat this (e.g.) 10 times

6条回答
  •  故里飘歌
    2021-01-30 05:31

    You can use the native JS slice method:

    The slice() method returns the selected elements in an array, as a new array object.

    Based on tip in the migration guide: https://vuejs.org/v2/guide/migration.html#Replacing-the-limitBy-Filter

提交回复
热议问题