采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
在使用 v-for 的时候,虽然可以正常运行,但是终端会提示:
(Emitted value instead of an instance of Error) <swiper-slide v-for="food in banners">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.
我应当如何处理它
因为我在 这里看到了你的回答
http://coding.imooc.com/learn/questiondetail/7562.html
虽然他是必须的,但是我不知道给 key 传什么东西合适?因为我根本不知道这是个啥
传一个唯一值就行了,index就可以,主要用处是列表打乱顺序,增删改查的时候标记唯一值,具体怎么用要看vue源码了,我也不知道
传键值
登录后可查看更多问答,登录/注册
快速入门Vue2.0,组件化开发一个数字产品电商平台
2.0k 1
1.7k 1
1.5k 5
1.3k 14
2.5k 12