這看起來有點(diǎn)繁瑣,可以簡(jiǎn)化也行,新手,謝謝大佬,感謝getChartsData(this.rule).then(res=>{letobj=res.data.data[0];this.compRegion.lineCode=obj.lineCode;this.compRegion.lineCodeName=obj.lineCodeName;this.compRegion.timeRate=obj.timeRate;this.compRegion.performanceRate=obj.performanceRate;this.compRegion.percentRate=obj.percentRate;this.compRegion.deviceRate=obj.deviceRate;this.compRegion.deviceOee=obj.deviceOee;this.compRegion.deviceTeep=obj.deviceTeep;this.compRegion.startRate=obj.startRate;this.compRegion.planRate=obj.planRate;});
大佬們遇到過這個(gè)問題嗎?js怎么遍歷給對(duì)象賦值
慕森王
2019-10-25 23:14:40