Explorar el Código

显示单一段落增加scrollToTop

visuddhinanda hace 2 años
padre
commit
1f7fdfb37c
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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 { fullUrl } from "../../utils";
 import { useIntl } from "react-intl";
 import { useIntl } from "react-intl";
 import { addToCart } from "./SentEdit/SentCart";
 import { addToCart } from "./SentEdit/SentCart";
+import { scrollToTop } from "../../pages/library/article/show";
 
 
 interface IWidgetParaHandleCtl {
 interface IWidgetParaHandleCtl {
   book: number;
   book: number;
@@ -106,6 +107,7 @@ export const ParaHandleCtl = ({
     switch (e.key) {
     switch (e.key) {
       case "solo":
       case "solo":
         navigate(url);
         navigate(url);
+        scrollToTop();
         break;
         break;
       case "solo-in-tab":
       case "solo-in-tab":
         window.open(fullUrl(url), "_blank");
         window.open(fullUrl(url), "_blank");