Răsfoiți Sursa

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

visuddhinanda 4 luni în urmă
părinte
comite
006fe43105
1 a modificat fișierele cu 8 adăugiri și 2 ștergeri
  1. 8 2
      dashboard-v4/dashboard/src/pages/library/article/show.tsx

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