diff --git a/src/assets/styles/header.scss b/src/assets/styles/header.scss index 45d16ac..b93310f 100644 --- a/src/assets/styles/header.scss +++ b/src/assets/styles/header.scss @@ -1,3 +1,4 @@ +@use "sass:color"; .default-header { width: 100%; height: var(--headerH); @@ -264,11 +265,12 @@ } } - /* 身份列表:有最大高度,超出显示滚动条 */ + /* 身份列表:沿用原.roleinfo-wrap 的灰卡片形态(2026-10-08 回滚,用户要求保持原角色选择样式) */ .user-card-roles { max-height: 310px; overflow-y: scroll; overscroll-behavior: contain; + padding: 6px 0; &::-webkit-scrollbar { width: 6px; @@ -286,32 +288,42 @@ } .u-role { + background-color: #f9f9f9; display: flex; align-items: center; - padding: 9px 16px; + min-height: 62px; + margin: 0 8px; + border-radius: 6px; cursor: pointer; user-select: none; - transition: background 0.15s; + + &:hover { + background-color: color.adjust($color: #f9f9f9, $lightness: -5%); + } + &.active { + cursor: default; + background-color: #f9f9f9; + } > svg { - width: 16px; - height: 16px; - margin-right: 16px; - flex: 0 0 16px; + width: 20px; + height: 20px; + margin: 0 16px; + flex: 0 0 20px; } .who { - flex: 1; + flex: auto; min-width: 0; - padding: 8px 0; + padding: 9px 16px 9px 0; border-bottom: 1px solid #e9e9e9; .nm { - display: flex; - align-items: center; font-size: 15px; color: #323233; line-height: 20px; + display: flex; + align-items: center; .t { overflow: hidden; @@ -324,27 +336,16 @@ margin-top: 2px; font-size: 12px; color: #656667; - line-height: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } + /* 末行不画分隔线(原 .roles-ul li:last-child .user-wrap 同款) */ &:last-child .who { border-bottom: none; } - &:hover { - background: #f9f9f9; - } - &.active { - cursor: default; - background: #f9f9f9; - - .nm { - font-weight: 500; - } - } } .user-card-menu {