培训文档加刷新

This commit is contained in:
2023-08-28 11:29:54 +08:00
parent 608f2224c4
commit a487d9b894
2 changed files with 32 additions and 23 deletions

View File

@ -23,6 +23,7 @@
</div>
<div class="contentWrap" v-show="!showEmpty">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<div class="itemWrap" v-for="(item,index) in pageList" :key="index">
<div class="info flexBetween common">
<div class="title">{{ item.pushUser }}</div>
@ -41,7 +42,9 @@
</div>
</div>
</div>
</div>
</van-pull-refresh>
</div>
<div class="empty" style="display: flex;justify-content: center;align-items: center;height:calc(100% - 46px);background-color: #FAFAFA" v-show="showEmpty">
<img src="@/assets/empty.png" style="width: 100%"/>
</div>
@ -63,7 +66,8 @@ export default {
pageList:[],
keyword:'',
show:false,
showEmpty:false
showEmpty:false,
isLoading:false
}
},
mounted() {
@ -73,6 +77,13 @@ export default {
// handleEnterKey() {
// this.getList()
// },
onRefresh() {
this.getList()
setTimeout(() => {
this.$toast('刷新成功');
this.isLoading = false;
}, 1000);
},
async getList(){
let res= await pageList({
pageNum:this.pageNum,
@ -119,6 +130,7 @@ export default {
padding: 0 8px;
width: 100%;
box-sizing: border-box;
margin-top: 20px;
.itemWrap{
margin-bottom: 16px;
@include wh(100%, 300px);

View File

@ -34,7 +34,7 @@
</div>
</div>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="height: 100%" v-show="!show">
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" v-show="!show">
<div >
<div class="content_wrap" v-for="(item,index) in orderList" :key="index">
<div class="codeTxt common">
@ -242,16 +242,13 @@ export default {
padding: 10px 0 15px 0;
color: #737373;
opacity: .7;
div {
padding-top: 8px;
}
.active {
color: #3678FF;
position: relative;
}
.active:after {
content: '';
display: block;