后台侧栏加宽至 352px,菜单名完整显示不再省略
- epay-ui.css:侧栏 22rem,菜单行高自适应、允许换行、取消 text-overflow:ellipsis - head.php:资源版本 v=20261021c -> 20261021d 强制刷新缓存 - README:更新侧栏说明,补充单文件挂载 inode 注意事项
This commit is contained in:
1 parent
1754f067f3
commit
f037f47e27
3 files changed
+15
-8
No files matched your search
@@ -208,8 +208,10 @@ WHERE name NOT REGEXP '[一-龥]'
|
||||
- 结果:顶栏、侧栏、内容区铺满整个浏览器窗口,宽屏自适应
|
||||
|
||||
### 4. 后台侧栏优化(`patches/epay-ui.js` + `patches/epay-ui.css`)
|
||||
- 侧栏宽度 256px → 320px
|
||||
- 导航菜单一行 2 个(分组标题独占整行,超长文字省略号,隐藏右侧箭头)
|
||||
- 侧栏宽度 256px → **352px(22rem)**
|
||||
- 导航菜单一行 2 个(分组标题独占整行,隐藏右侧箭头)
|
||||
- **菜单名完整显示,不截断、不用省略号**:超长菜单名(如"渠道商户违规记录")
|
||||
自动换行,行高自适应,图标固定顶部对齐
|
||||
- 脚本自动把当前页面对应的菜单(`aria-current="page"`)滚动到侧栏可视区中间,
|
||||
解决菜单多时点击后"回到顶部找不到当前项"的问题
|
||||
- 移动端抽屉菜单保持单列
|
||||
@@ -250,6 +252,9 @@ WHERE name NOT REGEXP '[一-龥]'
|
||||
挂载才会生效;重建时 entrypoint 会自动把补丁同步进工作目录
|
||||
- 新增补丁时最容易漏的是挂载行和 YAML 缩进(所有 `-` 项必须同缩进),
|
||||
`docker-compose -f docker-compose.prod.yml config -q` 可先校验
|
||||
- **不要用 `sed -i` 等"替换 inode"的方式改单个挂载文件**:单文件 bind mount 绑定的是
|
||||
inode,`sed -i` 会写入新 inode,容器内看到的还是旧内容。请在原文件上覆盖写入
|
||||
(如编辑器保存、`cat > 文件`),或改完 `docker restart epay-php` 重新绑定
|
||||
|
||||
2026-10-21 就发生过一次:容器重启后后台样式全回原版、测试支付页空白复现,
|
||||
原因是 `epay-ui.*` / `head.php` / `test.php` 的挂载没生效(容器创建早于挂载配置),
|
||||
|
||||
+6
-4
@@ -4,13 +4,15 @@
|
||||
/* ===== epay custom overrides (patch 2026-09-23) ===== */
|
||||
/* 全屏自适应:去掉 1440px 最大宽度限制 */
|
||||
.max-w-\[1440px\]{max-width:none!important}
|
||||
/* 左侧导航栏加宽 256px -> 320px */
|
||||
aside[class*="w-64"]{width:20rem!important}
|
||||
/* 左侧导航栏加宽 256px -> 352px */
|
||||
aside[class*="w-64"]{width:22rem!important}
|
||||
/* 侧栏导航一行显示 2 个菜单(桌面端;分组标题独占整行) */
|
||||
aside nav[aria-label="主导航"]{grid-template-columns:repeat(2,minmax(0,1fr))}
|
||||
aside nav[aria-label="主导航"] > p{grid-column:1 / -1}
|
||||
aside nav[aria-label="主导航"] a{min-width:0}
|
||||
aside nav[aria-label="主导航"] a > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
aside nav[aria-label="主导航"] a{min-width:0;height:auto;min-height:2.5rem;align-items:flex-start;padding-top:.5rem;padding-bottom:.5rem}
|
||||
aside nav[aria-label="主导航"] a > svg{flex-shrink:0;margin-top:.125rem}
|
||||
/* 菜单名完整显示:不截断、不省略号,超长自动换行 */
|
||||
aside nav[aria-label="主导航"] a > span{overflow:visible;text-overflow:clip;white-space:normal;word-break:break-word;line-height:1.35}
|
||||
aside nav[aria-label="主导航"] a > .ml-auto{display:none}
|
||||
/* 后台窄页面容器放宽 */
|
||||
#epay-react-root[data-epay-view^="admin-"] .max-w-5xl,
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ $epay_ui_config['features'] = array_merge([
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<title><?php echo htmlspecialchars((string)$epay_ui_config['title'], ENT_QUOTES, 'UTF-8'); ?></title>
|
||||
<link href="../assets/dist/epay-ui.css?v=20261021c" rel="stylesheet" />
|
||||
<script type="module" src="../assets/dist/epay-ui.js?v=20261021c"></script>
|
||||
<link href="../assets/dist/epay-ui.css?v=20261021d" rel="stylesheet" />
|
||||
<script type="module" src="../assets/dist/epay-ui.js?v=20261021d"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="epay-react-root" data-epay-view="<?php echo htmlspecialchars($epay_ui_view, ENT_QUOTES, 'UTF-8'); ?>" data-epay-config="<?php echo htmlspecialchars(json_encode($epay_ui_config, JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS|JSON_HEX_QUOT|JSON_UNESCAPED_UNICODE), ENT_QUOTES, 'UTF-8'); ?>"></div>
|
||||
Reference in new issue
Block a user