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