Browse Source

评论默认展示内容

洪海涛 4 years ago
parent
commit
156d21b13c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/components/actionDynamic/index.js

+ 3 - 3
src/components/actionDynamic/index.js

@@ -5,7 +5,7 @@ import styles from './style.module.less'
 const { TabPane } = Tabs
 const { TextArea } = Input;
 export default function ActionDynamic(props) {
-  const { commentsList = [], changeRecordList = null, executionUseCase = null, onPulishComments, getComListAndLogList, showLog = true } = props
+  const { commentsList = [], changeRecordList = null, executionUseCase = null, isShowComments = true, onPulishComments, getComListAndLogList, showLog = true } = props
   const [commentText, setCommentText] = useState('')
   function back(isSuccess = true) {
     if(isSuccess) {
@@ -15,7 +15,7 @@ export default function ActionDynamic(props) {
   return (
     <div className={styles.actionDynamic}>
       <Tabs defaultActiveKey="1" animated={false} onChange={(e) => getComListAndLogList && getComListAndLogList(e) }>
-        <TabPane tab="评论" key="1">
+        {isShowComments && <TabPane tab="评论" key="1">
           <div className={styles.tabbox}>
           {
             commentsList.map((item, index) => (
@@ -35,7 +35,7 @@ export default function ActionDynamic(props) {
           <div className={styles.btn}>
             <Button type="primary" onClick={() => onPulishComments(commentText, (isSuccess) => back(isSuccess))}>发表评论</Button>
           </div>
-        </TabPane>
+        </TabPane>}
         {changeRecordList && <TabPane tab="变更记录" key="2">
           <div className={styles.tabbox}>
             {