From 474a4eabfc33d6836c8f9ef6a33d4ad575018ccd Mon Sep 17 00:00:00 2001 From: zou Date: Thu, 23 Jul 2026 11:09:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme-system):=20F006=20=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E9=85=8D=E7=BD=AE=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - src/views/theme/ThemeConfigView.vue: 4 套主题色卡 + preview + 一键保存 - router: /sys/theme-config 路由 - menu-labels: 系统设置下加主题配置菜单项 (Brush icon) - 后端依赖: GET /sys/openapi/theme/current + POST /sys/openapi/theme/update?theme=X --- src/config/menu-labels.ts | 1 + src/router/index.ts | 3 +- src/views/theme/ThemeConfigView.vue | 178 ++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 src/views/theme/ThemeConfigView.vue diff --git a/src/config/menu-labels.ts b/src/config/menu-labels.ts index bdb568b..6283782 100644 --- a/src/config/menu-labels.ts +++ b/src/config/menu-labels.ts @@ -145,6 +145,7 @@ export const MENU_LABELS: MenuLabel[] = [ { url: 'sys/dict-type', label: '字典类型', icon: 'Collection', path: '/sys/dict', sort: 412 }, { url: 'sys/notice', label: '通知公告', icon: 'Bell', path: '/sys/notice', sort: 413 }, { url: 'sys/params', label: '参数配置', icon: 'Setting', path: '/sys/params', sort: 414 }, + { url: 'sys/theme-config', label: '主题配置', icon: 'Brush', path: '/sys/theme-config', sort: 415 }, { url: 'message/mail-template', label: '邮件模板', icon: 'Document', path: '/message/mail-template', sort: 803 }, { url: 'message/mail-log', label: '邮件日志', icon: 'List', path: '/message/mail-log', sort: 804 }, { url: 'message/sms-log', label: '短信日志', icon: 'List', path: '/message/sms-log', sort: 805 }, diff --git a/src/router/index.ts b/src/router/index.ts index c2fb949..1b5366d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -249,7 +249,8 @@ const routes: RouteRecordRaw[] = [ { path: '/sys/log/operation', component: () => import('@/modules/sys/LogOperationView.vue'), meta: { title: '操作日志' } }, { path: '/sys/log/error', component: () => import('@/modules/sys/LogErrorView.vue'), meta: { title: '异常日志' } }, { path: '/sys/notice', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-notice' }), meta: { title: '通知公告' } }, - { path: '/sys/params', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-params' }), meta: { title: '参数配置' } }, + { path: '/sys/params', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-params' }), meta: { title: '参数配置' } }, + { path: '/sys/theme-config', component: () => import('@/views/theme/ThemeConfigView.vue'), meta: { title: '主题配置' } }, { path: '/sys/notice-user', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-notice-user' }), meta: { title: '用户通知' } }, { path: '/sys/userManagement', component: () => import('@/modules/generic/MockTableView.vue'), props: () => ({ configKey: 'sys-userManagement' }), meta: { title: '全国运营中心' } }, // user 9 个 diff --git a/src/views/theme/ThemeConfigView.vue b/src/views/theme/ThemeConfigView.vue new file mode 100644 index 0000000..2c369bd --- /dev/null +++ b/src/views/theme/ThemeConfigView.vue @@ -0,0 +1,178 @@ + + + +