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 11<template >
22 <div class =" infinite-loading-container" >
3- <i class =" loading-default " v-show =" isLoading" ></i >
3+ <i : class =" spinnerType " v-show =" isLoading" ></i >
44 <div class =" infinite-status-prompt" v-show =" !isLoading && isNoResults" >
55 <slot name =" no-results" >No results :(</slot >
66 </div >
1010 </div >
1111</template >
1212<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+
1321 /**
1422 * get the first scroll parent of an element
1523 * @param {DOM} elm the element which find scorll parent
5159 isNoMore: false ,
5260 };
5361 },
62+ computed: {
63+ spinnerType () {
64+ return spinnerMapping[this .spinner ] || spinnerMapping .default ;
65+ },
66+ },
5467 props: {
5568 distance: Number ,
5669 onInfinite: Function ,
70+ spinner: String ,
5771 },
5872 ready () {
5973 if (this .distance === undefined ) {
You can’t perform that action at this time.
0 commit comments