记录安卓下滚动不支持document.documentElement的问题
documentElement在安卓手机下不支持,所以需要使用document.body.scrollTop
handleScroll() {
let el = document.documentElement, body = document.body;
let scroTop = el.scrollTop || body.scrollTop;
let oHeight = this.$parent.getHeight();
this.distanceAll = oHeight + this.$refs.describe.offsetHeight;
if (scroTop >= this.distanceAll) {
this.isFixed = true;
} else {
this.isFixed = false;
}
}

浙公网安备 33010602011771号