优化目录
This commit is contained in:
1 parent
4e343cccf1
commit
2b18fe9991
46 files changed
+1061
-1308
No files matched your search
+24
-1
@@ -1,7 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useTabStore } from '@/pinia/tab'
|
||||
import HomeEntryView from '@/components/views/HomeEntryView.vue'
|
||||
import Tab from '@/layout/tab.vue'
|
||||
import { waitForHydration } from '@/pinia/Plugin/indexdb'
|
||||
|
||||
const tabStore = useTabStore()
|
||||
const isReady = ref(false)
|
||||
|
||||
const showHomeEntry = computed(() => !tabStore.hasCompletedSetup)
|
||||
|
||||
const handleImportComplete = () => {
|
||||
tabStore.hasCompletedSetup = true
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('home-import-selected', handleImportComplete)
|
||||
waitForHydration('tabs').then(() => {
|
||||
isReady.value = true
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Tab />
|
||||
<template v-if="isReady">
|
||||
<HomeEntryView v-if="showHomeEntry" />
|
||||
<Tab v-else />
|
||||
</template>
|
||||
</template>
|
||||
Reference in new issue
Block a user