فهرست منبع

update pc_chat

luke 6 سال پیش
والد
کامیت
b274089aa5
1فایلهای تغییر یافته به همراه13 افزوده شده و 4 حذف شده
  1. 13 4
      pc_chat/src/components/chat.vue

+ 13 - 4
pc_chat/src/components/chat.vue

@@ -16,7 +16,7 @@
 									  class="el-icon-chat-line-round"></span>
 							</div>
 							<div v-if="!showleaveIcon" style="float: right; cursor: not-allowed">
-								<span  style="font-size: 25px; color: #d6d1c4; margin-top: 13px;" class="el-icon-chat-line-round"></span>
+								<span style="font-size: 25px; color: #d6d1c4; margin-top: 13px;" class="el-icon-chat-line-round"></span>
 							</div>
 
 
@@ -301,7 +301,7 @@
 							<div class="row center allAlignment chattingBox">
 								<div style="height:44px;width:300px;">
 									<textarea  name=""
-											   id=""
+											   id="information"
 											   v-model.trim="information"
 											   cols="30"
 											   rows="1"
@@ -506,7 +506,7 @@
 				timeoutObj: null,
 				serverTimeoutObj: null,
 
-				logo:null, // logo 图片
+				logo:'', // logo 图片
 				Onlinemsg:"", // 系统留言信息
 				showleaveIcon: true, // 留言按钮触发条件
 				jumpName:'', // 根据类型提示售后服务名称
@@ -517,8 +517,14 @@
 			listenEnter(event){
 				console.log(event);
 				if (event.keyCode === 13) {
+					// 判断如果是内容是空 清空内容
+					if(this.information == ""){
+						document.getElementById('information').value = '';
+						return false
+					}
 					this.sendInfo();
-					event.preventDefault() // 阻止浏览器默认换行操作
+					// 阻止浏览器默认换行操作
+					event.preventDefault()
 					return false
 				}
 			},
@@ -609,6 +615,7 @@
 
 			handError(err, file, fileList) {
 				// 获取当前发送时间
+				console.log(err,'上传图片报错!')
 			},
 
 
@@ -989,6 +996,7 @@
 				if (redata.message_type == 'closeBysever') {
 					this.goBack(1);
 					this.machineAndAtl = 10;
+					this.selNum = 0;
 				}
 				// 客服掉线.
 				if (redata.message_type == 'serviceoffline') {
@@ -1653,6 +1661,7 @@
 		resize: none;
 		outline: none;
 		padding-top: 10px;
+		overflow: hidden;
 	}
 
 	.sendOut {