From 1e101948372806ea8bd9e5c53fdff48059918900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=98=E6=9C=A8=E3=83=9B=E3=82=A6=E3=82=BF=E3=83=AD?= =?UTF-8?q?=E3=82=A6?= Date: Fri, 9 Oct 2020 13:41:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=9E=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8F=AF=E4=BB=A5=E5=AE=9A=E4=BD=8D=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=9E=E5=A4=8D=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/main.css | 8 ++++++++ index.php | 10 ++++++++-- js/scroll-helper.js | 4 ++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/css/main.css b/css/main.css index e18bb74..fdf0ed7 100755 --- a/css/main.css +++ b/css/main.css @@ -1172,4 +1172,12 @@ audio { padding: 0 8px; color: #0098ff; cursor: pointer; +} + +.quote { + display: block; + padding: 3px 5px; + margin: 3px; + background-color: #efefef; + border-radius: 4px; } \ No newline at end of file diff --git a/index.php b/index.php index 7a007ef..1a0025f 100755 --- a/index.php +++ b/index.php @@ -299,7 +299,10 @@ if (strpos($_SERVER['HTTP_USER_AGENT'], "Triden")) { -
{{item.at.message.type=='text'?item.at.message.content:'[图片]'}}
{{friendlyTime(item.time)}}回复
+
+
{{item.at.message.type=='text'?item.at.message.content:'[图片]'}}
{{friendlyTime(item.time)}} + 回复 +
[查看]`, @@ -2281,6 +2286,7 @@ if (strpos($_SERVER['HTTP_USER_AGENT'], "Triden")) { dangerouslyUseHTMLString: true // offset: 70, }); + } } } diff --git a/js/scroll-helper.js b/js/scroll-helper.js index 36ff60c..cf2f4b4 100755 --- a/js/scroll-helper.js +++ b/js/scroll-helper.js @@ -32,6 +32,10 @@ const scrollFuncs = { scrollToChat: function (msgid) { const chatRoom = document.querySelector('#chat_room_history'); const chat = document.querySelector(`#msgid_${msgid}`); + if (!chat) { + Vue.prototype.$message.error("无法定位到该消息!"); + return; + } chatRoom.scrollTop = chat.offsetTop - 100; chat.style.backgroundColor = 'rgba(251, 114, 153,0.1)'; chat.style.transition = 'all 600ms'; -- Gitee