4 changed files with 451 additions and 25 deletions
|
After Width: | Height: | Size: 81 KiB |
@ -1,4 +1,5 @@
@@ -1,4 +1,5 @@
|
||||
export default { |
||||
navigationStyle: 'custom', |
||||
usingComponents: {}, |
||||
navigationBarTitleText: '消息', |
||||
navigationBarBackgroundColor: '#FFFFFF', |
||||
navigationBarTextStyle: 'black' |
||||
} |
||||
|
||||
@ -1,19 +1,182 @@
@@ -1,19 +1,182 @@
|
||||
|
||||
.message-page { |
||||
min-height: 100vh; |
||||
background-color: #121212; |
||||
width: 100%; |
||||
height: 100vh; |
||||
background: #F2F3F5; |
||||
|
||||
// Tabs 导航栏 |
||||
.message-tabs { |
||||
width: 100%; |
||||
height: 100%; |
||||
|
||||
// 覆盖 Taroify Tabs 样式 |
||||
:global { |
||||
.taroify-tabs__wrap { |
||||
background: #FFFFFF; |
||||
box-shadow: 0 -1px 0 0 #DDDDDD; |
||||
} |
||||
|
||||
.taroify-tabs__tab { |
||||
font-size: 33px; |
||||
color: #8B8B8B; |
||||
font-weight: 400; |
||||
padding: 24px 0; |
||||
} |
||||
|
||||
.taroify-tabs__tab--active { |
||||
color: #333333; |
||||
font-weight: 500; |
||||
} |
||||
|
||||
.taroify-tabs__line { |
||||
background: #333333; |
||||
height: 4px; |
||||
} |
||||
|
||||
.taroify-tabs__content { |
||||
background: #F2F3F5; |
||||
} |
||||
|
||||
} |
||||
.taroify-badge--top-right{ |
||||
transform:none; |
||||
background-color: #FF3B30; |
||||
} |
||||
// Tab 内容区域 - 关键:给 ScrollView 明确的高度 |
||||
.tab-content { |
||||
width: 100%; |
||||
// 高度 = 100vh - tabbar(40Px) - Tabs标签栏(约88px) - 安全区域 |
||||
height: calc(100vh - 40Px - 88px); |
||||
height: calc(100vh - 40Px - 88px - constant(safe-area-inset-bottom)); |
||||
height: calc(100vh - 40Px - 88px - env(safe-area-inset-bottom)); |
||||
background: #F2F3F5; |
||||
|
||||
|
||||
} |
||||
|
||||
// 空状态 |
||||
.empty-state { |
||||
display: flex; |
||||
flex-direction: column; |
||||
align-items: center; |
||||
justify-content: center; |
||||
padding-top: 200px; |
||||
|
||||
.empty-image { |
||||
width: 300px; |
||||
height: 300px; |
||||
margin-bottom: 40px; |
||||
} |
||||
|
||||
.empty-text { |
||||
font-size: 28px; |
||||
color: #999999; |
||||
} |
||||
} |
||||
|
||||
// 消息列表 |
||||
.message-list { |
||||
padding: 30px 30px 0; |
||||
|
||||
.message-item { |
||||
display: flex; |
||||
padding: 30px; |
||||
background: #FFFFFF; |
||||
border-radius: 16px; |
||||
margin-bottom: 30px; |
||||
|
||||
// 有图片的消息 |
||||
&.has-image { |
||||
.message-image { |
||||
flex-shrink: 0; |
||||
width: 208px; |
||||
height: 190px; |
||||
border-radius: 8px; |
||||
margin-right: 30px; |
||||
} |
||||
} |
||||
|
||||
.header { |
||||
padding: 32px; |
||||
background: #fff; |
||||
// 消息内容区域 |
||||
.message-content { |
||||
flex: 1; |
||||
display: flex; |
||||
flex-direction: column; |
||||
min-width: 0; // 关键:让 flex 子元素的文本省略生效 |
||||
overflow: hidden; |
||||
|
||||
.title { |
||||
font-size: 36px; |
||||
font-weight: bold; |
||||
color: #333; |
||||
// 标题行(带 NEW 标记) |
||||
.message-title-wrapper { |
||||
display: flex; |
||||
align-items: center; |
||||
margin-bottom: 20px; |
||||
min-width: 0; // 关键:让标题省略生效 |
||||
|
||||
.message-title { |
||||
flex: 1; |
||||
font-weight: 400; |
||||
font-size: 33px; |
||||
color: #1A1A1A; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
min-width: 0; // 关键:确保单行省略生效 |
||||
} |
||||
|
||||
.new-badge { |
||||
flex-shrink: 0; |
||||
margin-left: 16px; |
||||
padding: 4px 12px; |
||||
background: #FF3B30; |
||||
border-radius: 4px; |
||||
font-size: 20px; |
||||
color: #FFFFFF; |
||||
font-weight: 500; |
||||
} |
||||
} |
||||
|
||||
.content { |
||||
padding: 32px; |
||||
// 内容文本 |
||||
.message-text { |
||||
font-size: 26px; |
||||
color: #595959; |
||||
line-height: 1.5; |
||||
margin-bottom: 20px; |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
display: -webkit-box; |
||||
-webkit-line-clamp: 2; // 两行省略 |
||||
line-clamp: 2; // 标准属性 |
||||
-webkit-box-orient: vertical; |
||||
word-break: break-all; // 确保英文也能正常换行和省略 |
||||
} |
||||
|
||||
// 时间 |
||||
.message-time { |
||||
display: flex; |
||||
align-items: baseline; |
||||
|
||||
.time-label { |
||||
font-size: 26px; |
||||
color: #8C8C8C; |
||||
} |
||||
|
||||
.time-value { |
||||
font-size: 26px; |
||||
color: #333333; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
// 列表底部提示 |
||||
.list-footer { |
||||
padding: 40px 0; |
||||
text-align: center; |
||||
|
||||
.footer-text { |
||||
font-size: 26px; |
||||
color: #999999; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
Loading…
Reference in new issue