-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
状态变量与map组合使用编译出错 #318
Labels
bug
Something isn't working
Comments
遇到了同样的问题~ |
Closed
This was referenced Jun 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
复现步骤
在组件里面,状态变量与map组合使用时,编译出来后,结果不正确:
this.state.list[activeIndex].list
->var stateName = "list[activeIndex]";
这样编译后,并没有对 list 赋值
期望行为
在_createData里面,需要对 this.state.list[activeIndex].list 进行动态封装
报错信息
这里 stateName 不对,应该是动态进行赋值
系统信息
补充信息
[可选]
如果把上面注释的代码(多余的),解注释,编译结果是正确的
The text was updated successfully, but these errors were encountered: