Răsfoiți Sursa

注释书横向排版article_shell宽度变为100%

visuddhinanda 4 luni în urmă
părinte
comite
006fe43105

+ 8 - 2
dashboard-v4/dashboard/src/pages/library/article/show.tsx

@@ -58,6 +58,7 @@ import PrPull from "../../../components/corpus/PrPull";
 import NotificationIcon from "../../../components/notification/NotificationIcon";
 import SentCart from "../../../components/template/SentEdit/SentCart";
 import { useIntl } from "react-intl";
+import { useSetting } from "../../../hooks/useSetting";
 
 export const scrollToTop = () => {
   document.getElementById("article-root")?.scrollIntoView();
@@ -93,6 +94,8 @@ const Widget = () => {
 
   const paraChange = useAppSelector(paraParam);
 
+  const cLayout = useSetting("setting.layout.commentary");
+
   useEffect(() => {
     if (typeof paraChange === "undefined") {
       return;
@@ -358,7 +361,10 @@ const Widget = () => {
         </Affix>
         <div
           key="main"
-          style={{ width: `calc(100% - ${rightBarWidth})`, display: "flex" }}
+          style={{
+            width: `calc(100% - ${rightBarWidth})`,
+            display: "flex",
+          }}
         >
           <div
             className="article_shell"
@@ -366,7 +372,7 @@ const Widget = () => {
             style={{
               marginLeft: "auto",
               marginRight: "auto",
-              width: 1100,
+              width: cLayout === "column" ? 1200 : "100%",
               maxWidth: currMode === "read" ? 750 : "unset",
             }}
           >