Przeglądaj źródła

无title不显示title

visuddhinanda 2 lat temu
rodzic
commit
38c94623dd
1 zmienionych plików z 12 dodań i 10 usunięć
  1. 12 10
      dashboard/src/components/discussion/DiscussionShow.tsx

+ 12 - 10
dashboard/src/components/discussion/DiscussionShow.tsx

@@ -146,16 +146,18 @@ const DiscussionShowWidget = ({
       size="small"
       title={
         <Space direction="vertical">
-          <Text
-            strong
-            onClick={(e) => {
-              if (typeof onSelect !== "undefined") {
-                onSelect(e, data);
-              }
-            }}
-          >
-            {data.title}
-          </Text>
+          {data.title ? (
+            <Text
+              strong
+              onClick={(e) => {
+                if (typeof onSelect !== "undefined") {
+                  onSelect(e, data);
+                }
+              }}
+            >
+              {data.title}
+            </Text>
+          ) : undefined}
           <Text type="secondary">
             <Space>
               {data.user.nickName}