uni-app项目根据后端返回数据改变元素背景色,使用ref获取不到dom
问题相关代码,请勿粘贴截图
if(data.msg.errcode === 0){
that.code = data.msg.position
}else if(data.msg.errcode === 40000){
that.code = data.msg.errmsg
that.$refs.r1.$el.style='background:blue'