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

问答广场新增去除保存按钮

sunsheng 6 месяцев назад
Родитель
Сommit
faa49f9e30
1 измененных файлов с 7 добавлено и 5 удалено
  1. 7 5
      src/pages/deepseek/questionAnswer/info/index.tsx

+ 7 - 5
src/pages/deepseek/questionAnswer/info/index.tsx

@@ -155,7 +155,6 @@ const QuestionAnswerInfo: React.FC = () => {
             await api.fetchDetail(id);
         }
     }
-
     React.useEffect(() => {
         const id = location?.state?.id;
         init(id);
@@ -679,7 +678,8 @@ const QuestionAnswerInfo: React.FC = () => {
                                 >
                                     取消
                                 </Button>
-                                <Button
+                                {
+                                    appId&&(<Button
                                     type='primary'
                                     className='btn-cancel'
                                     onClick={() => {
@@ -687,7 +687,9 @@ const QuestionAnswerInfo: React.FC = () => {
                                     }}
                                 >
                                     保存
-                                </Button>
+                                </Button>)
+                                }
+                                
                                 {createFlag && (
                                     <Button
                                         type='primary'
@@ -1036,9 +1038,9 @@ const QuestionAnswerInfo: React.FC = () => {
                                     </div>
                                 </div>
                             </Splitter.Panel>
-                            <Splitter.Panel defaultSize="30%">
+                            { appId&&(<Splitter.Panel defaultSize="30%">
                                 <Chat appId={appId} />
-                            </Splitter.Panel>
+                            </Splitter.Panel>)}
                         </Splitter>
                     </div>
                 </Form>