From 58254d3e8ffe3ffc83cca32eded46dccee95bde3 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 27 Oct 2025 22:31:41 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=EF=BC=9A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Community/components/UnifiedSearchBox.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/Community/components/UnifiedSearchBox.js b/src/views/Community/components/UnifiedSearchBox.js index fd2a66ea..429428b9 100644 --- a/src/views/Community/components/UnifiedSearchBox.js +++ b/src/views/Community/components/UnifiedSearchBox.js @@ -523,7 +523,11 @@ const UnifiedSearchBox = ({ onFocus={onSearchFocus} options={stockOptions} placeholder="请输入股票代码/股票名称/相关话题" - onPressEnter={handleMainSearch} + onKeyDown={(e) => { + if (e.key === 'Enter') { + handleMainSearch(); + } + }} style={{ flex: 1 }} size="large" notFoundContent={inputValue && stockOptions.length === 0 ? "未找到匹配的股票" : null}