提交 505491eb 编写于 作者: guangjun.yang's avatar guangjun.yang

滚动测试等

上级 6f5c69f7
...@@ -8,7 +8,7 @@ Vue.directive('loadmore', { ...@@ -8,7 +8,7 @@ Vue.directive('loadmore', {
let flag = true, timeoutId = null; let flag = true, timeoutId = null;
SELECTWRAP_DOM.addEventListener('scroll', function () { SELECTWRAP_DOM.addEventListener('scroll', function () {
// console.log(this.scrollHeight, this.scrollTop, this.clientHeight); // console.log(this.scrollHeight, this.scrollTop, this.clientHeight);
const CONDITION = this.scrollTop <= 20; const CONDITION = this.scrollTop == 0;
if (CONDITION) { if (CONDITION) {
if(flag) { if(flag) {
flag = false; flag = false;
......
...@@ -566,7 +566,7 @@ export default { ...@@ -566,7 +566,7 @@ export default {
this.messageList.unshift(...cMessageList); this.messageList.unshift(...cMessageList);
this.$nextTick(() => { this.$nextTick(() => {
const scrollBoxDom = document.querySelector(".scroll-box"); const scrollBoxDom = document.querySelector(".scroll-box");
scrollBoxDom.scrollTop = 50; scrollBoxDom.scrollTop = 1000;
}); });
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册