帖子
帖子
用户
博客
课程
显示全部楼层
4
帖子
0
勋章
14
Y币

[多端开发] v-for

[复制链接]
发表于 2021-4-14 19:54:29
想问一下v-for列表渲染中 index值可以自己定义吗
4
帖子
0
勋章
14
Y币
比如说现在有这样一个数组 items: [{
      title: 'How to do lists in Vue.js',
      author: 'Jane Doe',
      publishedAt: '2016-04-10'
              },
              {
      title: 'How to do lists in Vue',
      author: 'Jane Dom',
      publishedAt: '2016-04-11'
              }]
这样用(item,index) of items 出来的就是0-xxx
                                                                  1-xxx
能不能把index值自行定义
380
帖子
4
勋章
6
Y币
不能
您需要登录后才可以回帖 登录

本版积分规则