| | |
| | | :style="[dataListStyle]" |
| | | @touchmove.stop.prevent |
| | | > |
| | | <u-search class="searchbg" shape="true" bg-color="rgba(255, 255, 255, 0.5)" placeholder="请输入名称" :show-action="false" v-model="keyword" @search="searchxinxi" |
| | | <u-search class="searchbg" shape="true" bg-color="rgba(255, 255, 255, 0.5)" :placeholder="place" :show-action="false" v-model="keyword" @search="searchxinxi" |
| | | :style="{top: topheight+'px',position: 'absolute',width: width,right: '5%'}"></u-search> |
| | | <scroll-view |
| | | class="scroll-view" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | place:'请输入编号', |
| | | keyword:'', |
| | | topheight:55, |
| | | list: [], // 数据列表 |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.width=='90%') { |
| | | this.place = '请输入名称' |
| | | }else{ |
| | | this.place = '请输入编号' |
| | | } |
| | | this.topheight=this.vuex_custom_bar_height+15 |
| | | this.handleInit(); |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | // 刷新数据 |
| | | searchxinxi() { |
| | | console.log(555555555); |
| | | searchxinxi() { |
| | | const params = { |
| | | current: this.page, |
| | | size: this.size, |
| | |
| | | this.currentPage = this.page; |
| | | this.currentSize = this.size; |
| | | this.$emit('refresh', { page: this.currentPage, size: this.currentSize, objectid:this.keyword}, res => { |
| | | console.log(res.list); |
| | | |
| | | this.autoLoad = true; |
| | | this.pullingDown = false; |
| | | this.pullDownHeight = 0; |
| | |
| | | // 计算高度 |
| | | computedHeight() { |
| | | this.getRect('.data-list-components').then(res => { |
| | | console.log(res); |
| | | |
| | | // #ifdef H5 |
| | | this.componentsHeight = `calc(100vh - ${res.top}px - var(--window-top))`; |
| | | // #endif |
| | |
| | | this.handleAutoLoadData(); |
| | | }); |
| | | }); |
| | | console.log(444444444); |
| | | console.log(this.componentsHeight); |
| | | }, |
| | | // 自动加载数据 |
| | | async handleAutoLoadData() { |
| | |
| | | const components = await this.getRect('.data-list-components'); |
| | | const scrolList = await this.getRect('.scroll-list'); |
| | | if (scrolList.height <= components.height) { |
| | | |
| | | this.loadData(); |
| | | } else { |
| | | this.autoLoad = false; |