Просмотр исходного кода

资源不能创建提示用<Typography.Paragraph> 包裹

visuddhinanda 2 лет назад
Родитель
Сommit
f9ac8a8c31
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      dashboard/src/components/comment/CommentListCard.tsx

+ 6 - 2
dashboard/src/components/comment/CommentListCard.tsx

@@ -1,6 +1,6 @@
 import { useState, useEffect } from "react";
 import { useIntl } from "react-intl";
-import { Card, message } from "antd";
+import { Card, message, Typography } from "antd";
 
 import { get } from "../../request";
 import { ICommentListResponse } from "../api/Comment";
@@ -80,7 +80,11 @@ const CommentListCardWidget = ({
   }, [intl, resId, topicId]);
 
   if (typeof resId === "undefined" && typeof topicId === "undefined") {
-    return <div>该资源尚未创建,不能发表讨论。</div>;
+    return (
+      <Typography.Paragraph>
+        该资源尚未创建,不能发表讨论。
+      </Typography.Paragraph>
+    );
   }
 
   return (