소스 검색

显示单一段落增加scrollToTop

visuddhinanda 2 년 전
부모
커밋
1f7fdfb37c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      dashboard/src/components/template/ParaHandle.tsx

+ 2 - 0
dashboard/src/components/template/ParaHandle.tsx

@@ -3,6 +3,7 @@ import { useNavigate, useSearchParams } from "react-router-dom";
 import { fullUrl } from "../../utils";
 import { useIntl } from "react-intl";
 import { addToCart } from "./SentEdit/SentCart";
+import { scrollToTop } from "../../pages/library/article/show";
 
 interface IWidgetParaHandleCtl {
   book: number;
@@ -106,6 +107,7 @@ export const ParaHandleCtl = ({
     switch (e.key) {
       case "solo":
         navigate(url);
+        scrollToTop();
         break;
       case "solo-in-tab":
         window.open(fullUrl(url), "_blank");