mirror of
https://gitee.com/dromara/go-view.git
synced 2026-05-12 00:00:01 +08:00
init
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user