import Vue from 'vue'
import {isEmpty} from 'lodash'


Vue.mixin({
	components: {
		
	},
	data() {
		return {
			refresher: false,
			tableList: [],
			page: 1,
			pageSize: 10,
			total: 0,
			loadStatus: 'nomore', //loading nomore loadmore
		}
	},
	methods: {
		//查询
		handleQuery() {
			this.page = 1
			this.tableList = []
			this.handleTableList();
		},
		// 获取列表
		async handleTableList() { 
		
		},
		// 下拉刷新
		handleRefresher() {
			
			if (this.refresher) return;
			this.refresher = true;
			this.page = 1
			this.tableList = []
			this.handleTableList();
		},
		// 滚动到底部
		handleScrollLower() {
			if (this.page * this.pageSize < this.total) {
				this.page += 1;
				this.handleTableList();
			} 
		},
		
	}
})
