diff --git a/frontend/.env.development b/frontend/.env.development index d8e6cab..61476a8 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,8 +1,16 @@ +### + # @Author: 13895237362 2205451508@qq.com + # @Date: 2025-07-31 14:30:20 + # @LastEditors: 13895237362 2205451508@qq.com + # @LastEditTime: 2025-08-08 09:18:54 + # @FilePath: /frontend/.env.development + # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +### # 开发环境 NODE_ENV = "development" # 开发环境接口地址 -VITE_API_BASE_URL = '/devApi' +VITE_API_BASE_URL = '' # # 开发环境打包名称 # VITE_OUTDIR='dev' diff --git a/frontend/.env.production b/frontend/.env.production index 8c037a2..b52150f 100644 --- a/frontend/.env.production +++ b/frontend/.env.production @@ -2,7 +2,7 @@ NODE_ENV = "production" # 正式环境接口地址 -VITE_API_BASE_URL = '/proApi' +VITE_API_BASE_URL = '' # 正式环境打包名称 VITE_OUTDIR='production' diff --git a/frontend/.env.test b/frontend/.env.test index bf9ae70..7c38831 100644 --- a/frontend/.env.test +++ b/frontend/.env.test @@ -1,8 +1,16 @@ +### + # @Author: 13895237362 2205451508@qq.com + # @Date: 2025-07-31 14:30:20 + # @LastEditors: 13895237362 2205451508@qq.com + # @LastEditTime: 2025-08-08 10:07:33 + # @FilePath: /frontend/.env.test + # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE +### # 测试环境 NODE_ENV = "test" # 测试环境接口地址 -VITE_API_BASE_URL = '/testApi' +VITE_API_BASE_URL = '' # 测试环境打包名称 VITE_OUTDIR='test' diff --git a/frontend/package-lock.json b/frontend/package-lock.json index fa0fb77..8d9e8ab 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,7 @@ "name": "vue3_vite", "version": "0.0.0", "dependencies": { + "@element-plus/icons-vue": "^2.3.2", "amfe-flexible": "^2.2.1", "axios": "^1.3.6", "element-plus": "^2.10.5", @@ -85,9 +86,9 @@ } }, "node_modules/@element-plus/icons-vue": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", - "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.2.tgz", + "integrity": "sha512-OzIuTaIfC8QXEPmJvB4Y4kw34rSXdCJzxcD1kFStBvr8bK6X1zQAYDo0CNMjojnfTqRQCJ0I7prlErcoRiET2A==", "license": "MIT", "peerDependencies": { "vue": "^3.2.0" diff --git a/frontend/package.json b/frontend/package.json index bf364c6..2e9de31 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,6 +10,7 @@ "preview": "vite preview" }, "dependencies": { + "@element-plus/icons-vue": "^2.3.2", "amfe-flexible": "^2.2.1", "axios": "^1.3.6", "element-plus": "^2.10.5", diff --git a/frontend/src/assets/images/login-background-m.png b/frontend/src/assets/images/login-background-m.png new file mode 100644 index 0000000..5c9733d Binary files /dev/null and b/frontend/src/assets/images/login-background-m.png differ diff --git a/frontend/src/assets/images/login-background.png b/frontend/src/assets/images/login-background.png index 3362a32..79a3e8f 100644 Binary files a/frontend/src/assets/images/login-background.png and b/frontend/src/assets/images/login-background.png differ diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index bff2a4d..1f98d98 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -2,7 +2,7 @@ "login": { "title": "Authorization Management Platform", "subtitle": "Sign in to your account", - "usernamePlaceholder": "Username", + "usernamePlaceholder": "Please enter Username", "passwordPlaceholder": "Enter password", "remember": "Remember password", "forgotPassword": "Forgot password?", diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.json index 0427af4..f8c6492 100644 --- a/frontend/src/i18n/locales/ja.json +++ b/frontend/src/i18n/locales/ja.json @@ -2,7 +2,7 @@ "login": { "title": "権限管理プラットフォーム", "subtitle": "アカウントにログイン", - "usernamePlaceholder": "ユーザー名", + "usernamePlaceholder": "ユーザー名を入力してください", "passwordPlaceholder": "パスワードを入力してください", "remember": "パスワードを記憶する", "forgotPassword": "パスワードをお忘れですか?", diff --git a/frontend/src/i18n/locales/zh.json b/frontend/src/i18n/locales/zh.json index 6f24bd6..aa6a2ec 100644 --- a/frontend/src/i18n/locales/zh.json +++ b/frontend/src/i18n/locales/zh.json @@ -2,7 +2,7 @@ "login": { "title": "授权管理平台", "subtitle": "登录您的账户", - "usernamePlaceholder": "用户名", + "usernamePlaceholder": "请输入用户名", "passwordPlaceholder": "请输入密码", "remember": "记住密码", "forgotPassword": "忘记密码?", diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 1d5c4fd..1e8c7f7 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -15,11 +15,17 @@ import './assets/styles/global.css' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' +import * as ElementPlusIconsVue from '@element-plus/icons-vue' import i18n, { getCurrentElementLocale } from './i18n' const app = createApp(App) +// 全局注册Element Plus图标 +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} + // 正确配置Element Plus语言包 app.use(ElementPlus, { locale: getCurrentElementLocale() diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 0315c93..e075452 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -2,7 +2,7 @@ * @Author: 13895237362 2205451508@qq.com * @Date: 2025-08-01 09:32:42 * @LastEditors: 13895237362 2205451508@qq.com - * @LastEditTime: 2025-08-06 16:40:56 + * @LastEditTime: 2025-08-08 11:03:44 * @FilePath: /frontend/src/router/index.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -22,7 +22,8 @@ const routes: Array = [ { path: "/dashboard", component: () => import("@/views/Dashboard.vue"), - meta: { title: "仪表板", requiresAuth: true } + // meta: { title: "仪表板", requiresAuth: true } + meta: { title: "仪表板"} }, ]; diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index c154060..0678d3b 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -1,53 +1,42 @@ + - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/views/Login.vue b/frontend/src/views/Login.vue index da9b234..19478e6 100644 --- a/frontend/src/views/Login.vue +++ b/frontend/src/views/Login.vue @@ -29,10 +29,9 @@
@@ -306,11 +305,7 @@ async function handleLogin() { } .login-card { - border: none; - border-radius: 20px; - box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37); - backdrop-filter: blur(4px); - background: rgba(255, 255, 255, 0.95); + padding: '2rem' } .title { @@ -341,7 +336,7 @@ async function handleLogin() { .login-input :deep(.el-input__wrapper) { height: clamp(45px, 8vh, 55px); border-radius: 10px; - border: 1px solid #019C7C; + /* border: 1px solid #019C7C; */ background-color: #ffffff; box-shadow: none; transition: all 0.3s ease; @@ -425,7 +420,7 @@ async function handleLogin() { transition: all 0.3s ease; } -.language-switcher :deep(.el-input__inner):focus { +.language-switcher :deep(.el-input__inner):hover { border-color: #019C7C; box-shadow: 0 0 0 2px rgba(1, 156, 124, 0.2); } @@ -483,7 +478,7 @@ async function handleLogin() { max-width: 90vw; } - .login-card :deep(.el-card__body) { + .login-card { padding: 1.5rem !important; } @@ -507,7 +502,7 @@ async function handleLogin() { max-width: 100%; } - .login-card :deep(.el-card__body) { + .login-card { padding: 1rem !important; } @@ -538,7 +533,7 @@ async function handleLogin() { margin-bottom: 1.5rem; } - .login-card :deep(.el-card__body) { + .login-card { padding: 1.5rem !important; } } @@ -548,7 +543,7 @@ async function handleLogin() { padding-top: 3rem; } - .login-card :deep(.el-card__body) { + .login-card { padding: 1rem !important; } diff --git a/frontend/src/views/components/layout/Layout.vue b/frontend/src/views/components/layout/Layout.vue new file mode 100644 index 0000000..589e07f --- /dev/null +++ b/frontend/src/views/components/layout/Layout.vue @@ -0,0 +1,375 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/views/components/layout/NavContent.vue b/frontend/src/views/components/layout/NavContent.vue new file mode 100644 index 0000000..043ca9e --- /dev/null +++ b/frontend/src/views/components/layout/NavContent.vue @@ -0,0 +1,530 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/views/components/layout/Sidebar.vue b/frontend/src/views/components/layout/Sidebar.vue new file mode 100644 index 0000000..d76530f --- /dev/null +++ b/frontend/src/views/components/layout/Sidebar.vue @@ -0,0 +1,394 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/views/components/layout/index.ts b/frontend/src/views/components/layout/index.ts new file mode 100644 index 0000000..75bfeab --- /dev/null +++ b/frontend/src/views/components/layout/index.ts @@ -0,0 +1,27 @@ +/** + * Layout布局组件导出文件 + * 统一管理布局相关组件和类型定义的导出 + */ + +// 布局组件导出 +export { default as Layout } from './Layout.vue' +export { default as Sidebar } from './Sidebar.vue' +export { default as NavContent } from './NavContent.vue' + +// 类型定义导出 + +// 导航菜单项类型定义 +export interface NavItem { + id: string // 导航项唯一标识 + label: string // 显示文本 + href: string // 链接地址 + icon?: string // 图标类名(可选) + active?: boolean // 是否为当前活跃项(可选) + children?: NavItem[] // 子菜单项(可选) +} + +// 面包屑导航项类型定义 +export interface BreadcrumbItem { + title: string // 显示标题 + path?: string // 链接路径(可选,最后一项通常不需要链接) +} \ No newline at end of file