Parcourir la source

用<Text>包裹

visuddhinanda il y a 3 ans
Parent
commit
65a359c5c1
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3 1
      dashboard/src/components/template/MdView.tsx

+ 3 - 1
dashboard/src/components/template/MdView.tsx

@@ -1,4 +1,6 @@
+import { Typography } from "antd";
 import { TCodeConvertor, XmlToReact } from "./utilities";
+const { Text } = Typography;
 
 interface IWidget {
   html?: string;
@@ -11,7 +13,7 @@ const Widget = ({
   convertor,
 }: IWidget) => {
   const jsx = XmlToReact(html, wordWidget, convertor);
-  return <>{jsx}</>;
+  return <Text>{jsx}</Text>;
 };
 
 export default Widget;