+
+ {/**搜索输入框 */}
+ {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ const searchText = e.currentTarget.value;
+ if (searchText.length > 0) {
+ const result = doSearch(searchText);
+ setSearchResults(result);
+ }
+ }
+ }}
+ />
+
+
+
+ {searchResults.map((item) => (
+
+ {/** 搜索匹配的文本 */}
+
+
+
{item.name}
+ {item.content.slice(0, 70)}
+
+
+ {/** 操作按钮 */}
+
+ }
+ text={Locale.SearchChat.Item.View}
+ onClick={() => {
+ navigate(Path.Chat);
+ selectSession(item.id);
+ }}
+ />
+
+
+ ))}
+
+