记录Vue2的computed属性的一处疑惑
直接上代码,我这个cur属性是依赖list和kindcomputed: { cur(){ return this.list[this.kind]; } },其中,data中初始化list是空对象,kind为空字符串,那么发送请求后数据存储在resArr中,通过module将list变成对象数组for(let i = 0; i < resArr.length; i++){ if(this.list[resArr[i].module]){
原创
2022-01-29 16:28:16 ·
1258 阅读 ·
0 评论