JS选择带点的内容

if(key == '电导率1'){
    p.format = (row) =>{ return parseInt(row.ddl1) }
}
if(key == 'PM2.5'){
    p.format = (row) =>{ return parseInt(row["PM2.5"]) }
}

错误写法 : row.PM2.5

正确写法 : row.["val"]

猜你喜欢

转载自blog.csdn.net/weixin_46607967/article/details/126537025