File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" infinite-loading-container" >
3
- <i class =" loading-default " v-show =" isLoading" ></i >
3
+ <i : class =" spinnerType " v-show =" isLoading" ></i >
4
4
<div class =" infinite-status-prompt" v-show =" !isLoading && isNoResults" >
5
5
<slot name =" no-results" >No results :(</slot >
6
6
</div >
10
10
</div >
11
11
</template >
12
12
<script >
13
+ const spinnerMapping = {
14
+ bubbles: ' loading-bubbles' ,
15
+ circles: ' loading-circles' ,
16
+ default: ' loading-default' ,
17
+ spiral: ' loading-spiral' ,
18
+ waveDots: ' loading-wave-dots' ,
19
+ };
20
+
13
21
/**
14
22
* get the first scroll parent of an element
15
23
* @param {DOM} elm the element which find scorll parent
51
59
isNoMore: false ,
52
60
};
53
61
},
62
+ computed: {
63
+ spinnerType () {
64
+ return spinnerMapping[this .spinner ] || spinnerMapping .default ;
65
+ },
66
+ },
54
67
props: {
55
68
distance: Number ,
56
69
onInfinite: Function ,
70
+ spinner: String ,
57
71
},
58
72
ready () {
59
73
if (this .distance === undefined ) {
You can’t perform that action at this time.
0 commit comments