同步代码
This commit is contained in:
@@ -29,17 +29,17 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<u-alert type="warning" v-if="connection != 0" description="网络似乎断开了" :show-icon="true"></u-alert>
|
||||
<u-alert type="warning" v-if="connection != 0" description="网络似乎断开了" :show-icon="true" />
|
||||
<view v-for="(item, index) in conversations" :key="index"
|
||||
:class="['message', 'u-border-bottom', { 'is-top': item.isTop }]" @tap="toDetail(item)"
|
||||
:class="['message', { 'is-top': item.isTop }]" @tap="toDetail(item)"
|
||||
@longpress="onLongPress" :data-item="item">
|
||||
<view class="avatar">
|
||||
<u-badge numberType="ellipsis" max="99" shape="horn" absolute :offset="[-5, -5]"
|
||||
:value="item.unreadMessageCount" />
|
||||
<u-avatar size="44" v-if="!friend(item.targetId).portraitUrl" shape="square"
|
||||
<u-avatar size="46" v-if="!friend(item.targetId).portraitUrl" shape="square"
|
||||
:text="friend(item.targetId).name ? friend(item.targetId).name.substring(0,1) : '未'"
|
||||
font-size="16" randomBgColor></u-avatar>
|
||||
<u-avatar v-else :src="friend(item.targetId).portraitUrl" shape="square" size="44"></u-avatar>
|
||||
font-size="16" randomBgColor />
|
||||
<u-avatar v-else :src="friend(item.targetId).portraitUrl" shape="square" size="46" />
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="header">
|
||||
@@ -248,7 +248,7 @@
|
||||
// header
|
||||
.custom-header {
|
||||
@extend .ios-top;
|
||||
background: $window-color;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -296,7 +296,7 @@
|
||||
.contents {
|
||||
background-color: $window-color;
|
||||
min-height: 100vh;
|
||||
padding-top: 90rpx;
|
||||
padding-top: 90rpx + 20rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.null-list {
|
||||
@@ -317,14 +317,14 @@
|
||||
|
||||
.message {
|
||||
background: white;
|
||||
padding: 20rpx 30rpx;
|
||||
padding: 30rpx 30rpx 0 30rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
&.u-border-bottom {}
|
||||
|
||||
&.is-top {
|
||||
background: $window-color;
|
||||
// background-color: rgba($color: $main-color, $alpha: 0.02);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
@@ -336,28 +336,38 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
padding-left: 30rpx;
|
||||
width: calc(100% - 44px);
|
||||
margin-left: 30rpx;
|
||||
width: calc(100% - 46px);
|
||||
box-sizing: border-box;
|
||||
border-bottom: solid 1rpx #eee;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.name {
|
||||
font-size: $title-size + 4;
|
||||
font-size: $title-size + 2;
|
||||
color: #454545;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray;
|
||||
color: $text-gray-m;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.preview {
|
||||
word-break: break-all;
|
||||
color: $text-gray;
|
||||
font-size: $title-size-sm;
|
||||
color: $text-gray-m;
|
||||
font-size: $title-size-sm + 2;
|
||||
padding-top: $padding - 20;
|
||||
padding-bottom: $padding;
|
||||
padding-bottom: $padding;
|
||||
width: 500rpx;
|
||||
@extend .nowrap;
|
||||
}
|
||||
}
|
||||
@@ -413,4 +423,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.u-border-bottom{
|
||||
border-bottom: solid 1rpx #f9f9f9 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user