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

优化 群公告的显示效果

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