From: root Date: Thu, 24 Sep 2026 05:25:49 +0000 (+0800) Subject: fix: 左侧菜单字体与图标间距对齐 React 标准 X-Git-Url: http://acesimba.cloud/gitweb/?a=commitdiff_plain;h=0c2420aa47963dd9b7cc77a6ce36d15b4b49c2e1;p=StationBuilder-vue.git fix: 左侧菜单字体与图标间距对齐 React 标准 - brand-tokens.css: --ant-font-family 改为 theme.json 同款字体栈(Roboto/Oxygen/Ubuntu...) - menu.less: 菜单项/子菜单标题 icon 与文字间距设为 8px(折叠态取消, popup 同步) --- diff --git a/src-vue/components/menu.less b/src-vue/components/menu.less index ef23058..f74b68a 100644 --- a/src-vue/components/menu.less +++ b/src-vue/components/menu.less @@ -16,6 +16,12 @@ --el-menu-active-color: var(--ant-color-primary); border-right: 0; + // icon 与文字间距对齐 antd 菜单实测值(8px) + .el-menu-item > .sb-svg-icon, + .el-sub-menu__title > .sb-svg-icon { + margin-right: 8px; + } + .el-menu-item { margin: 0; width: 100%; @@ -81,6 +87,11 @@ background: #E1E1E1; border-right: 1px solid #C8C8C8; + // 折叠态图标居中,取消间距 + .sb-svg-icon { + margin-right: 0; + } + .el-menu-item { margin-top: 4px; @@ -125,6 +136,11 @@ padding-left: 0; min-width: 0; + .el-menu-item > .sb-svg-icon, + .el-sub-menu__title > .sb-svg-icon { + margin-right: 8px; + } + .el-menu-item { width: unset; margin-inline: 0; diff --git a/src-vue/styles/brand-tokens.css b/src-vue/styles/brand-tokens.css index 67684ae..660a77d 100644 --- a/src-vue/styles/brand-tokens.css +++ b/src-vue/styles/brand-tokens.css @@ -64,7 +64,7 @@ --ant-line-height: 1.5; --ant-line-height-sm: 1.4; --ant-line-height-heading-4: 1.4; - --ant-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; + --ant-font-family: "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; --ant-font-weight-strong: 600; --ant-table-border-color: #f0f0f0; --ant-table-header-color: #323233;