data() {
return {
arr: [1, 2, 3]
}
},
computed: {
sum()
mpvue中computed属性里的for循环走坑
最新推荐文章于 2024-03-08 12:12:16 发布
在mpvue的小程序开发中,遇到computed属性内使用for (i in this.arr)循环导致s返回0的问题。改为for(v in this.arr)后恢复正常。疑似mpvue编译时内部i变量与computed存在冲突。
摘要由CSDN通过智能技术生成