vue v-for 遍历循环时的key值的报错

问题如下:

[Vue warn] Avoid using non-primitive value as key, use string/number value instead.

non-primitive表示的是对象

这里的[Vue warn]是指不要用对象或是数组作为key,用string或number作为key。


:key相当于是索引的作用,提高循环性能,如果循环量较小,不写也可以的。

猜你喜欢

转载自www.cnblogs.com/exmyth/p/9091062.html