新增下拉刷新
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, nextTick } from 'vue'
|
||||
import { onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { onReady, onShow, onPullDownRefresh } from '@dcloudio/uni-app'
|
||||
import TabsComponents from '@/components/tabs/tabs.vue'
|
||||
import NavBar from '@/components/navbar/navbar.vue'
|
||||
import { getTicketHallList } from '@/api/ticket.js'
|
||||
@@ -182,6 +182,10 @@ function getlist() {
|
||||
})
|
||||
.finally(() => {
|
||||
isLoading.value = false
|
||||
if (isRefresh) {
|
||||
uni.stopPullDownRefresh()
|
||||
isRefresh.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -254,6 +258,13 @@ function handleMain(id) {
|
||||
}
|
||||
}
|
||||
|
||||
// 是否正在下拉刷新
|
||||
let isRefresh = false
|
||||
onPullDownRefresh(() => {
|
||||
isRefresh = true
|
||||
init()
|
||||
})
|
||||
|
||||
/* 预览图片 */
|
||||
function handlePrivew(items, index) {
|
||||
if (items.length <= 0) return
|
||||
|
||||
Reference in New Issue
Block a user