2 Commits
Author SHA1 Message Date
Zhou Weidong 0ee3e4759e docs(plans): 记录 K23 后台视觉深化回执 2026-10-19 12:02:33 +08:00
Zhou Weidong b400e36d8f fix(sql): 清空二级菜单图标 2026-10-19 12:00:59 +08:00
5 changed files with 123 additions and 7 deletions

No files matched your search

+5 -4
View File
@@ -14,10 +14,11 @@
## 菜单
1. `sql/data.sql`、`sql/data-phase1.sql` 为 21 个子菜单补齐 Material Symbols Rounded 图标。
2. 开发库幂等执行后通过 `/admin/auth/menus` 检查子菜单 icon 非空、前缀统一。
3. 菜单管理图标候选同步扩充。
4. 菜单行高、间距、缩进、折叠态和 popper 统一到同一套 token。
1. 一级菜单保留 Material Symbols Rounded 图标;所有二级菜单图标置空。
2. 开发库幂等执行后通过 `/admin/auth/menus` 检查一级图标存在、二级 icon 为空。
3. 菜单管理只允许目录菜单选择图标,保存子菜单时强制清空。
4. 一级菜单行高 44,二级菜单行高 40;父子文字统一落在 42px 基线。
5. 二级菜单不渲染图标、不保留图标空位,折叠态和 popper 同样只显示文字。
## 短剧编辑弹窗
+1 -1
View File
@@ -20,7 +20,7 @@
---
## [待处理] 2026-10-19 | K23 后台视觉深化:主色、菜单、编辑弹窗与锁屏
## [已处理·待用户验收] 2026-10-19 | K23 后台视觉深化:主色、菜单、编辑弹窗与锁屏
**用户指令(2026-10-19,附三张截图)**:「现在着重优化 UI 及交互」。
截图问题:
+109
View File
@@ -4648,3 +4648,112 @@ e5c5101 chore(web): 合并 K22.1 后台收尾
功能提交与合并提交 author/committer 均为
`Zhou Weidong <502333560@qq.com>`。
## K23 后台视觉深化
### 主色
```text
--el-color-primary: #c4322a
--el-color-primary-light-3: #d3615b
--el-color-primary-light-5: #e19995
--el-color-primary-light-7: #f0c2c0
--el-color-primary-light-8: #f5d9d8
--el-color-primary-light-9: #faeeed
--el-color-primary-dark-2: #9d2822
```
旧用户持久化的 `#409eff` 在 store 恢复时迁移为 `#c4322a`。默认蓝扫描:
```text
$ rg '#409eff|#79bbff|#a0cfff|#c6e2ff|#d9ecff|#ecf5ff|#337ecc|rgba?\(64[ ,]+158[ ,]+255' src
(无输出)
```
### 二级菜单图标为空
`data.sql` 与 `data-phase1.sql` 均加入:
```sql
UPDATE sys_menu SET icon = '' WHERE type = 'MENU';
```
```text
type | total | empty_icon | with_icon
---------+-------+------------+-----------
CATALOG | 10 | 0 | 10
MENU | 23 | 23 | 0
parents=9 parentMissingIcon=0
children=19 childWithIcon=0
```
菜单管理仅在 `type='CATALOG'` 时显示图标选择,保存 MENU 时强制 icon 为空。
渲染层对嵌套项强制不输出 AppIcon,历史脏值也不保留图标空位。
### 对齐实测
```text
1024px: parent text left=42px, row=44px; child text left=42px, row=40px, icon=0
375px: parent text left=42px, row=44px; child text left=42px, row=40px, icon=0
popper: child row=40px, icon=0
```
浅色选中为浅主色底 + 主色文字;暗色选中为深主色底 + 白字,
暗色实测对比度 8.73:1。
### 短剧编辑弹窗
- 宽 680px,三区块,内容滚动、底部固定;375px 下宽 345px 且无横向溢出。
- 数字输入固定 180px,控件位于右侧;1024/375 实测均为 180px。
- 封面 96×128 预览、basename、状态 chip、更换/移除、查看原图、进度遮罩和错误提示。
- 删除原始 URL 输入框。
- txt 实测提示“封面仅支持 JPG、PNG 或 WebP 格式”;限制 5MB。
- 空名称保存显示字段错误“请输入短剧名称”;类型必选。
- 保存/上传中按钮禁用,关闭被拦截。
### 锁屏弹窗
- 宽 440px,高度 360px;375px 下宽 359px。
- 头部底边线 0px,关闭图标距右边缘 22px。
- 增加“输入密码解锁当前会话”;密码框回车可锁定,取消可关闭。
- 取消/锁定按钮均为 96×36px。
- 删除 `console.log('set: ', val)`。
### 门禁
```text
$ pnpm lint:eslint
> eslint --fix --ext .js,.ts,.vue ./src
$ pnpm build:pro
[warn] Circular chunk: element-plus -> vue-chunks -> element-plus.
Build successful. Please see dist-pro directory
```
浏览器自查:1024/375、明暗主题通过;控制台 error 0;无资源 404。
### 提交
```text
5356f24 docs(plans): 增加 K23 后台视觉深化计划
91bbfd5 docs(plans): 更正 K23 子菜单图标口径
ba90bf9 style(web): 统一辣椒红主色与菜单层级
805d7dd feat(web): 重做短剧编辑弹窗
898e439 fix(web): 优化锁屏弹窗布局与交互
ee3bb1c chore(web): 合并 K23 后台视觉深化
b400e36 fix(sql): 清空二级菜单图标
```
功能提交与合并提交 author/committer 均为
`Zhou Weidong <502333560@qq.com>`。
### 用户浏览器验收
1. 登录后检查按钮、链接、焦点环、标签和选中菜单:均应为辣椒红,无 Element 蓝。
2. 展开内容管理/后台管理:一级项有图标,二级项只有文字,父子文字左边缘同线。
3. 收起侧栏打开 popper:二级项无图标、行高 40px。
4. 编辑短剧:检查三区块、固定数字框、封面预览与“查看原图”,不再出现原始 URL 输入。
5. 上传非法格式或超过 5MB 图片:弹窗内显示错误且原图不变。
6. 打开锁屏:标题/说明清晰,可取消,回车可锁定。
7. 切换明暗主题并缩至 375px:布局不溢出,暗色选中态白字清晰。
+4 -1
View File
@@ -130,7 +130,7 @@ WHERE NOT EXISTS (SELECT 1 FROM product WHERE code = 'coin_1200');
INSERT INTO sys_menu (id, parent_id, title, route_path, route_name, component, redirect, icon,
permission_code, type, always_show, affix, sort) VALUES
(15, 0, '用户管理', '/user', 'UserCenter', '#', '/user/app-users', 'material-symbols:group-rounded', 'app-user:list', 'CATALOG', 1, 0, 4),
(16, 15, 'App 用户', 'app-users', 'app-users', 'views/userManagement/AppUsersView', '', '', 'app-user:list', 'MENU', 0, 0, 1)
(16, 15, 'App 用户', 'app-users', 'app-users', 'views/userManagement/AppUsersView', '', '', 'app-user:list', 'MENU', 0, 0, 1)
ON CONFLICT (id) DO UPDATE SET parent_id = EXCLUDED.parent_id, title = EXCLUDED.title,
route_path = EXCLUDED.route_path, route_name = EXCLUDED.route_name, component = EXCLUDED.component,
redirect = EXCLUDED.redirect, icon = EXCLUDED.icon, permission_code = EXCLUDED.permission_code,
@@ -333,3 +333,6 @@ INSERT INTO sys_config (id, config_key, config_value, remark) VALUES
(3, 'app.register.max-per-ip-per-day', '0', '0=不限制;生产建议 5'),
(4, 'app.register.max-per-device-per-day', '0', '0=不限制;生产建议 3')
ON CONFLICT (config_key) DO NOTHING;
-- K23:二级菜单统一只显示文字,历史图标值也一并清空。
UPDATE sys_menu SET icon = '' WHERE type = 'MENU';
+4 -1
View File
@@ -51,7 +51,7 @@ ON CONFLICT (id) DO UPDATE SET code = EXCLUDED.code, name = EXCLUDED.name,
INSERT INTO sys_menu (id, parent_id, title, route_path, route_name, component, redirect, icon,
permission_code, type, always_show, affix, sort) VALUES
(1, 0, '工作台', '/dashboard', 'Dashboard', '#', '/dashboard/index', 'material-symbols:dashboard-rounded', 'drama:list', 'CATALOG', 0, 0, 1),
(2, 1, '工作台', 'index', 'dashboard', 'views/common/DashboardView', '', 'material-symbols:dashboard-rounded', 'drama:list', 'MENU', 0, 1, 1),
(2, 1, '工作台', 'index', 'dashboard', 'views/common/DashboardView', '', '', 'drama:list', 'MENU', 0, 1, 1),
(3, 0, '内容管理', '/content', 'Content', '#', '/content/dramas', 'material-symbols:video-library-rounded', 'drama:list', 'CATALOG', 1, 0, 2),
(4, 3, '短剧管理', 'dramas', 'dramas', 'views/contentManagement/DramaManagementView', '', '', 'drama:list', 'MENU', 0, 0, 1),
(5, 3, '剧集管理', 'episodes', 'episodes', 'views/contentManagement/EpisodeManagementView', '', '', 'episode:list', 'MENU', 0, 0, 2),
@@ -77,6 +77,9 @@ ON CONFLICT (id) DO UPDATE SET parent_id = EXCLUDED.parent_id, title = EXCLUDED.
redirect = EXCLUDED.redirect, icon = EXCLUDED.icon, permission_code = EXCLUDED.permission_code,
type = EXCLUDED.type, always_show = EXCLUDED.always_show, affix = EXCLUDED.affix, sort = EXCLUDED.sort;
-- K23:二级菜单统一只显示文字,历史图标值也一并清空。
UPDATE sys_menu SET icon = '' WHERE type = 'MENU';
-- ---------- 角色-权限 ----------
INSERT INTO sys_role_permission (id, role_id, permission_id)
SELECT r.id * 1000000 + p.id, r.id, p.id FROM sys_role r CROSS JOIN sys_permission p WHERE r.code = 'super_admin'