From 0244883e147b94dcb735a9ce73343fad0f48042e Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 11 Feb 2026 11:23:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(docs):=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89404=E9=A1=B5=E9=9D=A2=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 创建 NotFound.vue 组件实现404页面功能 - 在主题配置中注册并集成自定义404页面 - 实现中英文双语支持和自动重定向功能 - 添加倒计时自动跳转到首页的功能 - 设计美观的404错误页面样式和布局 - 提供相关文档页面链接建议和返回首页按钮 --- docs/.vitepress/theme/NotFound.vue | 167 +++++++++++++++++++++++++++++ docs/.vitepress/theme/index.ts | 2 + 2 files changed, 169 insertions(+) create mode 100644 docs/.vitepress/theme/NotFound.vue diff --git a/docs/.vitepress/theme/NotFound.vue b/docs/.vitepress/theme/NotFound.vue new file mode 100644 index 0000000..46c6711 --- /dev/null +++ b/docs/.vitepress/theme/NotFound.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index def4cfc..68dde8e 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -3,12 +3,14 @@ import { h } from 'vue' import type { Theme } from 'vitepress' import DefaultTheme from 'vitepress/theme' import './style.css' +import NotFound from './NotFound.vue' export default { extends: DefaultTheme, Layout: () => { return h(DefaultTheme.Layout, null, { // https://vitepress.dev/guide/extending-default-theme#layout-slots + "not-found": () => h(NotFound) }) }, enhanceApp({ app, router, siteData }) {