visuddhinanda 2 лет назад
Родитель
Сommit
89f5ba30ac
1 измененных файлов с 59 добавлено и 78 удалено
  1. 59 78
      dashboard/src/components/article/ArticleEdit.tsx

+ 59 - 78
dashboard/src/components/article/ArticleEdit.tsx

@@ -133,84 +133,65 @@ const ArticleEditWidget = ({
           };
         }}
       >
-        <Tabs
-          items={[
-            {
-              key: "info",
-              label: intl.formatMessage({ id: "course.basic.info.label" }),
-              children: (
-                <>
-                  <ProForm.Group>
-                    <ProFormText
-                      width="md"
-                      name="title"
-                      required
-                      label={intl.formatMessage({
-                        id: "forms.fields.title.label",
-                      })}
-                      rules={[
-                        {
-                          required: true,
-                          message: intl.formatMessage({
-                            id: "forms.message.title.required",
-                          }),
-                        },
-                      ]}
-                    />
-                    <ProFormText
-                      width="md"
-                      name="subtitle"
-                      label={intl.formatMessage({
-                        id: "forms.fields.subtitle.label",
-                      })}
-                    />
-                  </ProForm.Group>
-                  <ProForm.Group>
-                    <LangSelect width="md" />
-                    <PublicitySelect width="md" />
-                  </ProForm.Group>
-                  <ProForm.Group>
-                    <ProFormTextArea
-                      name="summary"
-                      width="lg"
-                      label={intl.formatMessage({
-                        id: "forms.fields.summary.label",
-                      })}
-                    />
-                  </ProForm.Group>
-                </>
-              ),
-            },
-            {
-              key: "content",
-              label: intl.formatMessage({ id: "forms.fields.content.label" }),
-              forceRender: true,
-              children: (
-                <ProForm.Group>
-                  <Form.Item
-                    name="content"
-                    label={
-                      <Space>
-                        {intl.formatMessage({
-                          id: "forms.fields.content.label",
-                        })}
-                        {articleId ? (
-                          <ArticlePrevDrawer
-                            trigger={<Button>预览</Button>}
-                            articleId={articleId}
-                            content={content}
-                          />
-                        ) : undefined}
-                      </Space>
-                    }
-                  >
-                    <MDEditor onChange={(value) => setContent(value)} />
-                  </Form.Item>
-                </ProForm.Group>
-              ),
-            },
-          ]}
-        />
+        <ProForm.Group>
+          <ProFormText
+            width="md"
+            name="title"
+            required
+            label={intl.formatMessage({
+              id: "forms.fields.title.label",
+            })}
+            rules={[
+              {
+                required: true,
+                message: intl.formatMessage({
+                  id: "forms.message.title.required",
+                }),
+              },
+            ]}
+          />
+          <ProFormText
+            width="md"
+            name="subtitle"
+            label={intl.formatMessage({
+              id: "forms.fields.subtitle.label",
+            })}
+          />
+        </ProForm.Group>
+        <ProForm.Group>
+          <LangSelect width="md" />
+          <PublicitySelect width="md" />
+        </ProForm.Group>
+        <ProForm.Group>
+          <ProFormTextArea
+            name="summary"
+            width="lg"
+            label={intl.formatMessage({
+              id: "forms.fields.summary.label",
+            })}
+          />
+        </ProForm.Group>
+        <ProForm.Group>
+          <Form.Item
+            name="content"
+            label={
+              <Space>
+                {intl.formatMessage({
+                  id: "forms.fields.content.label",
+                })}
+                {articleId ? (
+                  <ArticlePrevDrawer
+                    trigger={<Button>预览</Button>}
+                    articleId={articleId}
+                    content={content}
+                  />
+                ) : undefined}
+              </Space>
+            }
+          >
+            <MDEditor onChange={(value) => setContent(value)} />
+          </Form.Item>
+        </ProForm.Group>
       </ProForm>
     </>
   );