فهرست منبع

有 resId 才显示列表

visuddhinanda 3 سال پیش
والد
کامیت
72e2b26e3a
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      dashboard/src/components/comment/CommentBox.tsx

+ 10 - 2
dashboard/src/components/comment/CommentBox.tsx

@@ -56,13 +56,21 @@ const Widget = ({ trigger, resId, resType, onCommentCountChange }: IWidget) => {
           }}
           }}
         />
         />
         <Drawer
         <Drawer
-          title="Two-level Drawer"
+          title="回答"
           width={480}
           width={480}
           closable={false}
           closable={false}
           onClose={onChildrenDrawerClose}
           onClose={onChildrenDrawerClose}
           open={childrenDrawer}
           open={childrenDrawer}
         >
         >
-          <CommentTopic comment={topicComment} resId="" />
+          {resId && resType ? (
+            <CommentTopic
+              comment={topicComment}
+              resId={resId}
+              resType={resType}
+            />
+          ) : (
+            <></>
+          )}
         </Drawer>
         </Drawer>
       </Drawer>
       </Drawer>
     </>
     </>