From 6018817906dd6c0863588721fb23a58a42507e52 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Sat, 12 Apr 2025 10:20:12 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20version=E5=8A=A8=E6=80=81=E8=8E=B7?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/router/routes/local.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web-antd/src/router/routes/local.ts b/apps/web-antd/src/router/routes/local.ts index 6a0f4c29..fcde9398 100644 --- a/apps/web-antd/src/router/routes/local.ts +++ b/apps/web-antd/src/router/routes/local.ts @@ -2,6 +2,11 @@ import type { RouteRecordStringComponent } from '@vben/types'; import { $t } from '@vben/locales'; +const { + version, + // vite inject-metadata 插件注入的全局变量 +} = __VBEN_ADMIN_METADATA__ || {}; + /** * 该文件放非后台返回的路由 比如个人中心 等需要跳转显示的页面 */ @@ -134,8 +139,8 @@ export const localMenuList: RouteRecordStringComponent[] = [ icon: 'lucide:book-open-text', keepAlive: true, title: '更新记录', - badge: '1.3.0', - badgeVariants: '#CC0033', + badge: `当前: ${version}`, + badgeVariants: 'bg-primary', }, }, ],