Przeglądaj źródła

reactor:辅助坐席优化(手动控制自动滚动到底部);

zhangchong 1 rok temu
rodzic
commit
87ee6899db
1 zmienionych plików z 23 dodań i 20 usunięć
  1. 23 20
      src/views/todo/seats/accept/Voice-assistant.vue

+ 23 - 20
src/views/todo/seats/accept/Voice-assistant.vue

@@ -251,26 +251,29 @@ const fillSingle = () => {
 		})
 		.catch(() => {});
 };
-// setInterval(() => {
-// 	messageList.value.push({
-// 		body: {
-// 			content: {
-// 				callSentenceInfo: {
-// 					text: '你好,我是小智,有什么可以帮您的吗?',
-// 					role: 'agent',
-// 				},
-// 				calledNumber: '1009',
-// 				callerNumber: '19136073037',
-// 			},
-// 		},
-// 		timestamps: new Date().getTime(),
-// 	});
-// }, 1000);
-onMounted(() => {
-	scrollbarRef.value.wrapRef.addEventListener('mousewheel', () => {
-		stopScroll();
+/*setInterval(() => {
+	messageList.value.push({
+		body: {
+			content: {
+				callSentenceInfo: {
+					text: '你好,我是小智,有什么可以帮您的吗?',
+					role: 'agent',
+				},
+				calledNumber: '1009',
+				callerNumber: '19136073037',
+			},
+		},
+		timestamps: new Date().getTime(),
 	});
-});
+}, 1000);*/
+watch(
+	() => scrollbarRef.value?.wrapRef,
+	() => {
+		scrollbarRef.value?.wrapRef.addEventListener('mousewheel', () => {
+			stopScroll();
+		});
+	}
+);
 </script>
 
 <style scoped lang="scss">
@@ -282,7 +285,7 @@ onMounted(() => {
 	.keep-scroll {
 		position: absolute;
 		right: 10px;
-		bottom: 40px;
+		bottom: 30px;
 		z-index: 100;
 	}
 	.chat-box {