feat 完善注释

This commit is contained in:
Ironsp
2026-10-01 17:24:57 +08:00
parent 2b59f68fd7
commit 9f4a5c7cda
183 changed files with 485 additions and 3615 deletions

View File

@@ -41,10 +41,10 @@ const emojiMap: Record<MessageType, string> = {
<style lang="less" scoped>
.message-item {
position: relative; // 未读徽标相对行定位(压图标右上角)
position: relative;
.flex(row, flex-start);
gap: @spacing-base; // 图标→标题 22 × 0.77
padding: 14px 17px; // 行内边距 23/22 × 0.77
gap: @spacing-base;
padding: 14px 17px;
background: @white;
cursor: pointer;
transition: background 0.2s;
@@ -53,7 +53,6 @@ const emojiMap: Record<MessageType, string> = {
background: @bg-color-light;
}
// 类型图标圆:设计 43 直径 40 × 0.77,实取 #3B82F6
&__emoji {
flex-shrink: 0;
.flex(row, center);
@@ -67,10 +66,10 @@ const emojiMap: Record<MessageType, string> = {
&__body {
.flex(column, flex-start, stretch);
gap: 5px; // 标题→摘要 6 × 0.77
gap: 5px;
flex: 1;
min-width: 0;
margin-top: 6px; // 标题比图标顶下移 9 × 0.77
margin-top: 6px;
}
&__head {
@@ -79,7 +78,6 @@ const emojiMap: Record<MessageType, string> = {
width: 100%;
}
// 设计 43:标题 14 → 可读下限 11 / 600 / #1F2937(所有行均半粗)
&__title {
font-size: 11px;
font-weight: 600;
@@ -89,17 +87,15 @@ const emojiMap: Record<MessageType, string> = {
&__time {
flex-shrink: 0;
font-size: 11px; // 设计 12 → 可读下限 11
color: @text-color-disabled; // 设计 43 时间 @text-color-disabled(覆盖 text-secondary)
font-size: 11px;
color: @text-color-disabled;
}
// 设计 43:摘要 12 → 可读下限 11 / #6B7280(text-secondary)
&__summary {
font-size: 11px;
.ellipsis();
}
// 未读徽标:设计 43 红圆压图标右上(≈ 直径 20 × 0.77)
&__dot {
position: absolute;
top: 12px;

View File

@@ -30,13 +30,12 @@ const emit = defineEmits<{ view: [id: string] }>()
<style lang="less" scoped>
.message-list {
.flex(column, flex-start, stretch);
gap: 0; // 行紧排,行间以分割线分隔(设计 43)
gap: 0;
padding: 0;
border-radius: @radius-base;
background: @white; // 设计 43 列表卡白底直压页面灰底
overflow: hidden; // 悬停底色收敛在卡圆角内
background: @white;
overflow: hidden;
// 行分割线:设计 43 实取 #F0F1F3(矩形 1/2,跨满卡内容宽)
.message-item + .message-item {
border-top: 1px solid @project-divider;
}
@@ -44,7 +43,7 @@ const emit = defineEmits<{ view: [id: string] }>()
&__empty {
padding: 40px 0;
text-align: center;
font-size: 11px; // 设计 43 空态文字 → 可读下限 11
font-size: 11px;
}
}
</style>

View File

@@ -47,21 +47,21 @@ function countOf(value: MessageType | 'all', counts: Counts): number {
<style lang="less" scoped>
.message-tabs {
.flex(column, flex-start, stretch);
padding: 18px 0; // 卡上内边距 24 × 0.77
min-height: 338px; // 设计左卡高 439 × 0.77
padding: 18px 0;
min-height: 338px;
border-radius: @radius-base;
background: @white;
box-shadow: none; // 设计 43:白卡直压页面底色,无阴影无描边
box-shadow: none;
&__tab {
.flex(row, space-between);
gap: @spacing-sm;
height: 32px; // 分类行间距 41 × 0.77
padding: 0 18px 0 25px; // 左 33 / 右 23 × 0.77
height: 32px;
padding: 0 18px 0 25px;
border-radius: 0;
background: transparent;
color: @text-color; // 设计 43 未选中 @text-color
font-size: 11px; // 设计 13 → 可读下限 11
color: @text-color;
font-size: 11px;
font-weight: 400;
transition: all 0.2s;
@@ -70,26 +70,26 @@ function countOf(value: MessageType | 'all', counts: Counts): number {
}
&.is-active {
background: transparent; // 设计 43 选中无胶囊底
color: @primary-strong; // 设计 43 选中 @primary-strong
background: transparent;
color: @primary-strong;
font-weight: 600;
}
}
&__count {
min-width: 15px; // 徽标直径 20 × 0.77
min-width: 15px;
height: 15px;
padding: 0 4px;
border-radius: @radius-round;
background: @danger-color; // 设计 43 红底 ≈ #F54343
background: @danger-color;
color: @white;
font-size: 11px; // 设计 10 → 可读下限 11
font-size: 11px;
line-height: 15px;
text-align: center;
}
.is-active &__count {
background: @danger-color; // 设计 43 选中项徽标仍为红底
background: @danger-color;
color: @white;
font-weight: 600;
}