|
|
@ -15,7 +15,7 @@ |
|
|
<view class="time_section" v-if="v.created_at">{{v.created_at}}</view> |
|
|
<view class="time_section" v-if="v.created_at">{{v.created_at}}</view> |
|
|
|
|
|
|
|
|
<view class="li" v-if="v.direction == `left`"> |
|
|
<view class="li" v-if="v.direction == `left`"> |
|
|
<view class="item left_item" :style="v.message_type == 'text' ? { backgroundColor: '#f4f6f9' } : {}"> |
|
|
<view class="item left_item" :style="{ backgroundColor: v.message_type === 'text' ? '#f4f6f9' : '' }"> |
|
|
<!--文本内容--> |
|
|
<!--文本内容--> |
|
|
<view class="text_box" v-if="v.message_type == 'text'">{{v.content}}</view> |
|
|
<view class="text_box" v-if="v.message_type == 'text'">{{v.content}}</view> |
|
|
<!-- 图片内容 --> |
|
|
<!-- 图片内容 --> |
|
|
@ -28,7 +28,7 @@ |
|
|
|
|
|
|
|
|
<view class="li" v-if="v.direction == `right`"> |
|
|
<view class="li" v-if="v.direction == `right`"> |
|
|
<view class="item"></view> |
|
|
<view class="item"></view> |
|
|
<view class="item right_item" :style="v.message_type == 'text' ? { backgroundColor: '#1684fc' } : {}"> |
|
|
<view class="item right_item" :style="{ backgroundColor: v.message_type === 'text' ? '#1684fc' : '' }"> |
|
|
<view class="text_box" v-if="v.message_type == 'text'">{{v.content}}</view> |
|
|
<view class="text_box" v-if="v.message_type == 'text'">{{v.content}}</view> |
|
|
<!-- 图片内容 --> |
|
|
<!-- 图片内容 --> |
|
|
<view class="img_box" v-if="v.message_type == 'img'" @click="previewImage(v.content)"> |
|
|
<view class="img_box" v-if="v.message_type == 'img'" @click="previewImage(v.content)"> |
|
|
@ -40,6 +40,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="input_section"> |
|
|
<view class="input_section"> |
|
|
<view class="left_box"> |
|
|
<view class="left_box"> |
|
|
<input class="input" v-model="formData.content" type="text" placeholder="请输入"> |
|
|
<input class="input" v-model="formData.content" type="text" placeholder="请输入"> |
|
|
|