Ver Fonte

:bug: 章节点下一个按钮没变化

visuddhinanda há 2 anos atrás
pai
commit
2fc7115e4e
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      dashboard/src/pages/library/article/show.tsx

+ 4 - 1
dashboard/src/pages/library/article/show.tsx

@@ -310,10 +310,13 @@ const Widget = () => {
               ) => {
               ) => {
                 let url = `/article/${type}/${newId}?mode=${currMode}`;
                 let url = `/article/${type}/${newId}?mode=${currMode}`;
                 searchParams.forEach((value, key) => {
                 searchParams.forEach((value, key) => {
-                  if (key !== "mode") {
+                  if (key !== "mode" && key !== "par") {
                     url += `&${key}=${value}`;
                     url += `&${key}=${value}`;
                   }
                   }
                 });
                 });
+                if (type === "para") {
+                  url += "&par=" + newId.split("-")[1];
+                }
                 if (event.ctrlKey || event.metaKey) {
                 if (event.ctrlKey || event.metaKey) {
                   window.open(fullUrl(url), "_blank");
                   window.open(fullUrl(url), "_blank");
                 } else {
                 } else {