[Bug Report] View-box的scrollTo方法不起作用
- 主要語言
- Vue
- 星號
- 17.5k
- 分支
- 3.6k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### VUX version
2.9.2
### OS/Browsers version
任何系统
### Vue version
2.5.17
### Code
```html
```
```js
watch: {
remarkLoading() {
if (!this.remarkLoading) {
if (this.showRemarks$.length > 0) {
this.$refs.viewBox && this.$nextTick(() => {
console.log('滚动到', this.$refs.viewBox.getScrollBody().scrollHeight);
let _tmp = setTimeout(() =>{
this.$refs.viewBox.scrollTo(this.$refs.viewBox.getScrollBody().scrollHeight);
console.log('实际滚动到了', this.$refs.viewBox.getScrollTop());
}, 500);
});
} else {
this.$refs.viewBox && this.$nextTick(() => {
console.log('滚动到', 0);
let _tmp = setTimeout(() =>{
this.$refs.viewBox.scrollTo(0);
console.log('实际滚动到了', this.$refs.viewBox.getScrollTop());
}, 500);
});
}
}
}
},
```
### Steps to reproduce
-> 进入页面
-> fetch数据
-> 将remarkLoading赋值为false
-> 查看页面用于viewBox内部的v-for渲染的showRemarks$是否为空
### What is Expected?
-> showRemarks$为空则跳转到顶部
-> showRemarks$不为空则跳转到页面底部
### What is actually happening?
-> 上述scrollTo均未生效
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。