diff --git a/.env.development b/.env.development index 55b854a1..8dbca7fd 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,7 @@ # 应用端口 VITE_APP_PORT=3000 - +# 项目名称 +VITE_APP_TITLE=vue3-element-admin # 代理前缀 VITE_APP_BASE_API=/dev-api diff --git a/.env.production b/.env.production index 17729b65..cf3bf9a2 100644 --- a/.env.production +++ b/.env.production @@ -1,6 +1,6 @@ # 代理前缀 VITE_APP_BASE_API = '/prod-api' - - +# 项目名称 +VITE_APP_TITLE=vue3-element-admin # WebSocket端点(可选) #VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws diff --git a/index.html b/index.html index 1c086a72..b20eb78e 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ name="keywords" content="vue,element-plus,typescript,vue-element-admin,vue3-element-admin" /> - vue3-element-admin + %VITE_APP_TITLE% diff --git a/src/types/env.d.ts b/src/types/env.d.ts index 301f03ea..1342f61e 100644 --- a/src/types/env.d.ts +++ b/src/types/env.d.ts @@ -4,6 +4,8 @@ interface ImportMetaEnv { /** 应用端口 */ VITE_APP_PORT: number; + /** 应用名称 */ + VITE_APP_NAME: string; /** API 基础路径(代理前缀) */ VITE_APP_BASE_API: string; /** API 地址 */