内层想在v-for中,使用外层v-for的item值
会提示我错误:
- Property or method "item" is not defined on the instance but
referenced during render. Make sure that this property is reactive,
either in the data option, or for class-based components, by
initializing the property.
v-for
指令是形成了一个作用域的,你要访问v-for
渲染的数据,那么就必须要包含在里面,以下是我的一个建议代码,你可以修改结构如下: