提交 1af62e5a 编写于 作者: D dolymood

Merge branch 'dev' of github.com:didi/cube-ui into dev

......@@ -261,6 +261,9 @@
dirty && this.refresh()
}
},
resetPullUpTxt() {
this.pullUpDirty = true
},
_calculateMinHeight() {
if (this.$refs.listWrapper) {
this.$refs.listWrapper.style.minHeight = this.pullDownRefresh || this.pullUpLoad ? `${getRect(this.$refs.wrapper).height + 1}px` : 0
......
......@@ -168,7 +168,12 @@ describe('Scroll', () => {
props: {
data,
options: {
pullUpLoad: true
pullUpLoad: {
txt: {
more: 'more',
noMore: 'noMore'
}
}
}
},
on: {
......@@ -199,11 +204,21 @@ describe('Scroll', () => {
// test: forceUpdate
vm.forceUpdate()
setTimeout(() => {
expect(vm.isPullUpLoad).to.be.false
expect(vm.pullUpDirty).to.be.false
done()
const pullUpTxtElm = vm.$el.querySelector('.cube-pullup-wrapper span')
expect(pullUpTxtElm.textContent).to.equal('noMore')
// test: resetPullUpTxt
vm.resetPullUpTxt()
vm.$nextTick(() => {
expect(pullUpTxtElm.textContent).to.equal('more')
done()
})
}, 50)
}, 400)
}, 150)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册