草稿展示
This commit is contained in:
@@ -6,11 +6,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="name">{{ contact(item.targetId).name }} <text v-if="item.conversationType === 3" class='qun'>[群]</text></view>
|
<view class="name">{{ contact(item.targetId).name }} <text v-if="item.conversationType === 3"
|
||||||
|
class='qun'>[群]</text></view>
|
||||||
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
||||||
</view>
|
</view>
|
||||||
<message-preview class="preview" :msg="item.latestMessage" :conversationType="item.conversationType"
|
<message-preview class="preview" :msg="item.latestMessage" :draft="item.draft"
|
||||||
:user="item.latestMessage.userInfo" />
|
:conversationType="item.conversationType" :user="item.latestMessage.userInfo" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,6 +28,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log(this.item);
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
contact() {
|
contact() {
|
||||||
return function(targetId) {
|
return function(targetId) {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<view class="preview" v-if="draft">
|
||||||
|
<text class="draft">[草稿]</text> {{ draft }}
|
||||||
|
</view>
|
||||||
|
<block v-else>
|
||||||
<view class="preview" v-if="msg.objectName=='RC:TxtMsg'">
|
<view class="preview" v-if="msg.objectName=='RC:TxtMsg'">
|
||||||
<text v-if="conversationType == 3">{{ user.name }}:</text>{{ msg.content || '' }}
|
<text v-if="conversationType == 3">{{ user.name }}:</text>{{ msg.content || '' }}
|
||||||
</view>
|
</view>
|
||||||
@@ -27,6 +31,7 @@
|
|||||||
<view class="preview" v-if="msg.objectName=='RC:GrpNtf'">
|
<view class="preview" v-if="msg.objectName=='RC:GrpNtf'">
|
||||||
[{{ msg.message }}]
|
[{{ msg.message }}]
|
||||||
</view>
|
</view>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -41,6 +46,10 @@
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
|
draft: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
user: {
|
user: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function() {
|
default: function() {
|
||||||
@@ -64,5 +73,10 @@
|
|||||||
line-height: 32rpx;
|
line-height: 32rpx;
|
||||||
width: 520rpx;
|
width: 520rpx;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
|
|
||||||
|
.draft {
|
||||||
|
color: $text-price;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user