mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
[Improvement] List: add check method (#1590)
This commit is contained in:
@@ -41,7 +41,7 @@ export default create({
|
||||
this.handler(true);
|
||||
|
||||
if (this.immediateCheck) {
|
||||
this.$nextTick(this.onScroll);
|
||||
this.$nextTick(this.check);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -59,16 +59,16 @@ export default create({
|
||||
|
||||
watch: {
|
||||
loading() {
|
||||
this.$nextTick(this.onScroll);
|
||||
this.$nextTick(this.check);
|
||||
},
|
||||
|
||||
finished() {
|
||||
this.$nextTick(this.onScroll);
|
||||
this.$nextTick(this.check);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onScroll() {
|
||||
check() {
|
||||
if (this.loading || this.finished) {
|
||||
return;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ export default create({
|
||||
/* istanbul ignore else */
|
||||
if (this.binded !== bind) {
|
||||
this.binded = bind;
|
||||
(bind ? on : off)(this.scroller, 'scroll', this.onScroll);
|
||||
(bind ? on : off)(this.scroller, 'scroll', this.check);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user