| | |
| | | <text |
| | | class="c-infinite-empty" |
| | | v-else |
| | | >暂无数据...</text> |
| | | >(暂无数据)</text> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | // 没有数据 |
| | | if (!options.pageTotal || options.pageTotal <= 0) { |
| | | this.ending = true; |
| | | this.pageTotal = 0; |
| | | } |
| | | // 有数据 |
| | | else { |
| | |
| | | // 加载失败 |
| | | fail: () => { |
| | | this.loading = false; |
| | | this.ending = true; |
| | | this.pageTotal = 0; |
| | | // 如果下拉刷新,还原下拉 |
| | | if (this.touch.dargState === 2) { |
| | | this.touch.driftTop = 0; |
| | |
| | | this.hanldeLoadMore(); |
| | | }, |
| | | // 刷新加载 |
| | | $refresh() { |
| | | $refresh(autoStart) { |
| | | Taro.pageScrollTo({ |
| | | selector: '#' + this.elmId, |
| | | scrollTop: 0, |
| | | }); |
| | | this.ending = false; |
| | | this.current = 0; |
| | | this.hanldeLoadMore(); |
| | | if (autoStart === 'off') { |
| | | this.inital = false; |
| | | } else { |
| | | this.hanldeLoadMore(); |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |