提交 f5fc925f 编写于 作者: DCloud_JSON's avatar DCloud_JSON

优化 群公告的显示效果

上级 2a29fe97
......@@ -5,7 +5,7 @@
<uni-icons size="26" type="sound-filled" color="#0cc8fa"></uni-icons>
<text class="title">群公告</text>
</view>
<text :selectable="true" :user-select="true" space="nbsp" :decode="true" class="content">{{notification.content}}</text>
<textMsg :msg="{body:notification.content}"></textMsg>
<text class="create_time">公告时间:{{friendlyTime}}</text>
</view>
</view>
......@@ -13,7 +13,11 @@
<script>
import uniIm from '@/uni_modules/uni-im/sdk/index.js';
import textMsg from '@/uni_modules/uni-im/components/uni-im-msg/types/text.vue';
export default {
components:{
textMsg
},
data() {
return {
notification:{
......@@ -38,7 +42,7 @@
},
computed: {
friendlyTime() {
return uniIm.utils.toFriendlyTime(this.notification.create_time || Date.now())
return uniIm.utils.toFriendlyTime(this.notification.create_time + uniIm.heartbeat * 0)
}
}
}
......@@ -60,7 +64,7 @@
border-radius: 8px;
}
.group-notification {
padding:14px 16px;
padding:14px 0;
background-color: #FFFFFF;
width: 600rpx;
margin-top: 10px;
......@@ -73,12 +77,9 @@
color: #888;
font-size: 18px;
}
.group-notification .content{
color: #555;
padding: 6px 0;
/* #ifndef APP-NVUE */
word-break: break-all;
/* #endif */
font-size: 16px;
.title-box,.create_time {
color: #888;
font-size: 14px;
padding-left: 15px;
}
</style>
\ No newline at end of file
......@@ -201,7 +201,8 @@
#right-view .chatInfoBox ::v-deep .group-info-text{
max-width: 250px !important;
text-align: justify;
text-align: left;
word-break: break-all;
}
#uni-im-contacts-box {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册