Explorar o código

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

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
f9ac8a8c31
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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 { useState, useEffect } from "react";
 import { useIntl } from "react-intl";
 import { useIntl } from "react-intl";
-import { Card, message } from "antd";
+import { Card, message, Typography } from "antd";
 
 
 import { get } from "../../request";
 import { get } from "../../request";
 import { ICommentListResponse } from "../api/Comment";
 import { ICommentListResponse } from "../api/Comment";
@@ -80,7 +80,11 @@ const CommentListCardWidget = ({
   }, [intl, resId, topicId]);
   }, [intl, resId, topicId]);
 
 
   if (typeof resId === "undefined" && typeof topicId === "undefined") {
   if (typeof resId === "undefined" && typeof topicId === "undefined") {
-    return <div>该资源尚未创建,不能发表讨论。</div>;
+    return (
+      <Typography.Paragraph>
+        该资源尚未创建,不能发表讨论。
+      </Typography.Paragraph>
+    );
   }
   }
 
 
   return (
   return (