feat: 页面标题根据配置文件内容设置

页面标题根据配置文件内容设置
This commit is contained in:
Theo
2025-06-17 16:42:18 +08:00
parent 7abfa0ec4b
commit 7ea90f8276
4 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
# 应用端口
VITE_APP_PORT=3000
# 项目名称
VITE_APP_TITLE=vue3-element-admin
# 代理前缀
VITE_APP_BASE_API=/dev-api

View File

@@ -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

View File

@@ -9,7 +9,7 @@
name="keywords"
content="vue,element-plus,typescript,vue-element-admin,vue3-element-admin"
/>
<title>vue3-element-admin</title>
<title>%VITE_APP_TITLE%</title>
</head>
<body>

2
src/types/env.d.ts vendored
View File

@@ -4,6 +4,8 @@
interface ImportMetaEnv {
/** 应用端口 */
VITE_APP_PORT: number;
/** 应用名称 */
VITE_APP_NAME: string;
/** API 基础路径(代理前缀) */
VITE_APP_BASE_API: string;
/** API 地址 */