标签:must statement headers let dash color lte class 修改
c1——
遍历json的key...value的时候报错:
[tslint] for (... in ...) statements must be filtered with an if statement
原代码:
for (let key in this.targetList[0]) { this.tableHeaders.push({ value: key, name: key }) }
修改为:
for (const key of Object.keys(this.targetList[0])) {
this.tableHeaders.push({ value: key, name: key })
}
OK!
原理解析:
标签:must statement headers let dash color lte class 修改
原文地址:https://www.cnblogs.com/Zhang-jin/p/10411395.html