修改onShow
This commit is contained in:
1 parent
6bf2abfbe7
commit
5cc14ffe87
2 files changed
+16
-6
No files matched your search
@@ -40,14 +40,19 @@
|
||||
import { ref } from "vue"
|
||||
import { hooks, router } from "@/sheep"
|
||||
import { doorApi } from "@/sheep/api"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
|
||||
onLoad(() => {
|
||||
const app = getApp()
|
||||
app._initTabbar()
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")
|
||||
|
||||
|
||||
@@ -47,14 +47,19 @@
|
||||
import { ref } from "vue"
|
||||
import { hooks, router } from "@/sheep"
|
||||
import { doorApi } from "@/sheep/api"
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
|
||||
onLoad(() => {
|
||||
const app = getApp()
|
||||
app._initTabbar()
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")
|
||||
|
||||
|
||||
Reference in new issue
Block a user