提交 cc5697f7 编写于 作者: A AmyFoxFN

<update>(scroll): calculate min height when refresh

上级 ecebfee0
......@@ -147,9 +147,7 @@
if (!this.$refs.wrapper) {
return
}
if (this.$refs.listWrapper && (this.pullDownRefresh || this.pullUpLoad)) {
this.$refs.listWrapper.style.minHeight = `${getRect(this.$refs.wrapper).height + 1}px`
}
this._calculateMinHeight()
let options = Object.assign({}, DEFAULT_OPTIONS, {
scrollY: this.direction === DIRECTION_V,
......@@ -185,6 +183,7 @@
this.scroll && this.scroll.enable()
},
refresh() {
this._calculateMinHeight()
this.scroll && this.scroll.refresh()
},
destroy() {
......@@ -214,6 +213,11 @@
this.refresh()
}
},
_calculateMinHeight() {
if (this.$refs.listWrapper && (this.pullDownRefresh || this.pullUpLoad)) {
this.$refs.listWrapper.style.minHeight = `${getRect(this.$refs.wrapper).height + 1}px`
}
},
_initPullDownRefresh() {
this.scroll.on('pullingDown', () => {
this.beforePullDown = false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册