This commit is contained in:
MTrun
2021-12-10 14:11:49 +08:00
commit 535104447b
72 changed files with 5576 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
<template>
<n-empty description="你什么也找不到">
<template #extra>
<n-button size="small" @click="goHome">看看别的</n-button>
</template>
</n-empty>
</template>
<script lang="ts" setup>
import { onBeforeMount } from 'vue'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const goHome = () => {
router.replace({ path: '/' })
}
// onBeforeMount(() => {
// const { params, query } = route
// const { path } = params
// router.replace({
// path: '/' + (Array.isArray(path) ? path.join('/') : path),
// query
// })
// })
</script>