Browse Source

:bug: 黑色主题下文字颜色不对

visuddhinanda 3 years ago
parent
commit
233c57e153
1 changed files with 7 additions and 2 deletions
  1. 7 2
      dashboard/src/components/template/SentRead.tsx

+ 7 - 2
dashboard/src/components/template/SentRead.tsx

@@ -1,5 +1,5 @@
 import { useEffect, useRef, useState } from "react";
 import { useEffect, useRef, useState } from "react";
-import { Tooltip, Button } from "antd";
+import { Tooltip, Button, Typography } from "antd";
 
 
 import { useAppSelector } from "../../hooks";
 import { useAppSelector } from "../../hooks";
 import {
 import {
@@ -13,6 +13,7 @@ import { ISentence } from "./SentEdit";
 import MdView from "./MdView";
 import MdView from "./MdView";
 import store from "../../store";
 import store from "../../store";
 import { push } from "../../reducers/sentence";
 import { push } from "../../reducers/sentence";
+const { Text } = Typography;
 
 
 interface IWidgetSentReadFrame {
 interface IWidgetSentReadFrame {
   origin?: ISentence[];
   origin?: ISentence[];
@@ -99,7 +100,11 @@ const SentReadFrame = ({
         <div style={{ flex: "5" }}>
         <div style={{ flex: "5" }}>
           {translation?.map((item, id) => {
           {translation?.map((item, id) => {
             if (item.html.indexOf("<hr>") >= 0) console.log(item.html);
             if (item.html.indexOf("<hr>") >= 0) console.log(item.html);
-            return <MdView key={id} html={item.html} />;
+            return (
+              <Text key={id}>
+                <MdView html={item.html} />
+              </Text>
+            );
           })}
           })}
         </div>
         </div>
       </div>
       </div>