From 3b9035d54f740b9ce19785252821c24310055acd Mon Sep 17 00:00:00 2001 From: Lei OT Date: Wed, 8 May 2024 10:19:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=8F=91=E9=80=81=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Conversations/Online/InputComposer.jsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/Conversations/Online/InputComposer.jsx b/src/views/Conversations/Online/InputComposer.jsx index 8880d39..55547ab 100644 --- a/src/views/Conversations/Online/InputComposer.jsx +++ b/src/views/Conversations/Online/InputComposer.jsx @@ -41,6 +41,11 @@ const InputComposer = ({ mobile }) => { const isExpired = !isEmpty(currentConversation.conversation_expiretime) ? dayjs(currentConversation.conversation_expiretime).add(8, 'hours').isBefore(dayjs()) : true; const gt24h = !isEmpty(currentConversation.last_received_time) ? dayjs().diff(dayjs(currentConversation.last_received_time), 'hour') > 24 : true; const textabled = talkabled && (!(gt24h && isExpired)); // 只要有一个时间没过期, 目前未知明确规则 + const textPlaceHolder = !textabled + ? '' + : mobile === undefined + ? 'Enter 发送, Shift+Enter 换行' + : 'Enter 换行'; const textInputRef = useRef(null); const [textContent, setTextContent] = useState(''); @@ -272,7 +277,7 @@ const InputComposer = ({ mobile }) => { autoSize={{ minRows: 2, maxRows: 6 }} /> - + @@ -283,7 +288,10 @@ const InputComposer = ({ mobile }) => {