From c339497626d92a4f4d0c6e3126d1bb5cf002dc3e Mon Sep 17 00:00:00 2001 From: master1lan <278457198@qq.com> Date: Sun, 5 Mar 2023 13:31:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?:bug:=20fix(custom):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=95=BF=E5=BA=A6=E8=BF=87=E7=AA=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=BB=BA=E8=AE=AE=E8=B7=91=E4=B8=8A=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routers/layout/search/pc/searchSuggest.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/routers/layout/search/pc/searchSuggest.tsx b/src/routers/layout/search/pc/searchSuggest.tsx index 6a2dd31..58d0115 100644 --- a/src/routers/layout/search/pc/searchSuggest.tsx +++ b/src/routers/layout/search/pc/searchSuggest.tsx @@ -169,6 +169,17 @@ const SuggestPopper: FC = (props) => { return ( Date: Sun, 5 Mar 2023 13:42:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?:bug:=20fix(custom):=20=E4=BF=AE=E5=A4=8Dpc?= =?UTF-8?q?=E7=AB=AF=E6=99=AE=E9=80=9A=E6=90=9C=E7=B4=A2=E6=A0=8F=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=B8=8D=E8=B5=B7?= =?UTF-8?q?=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routers/layout/search/pc/search.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routers/layout/search/pc/search.tsx b/src/routers/layout/search/pc/search.tsx index d23e23c..d3b1768 100644 --- a/src/routers/layout/search/pc/search.tsx +++ b/src/routers/layout/search/pc/search.tsx @@ -6,7 +6,7 @@ import styles from "../search.module.less"; import pcStyles from "./pc.module.less"; import { useBackRef, useSearchMode } from "./hooks"; import { useNavigate } from "react-router-dom"; -import React, { FC, forwardRef, ReactElement, useRef } from "react"; +import React, { FC, forwardRef, Fragment, ReactElement, useRef } from "react"; export default function Search() { const contentRef = useRef(null); const { focused, bind } = useSearchFocus(); @@ -90,7 +90,9 @@ import { InputWrapperContext } from "./context"; //普通搜索 const NormalSearch = () => { - const inputRef = useRef(null); + const inputRef = useRef(null), + handlerFocus = () => inputRef.current?.focus(); + //为什么需要一个 const { bind } = useSearchFocus(), { onBlur } = bind; const [tag] = useURLParams(["tag"]); @@ -110,7 +112,7 @@ const NormalSearch = () => { addPCTagHistory(value); }; return ( - <> +
{ /> - +
); }; From b1a33acfe475eceec56e2887797d2c87aa854156 Mon Sep 17 00:00:00 2001 From: master1lan Date: Sun, 5 Mar 2023 06:14:35 +0000 Subject: [PATCH 3/3] chore(release): 1.1.1 --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a41ada..ba35f76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## 1.1.1 (2023-03-05) + + +### 🐛 Bug Fixes + +* **custom**: 修复pc端普通搜索栏清除历史记录不起效的问题 ([8856629](https://vlink.dev/EOEFANS/eoefans-web/commits/8856629)) + + + # 1.1.0 (2023-03-05) diff --git a/package.json b/package.json index 3daab71..bb9fd2c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eoefans-web", - "version": "1.1.0", + "version": "1.1.1", "type": "module", "scripts": { "dev": "vite --config ./config/vite.dev.config.ts",