[bugfix] PullRefresh: ensure value change can be watched (#3719)

This commit is contained in:
neverland
2019-07-02 14:04:55 +08:00
committed by GitHub
parent 5d5bc878d0
commit 5b4a4cc078
2 changed files with 11 additions and 3 deletions

View File

@@ -99,10 +99,15 @@ export default createComponent({
onTouchEnd() {
if (!this.untouchable && this.ceiling && this.deltaY) {
this.duration = this.animationDuration;
if (this.status === 'loosing') {
this.setStatus(this.headHeight, true);
this.$emit('input', true);
this.$emit('refresh');
// ensure value change can be watched
this.$nextTick(() => {
this.$emit('refresh');
});
} else {
this.setStatus(0);
}