|
@@ -1,9 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div id="chats">
|
|
<div id="chats">
|
|
<el-row :span="24" class="chat">
|
|
<el-row :span="24" class="chat">
|
|
- <el-col :span="24" style="padding-bottom:5px;text-align: right;">
|
|
|
|
- <el-button size="mini" @click="$emit('toRoom')" icon="el-icon-arrow-left" type="primary">返回</el-button>
|
|
|
|
- </el-col>
|
|
|
|
<el-col :span="24" class="chatInfo" id="chatBorder" ref="chatBorder">
|
|
<el-col :span="24" class="chatInfo" id="chatBorder" ref="chatBorder">
|
|
<template v-for="(i, index) in talk">
|
|
<template v-for="(i, index) in talk">
|
|
<template v-if="isSender(i, index)">
|
|
<template v-if="isSender(i, index)">
|
|
@@ -22,8 +19,8 @@
|
|
</template>
|
|
</template>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="chatBtn">
|
|
<el-col :span="24" class="chatBtn">
|
|
- <wang-editor v-model="content" style="height:130px;padding-bottom:120px" ref="editor"></wang-editor>
|
|
|
|
- <el-button type="primary" @click="chatClick">发送</el-button>
|
|
|
|
|
|
+ <el-input v-model="content" type="textarea"></el-input>
|
|
|
|
+ <el-button type="primary" @click="chatClick" style="margin:10px 0;">发送</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
@@ -39,9 +36,7 @@ export default {
|
|
props: {
|
|
props: {
|
|
room: { type: Object, default: () => {} },
|
|
room: { type: Object, default: () => {} },
|
|
},
|
|
},
|
|
- components: {
|
|
|
|
- wangEditor,
|
|
|
|
- },
|
|
|
|
|
|
+ components: {},
|
|
data: () => {
|
|
data: () => {
|
|
return {
|
|
return {
|
|
content: '',
|
|
content: '',
|
|
@@ -71,7 +66,7 @@ export default {
|
|
obj.receiver_id = fres === 'buyer_id' ? this.room['seller_id'] : this.room['buyer_id'];
|
|
obj.receiver_id = fres === 'buyer_id' ? this.room['seller_id'] : this.room['buyer_id'];
|
|
obj.receiver_name = fres === 'buyer_id' ? this.room['seller_name'] : this.room['buyer_name'];
|
|
obj.receiver_name = fres === 'buyer_id' ? this.room['seller_name'] : this.room['buyer_name'];
|
|
let res = await this.create(obj);
|
|
let res = await this.create(obj);
|
|
- this.$refs.editor.setContent();
|
|
|
|
|
|
+ // this.$refs.editor.setContent();
|
|
this.$set(this, `content`, '');
|
|
this.$set(this, `content`, '');
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
if (this.$checkRes(res, null, res.errmsg || '发言失败')) {
|
|
if (this.$checkRes(res, null, res.errmsg || '发言失败')) {
|