src/views/error/404.vue
@@ -23,6 +23,7 @@ </template> <script setup lang="ts" name="notFound"> import { onMounted } from 'vue'; import { useRouter } from 'vue-router'; // 定义变量内容 @@ -32,6 +33,10 @@ const onGoHome = () => { router.push('/'); }; onMounted(()=>{ }) const currentRoute = router.currentRoute.value </script> <style scoped lang="scss">