mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
fix: avoid using async in onMounted
This commit is contained in:
@@ -41,7 +41,7 @@ const updateBaseline = ref<string>('')
|
||||
const noMoreContent = ref<boolean>(false)
|
||||
const { handleReachBottom, handlePageRefresh, haveScrollbar } = useBewlyApp()
|
||||
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
initData()
|
||||
initPageAction()
|
||||
})
|
||||
|
||||
@@ -97,11 +97,11 @@ watch(() => settings.value.recommendationMode, () => {
|
||||
initData()
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
// Delay by 0.2 seconds to obtain the `settings.value.recommendationMode` value
|
||||
// otherwise the `settings.value.recommendationMode` value will be undefined
|
||||
// i have no idea to fix that...
|
||||
setTimeout(async () => {
|
||||
setTimeout(() => {
|
||||
initData()
|
||||
}, 200)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ const page = ref<number>(1)
|
||||
const noMoreContent = ref<boolean>(false)
|
||||
const { handleReachBottom, handlePageRefresh, haveScrollbar } = useBewlyApp()
|
||||
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
initData()
|
||||
initPageAction()
|
||||
})
|
||||
|
||||
@@ -39,7 +39,7 @@ const noMoreContent = ref<boolean>(false)
|
||||
const noMoreContentWarning = ref<boolean>(false)
|
||||
const { handleReachBottom, handlePageRefresh, haveScrollbar } = useBewlyApp()
|
||||
|
||||
onMounted(async () => {
|
||||
onMounted(() => {
|
||||
initData()
|
||||
initPageAction()
|
||||
})
|
||||
|
||||
@@ -35,8 +35,8 @@ const pn = ref<number>(1)
|
||||
const noMoreContent = ref<boolean>(false)
|
||||
const { handleReachBottom, handlePageRefresh, haveScrollbar } = useBewlyApp()
|
||||
|
||||
onMounted(async () => {
|
||||
await initData()
|
||||
onMounted(() => {
|
||||
initData()
|
||||
initPageAction()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user