[Vue warn]: Property or method "index" 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. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <Label> at components/modules/label/label.vue
<Index> at components/moduleContainer/index.vue
pages/index/index.vue
编译出来的render
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
var m0 =
_vm.index === _vm.selectIndex
? _vm.getActiveNavStyle(_vm.moduleContent.style)
: null
var m1 =
_vm.moduleContent.style == 1 &&
_vm.index == _vm.selectIndex &&
_vm.index == _vm.selectIndex
? _vm.getActiveNavBorderStyle(_vm.moduleContent.style)
: null
_vm.$mp.data = Object.assign(
{},
{
$root: {
m0: m0,
m1: m1
}
}
)
}
问题描述 微信小程序v-for="(item, index) in items"循环的内部获取不到定义的item或index, 我手上的代码有大量这样的错误 相关代码片段
error
编译出来的render
复现步骤 [复现问题的步骤]
[或者可以直接贴源代码]
预期结果 实际结果
系统信息:
补充信息 我手上的版本0812, 在上一个版本是没问题的, 看到changelog有提到更改过for循环的相关代码, 是不是影响到了?