Skip to content

Commit 7935462

Browse files
committed
Improve the way to set default value for the distance
1 parent c5e6f1d commit 7935462

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/InfiniteLoading.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@
6767
},
6868
},
6969
props: {
70-
distance: Number,
70+
distance: {
71+
type: Number,
72+
default: 100,
73+
},
7174
onInfinite: Function,
7275
spinner: String,
7376
},
7477
ready() {
75-
if (this.distance === undefined) {
76-
this.$set('distance', 100);
77-
}
78-
7978
this.scrollParent = getScrollParent(this.$el);
8079
8180
this.scrollHandler = function scrollHandlerOriginal() {

0 commit comments

Comments
 (0)