mirror of https://github.com/mashirozx/sakura.git
26 lines
506 B
Vue
26 lines
506 B
Vue
<template>
|
|
<router-view v-slot="{ Component }">
|
|
<keep-alive>
|
|
<component :is="Component" :key="$route.fullPath"></component>
|
|
</keep-alive>
|
|
</router-view>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue'
|
|
import { init } from '@/store'
|
|
import { useInjector } from '@/hooks'
|
|
|
|
export default defineComponent({
|
|
name: 'App',
|
|
setup() {
|
|
const { fetchWpJson } = useInjector(init)
|
|
fetchWpJson()
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@use '@/styles/index';
|
|
</style>
|