task#6524 添加刷新按钮
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<van-pull-refresh v-model="isLoading" class="custom-pull-refresh" @refresh="onRefresh">
|
||||
<!-- <van-pull-refresh v-model="isLoading" class="custom-pull-refresh safe-pull-refresh" @refresh="onRefresh">-->
|
||||
<div class="main_wrap">
|
||||
<div class="top_bg" :class="{'dispatch' : type == 1 , 'driver' : type != 1}">
|
||||
<!-- <div class="title">报备中心</div>-->
|
||||
</div>
|
||||
<div class="service_wrap">
|
||||
<service-item :order-info="orderInfo"></service-item>
|
||||
<service-item :order-info="orderInfo" @refresh="onRefreshHandler"></service-item>
|
||||
</div>
|
||||
<div class="chat_list" ref="chatList">
|
||||
<div class="chat_list" ref="chatList" >
|
||||
<!--ai对话框 s -->
|
||||
<div v-for="(item, index) in recordList" :key="index">
|
||||
<template v-if="item.messageType == 4">
|
||||
@ -121,7 +121,7 @@
|
||||
/>
|
||||
</van-popup>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
<!-- </van-pull-refresh>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -179,16 +179,14 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRefresh() {
|
||||
onRefreshHandler() {
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
this.recordList = [];
|
||||
await this.getReportList();
|
||||
await this.getDetail();
|
||||
await this.getRecordList();
|
||||
setTimeout(async () => {
|
||||
await this.scrollToBottom();
|
||||
}, 1)
|
||||
|
||||
await this.scrollToBottom();
|
||||
} finally {
|
||||
this.isLoading = false; // 结束加载状态
|
||||
}
|
||||
@ -315,6 +313,7 @@
|
||||
background: #F9FCFF !important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.main_wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
Reference in New Issue
Block a user