| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <page-pagination :total="pagep.totalp" layout="total,first,prev,page,next,last,limit,jumper"></page-pagination> --> |
| | | </scroll-view> |
| | | <page-pagination style="position:absolute; zIndex: 9999 " :total="pagep.totalp" layout="total,first,prev,page,next,last,limit,jumper" @change="change" @sizeChange="sizeChange"></page-pagination> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | size: { |
| | | type: [Number, String], |
| | | default: 15 |
| | | default: 10 |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | pagep: { |
| | | totalp: 0, |
| | | pageSizep: 10, |
| | | currentPagep: 2 |
| | | }, |
| | | place:'请输入编号', |
| | | keyword:'', |
| | | topheight:55, |
| | |
| | | this.handleInit(); |
| | | }, |
| | | methods: { |
| | | change(currentPage, type) { // 当前页改变 |
| | | this.pagep.currentPagep = currentPage; |
| | | console.log("点击了" + type + ",当前页:" + currentPage); |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | this.waiting = true; |
| | | this.$emit('load', { page: this.pagep.currentPagep, size: this.pagep.pageSizep }, res => { |
| | | |
| | | setTimeout(function () { |
| | | uni.hideLoading(); |
| | | }, 1500); |
| | | this.waiting = false; |
| | | this.loadingMask = false; |
| | | this.list = res.list; |
| | | this.total = res.total; |
| | | this.pagep.totalp = res.total; |
| | | this.currentPage++; |
| | | this.handleComputeData(); |
| | | this.computedHeight(); |
| | | }); |
| | | }, |
| | | sizeChange(pageSize) { // 每页条数改变 |
| | | this.pagep.pageSizep = pageSize; |
| | | console.log("每页", pageSize, "条"); |
| | | }, |
| | | changeTotal() { // 更改总条数 |
| | | this.pagep.totalp = 555 |
| | | }, |
| | | changeCurrentPage() { // 更改当前页 |
| | | this.pagep.currentPagep = 3 |
| | | }, |
| | | // 数据加载 |
| | | loadData() { |
| | | this.waiting = true; |
| | |
| | | this.loadingMask = false; |
| | | this.list = res.list; |
| | | this.total = res.total; |
| | | this.pagep.totalp = res.total; |
| | | this.currentPage++; |
| | | this.handleComputeData(); |
| | | this.computedHeight(); |
| | |
| | | this.pullDownHeight = 0; |
| | | this.list = res.list; |
| | | this.total = res.total; |
| | | this.pagep.totalp = res.total; |
| | | this.currentPage++; |
| | | this.handleComputeData(); |
| | | this.computedHeight(); |
| | |
| | | this.pullDownHeight = 0; |
| | | this.list = res.list; |
| | | this.total = res.total; |
| | | this.pagep.totalp = res.total; |
| | | this.currentPage++; |
| | | this.handleComputeData(); |
| | | this.computedHeight(); |
| | |
| | | this.getRect('.data-list-components').then(res => { |
| | | |
| | | // #ifdef H5 |
| | | this.componentsHeight = `calc(100vh - ${res.top}px - var(--window-top))`; |
| | | this.componentsHeight = `calc(100vh - ${res.top-200}px - var(--window-top))`; |
| | | // #endif |
| | | // #ifndef H5 |
| | | this.componentsHeight = `${this.vuex_custom_index_height-100}px`; |
| | | this.componentsHeight = `${this.vuex_custom_index_height-168}px`; |
| | | // #endif |
| | | this.autoLoad = true; |
| | | this.$nextTick(() => { |