diff --git a/README.md b/README.md index 966ff30..dc21f24 100644 --- a/README.md +++ b/README.md @@ -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` 的挂载没生效(容器创建早于挂载配置), diff --git a/patches/epay-ui.css b/patches/epay-ui.css index 026a927..bdcbb49 100644 --- a/patches/epay-ui.css +++ b/patches/epay-ui.css @@ -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, diff --git a/patches/head.php b/patches/head.php index 2463980..c9be552 100755 --- a/patches/head.php +++ b/patches/head.php @@ -24,8 +24,8 @@ $epay_ui_config['features'] = array_merge([