From ab9aab7beb67219373dc8a6945dcb9c3fa6a5695 Mon Sep 17 00:00:00 2001 From: CHE LIANG ZHAO Date: Mon, 26 Jan 2026 16:22:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E5=AF=BC=E5=85=A5=20Vite=20serving=20allow=20list=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/lib/version.ts | 3 +++ web/src/routes/+layout.svelte | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 web/src/lib/version.ts diff --git a/web/src/lib/version.ts b/web/src/lib/version.ts new file mode 100644 index 0000000..1196837 --- /dev/null +++ b/web/src/lib/version.ts @@ -0,0 +1,3 @@ +// 版本号配置 +// 更新版本时需要手动修改此文件 +export const VERSION = '1.3.0'; diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index f12f5ce..8927faa 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -27,8 +27,8 @@ import Sparkles from '@lucide/svelte/icons/sparkles'; import Info from '@lucide/svelte/icons/info'; - // 从 package.json 导入版本号 - import pkg from '../../package.json'; + // 版本号 + import { VERSION } from '$lib/version'; // Theme import { @@ -248,7 +248,7 @@ title="查看更新日志" > - v{pkg.version} + v{VERSION} {/snippet}