<template>
	<view>
		<view class="margin-bottom-lg margin-top-sm">
			<view v-if="hasMoreData" class="text-center bg-main-color light padding-tb-sm">
				<text class="margin-right-xs">查看更多</text>
				<text class="text-bold cuIcon-unfold"></text>
			</view>
			<view class="cu-load" :class="loadMoreStatus"></view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'load-status-bar',
		data() {
			return {
				loadMoreStatus: '',
				hasMoreData: true
			}
		},
		methods: {
			showLoading() {
				this.loadMoreStatus = 'loading bg-main-color light';
				this.hasMoreData = false;
			},
			showLoadMore() {
				this.loadMoreStatus = '';
				this.hasMoreData = true;
			},
			showLoadOver() {
				this.loadMoreStatus = 'over bg-grey';
				this.hasMoreData = false;
			},
			showLoadErr() {
				this.loadMoreStatus = 'erro bg-red';
				this.hasMoreData = false;
			}
		},
	}
</script>

<style>
</style>
