fix: 修复代码报错
parent
035dd77dd4
commit
039dee4f1d
|
@ -840,12 +840,14 @@
|
||||||
// }
|
// }
|
||||||
query.select(idView).boundingClientRect();
|
query.select(idView).boundingClientRect();
|
||||||
query.exec(function(res) {
|
query.exec(function(res) {
|
||||||
var top = res[0].top;
|
if(Array.isArray(res) && res.length > 0 && res[0]){
|
||||||
var height = res[0].height;
|
var top = res[0].top;
|
||||||
topArr.push(top);
|
var height = res[0].height;
|
||||||
heightArr.push(height);
|
topArr.push(top);
|
||||||
that.$set(that, 'topArr', topArr);
|
heightArr.push(height);
|
||||||
that.$set(that, 'heightArr', heightArr);
|
that.$set(that, 'topArr', topArr);
|
||||||
|
that.$set(that, 'heightArr', heightArr);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue