| | |
| | | }, |
| | | methods: { |
| | | handleChange(files, operationType, index) { |
| | | if (operationType === 'add') { |
| | | } |
| | | const value = []; |
| | | files.forEach((file) => { |
| | | if (file.type === 'btn') { |
| | |
| | | @scroll="evt=>onScroll(evt)" |
| | | > |
| | | <slot /> |
| | | <view class="bottom"> |
| | | <view v-if="loading">加载中,请稍后...</view> |
| | | <view class="c-infinite-bottom"> |
| | | <view |
| | | class="loading" |
| | | v-if="loading" |
| | | >加载中,请稍后...</view> |
| | | <view v-if="ending"> |
| | | <text v-if="pageTatal > 0">-- 没有更多了 --</text> |
| | | <text |
| | | class="ended" |
| | | v-if="pageTotal > 0" |
| | | >-- 没有更多了 --</text> |
| | | <text |
| | | class="empty" |
| | | v-else |
| | |
| | | next: this.current + 1, |
| | | // 加载成功 |
| | | success: (options) => { |
| | | setTimeout(() => { |
| | | this.loading = false; |
| | | // 没有数据 |
| | | if (!options.pageTotal || options.pageTotal <= 0) { |
| | | this.ending = true; |
| | |
| | | this.ending = true; |
| | | } |
| | | } |
| | | setTimeout(() => { |
| | | this.loading = false; |
| | | }, 100); |
| | | }, |
| | | // 加载失败 |
| | |
| | | @import "../../common/sassMixin"; |
| | | |
| | | .c-infinite-scroll { |
| | | .bottom { |
| | | height: 1.8rem; |
| | | .c-infinite-bottom { |
| | | text-align: center; |
| | | line-height: 1.5rem; |
| | | .loading { |
| | | height: 2rem; |
| | | color: #666; |
| | | line-height: 1.8rem; |
| | | } |
| | | .ended { |
| | | height: 2rem; |
| | | color: #999; |
| | | line-height: 1.8rem; |
| | | } |
| | | .empty { |
| | | line-height: 5rem; |
| | | color: #999; |