code01
// 调用uni.createSelectorQuery方法
changeDom(){
uni.createSelectorQuery().selectAll(".copyMttext").fields({
size:true,
computedStyle:['line-height']
},res=>{
console.log(res);
res.forEach((item,i)=>{
let h = res[i]['line-height']
h = parseInt(h.substring(0,h.length-2))
console.log(h);
if(res[i].height > h * 3){
this.$set(this.check,i,true)
}else {
this.$set(this.check,i,false)
}
})
}).exec(()=>{
console.log('-----------')
})
},
0 个回复