Ver Fonte

placeholder move to textareaProps in MDEditor

bhikkhu-kosalla-china há 1 ano atrás
pai
commit
6214c6c71e

+ 9 - 7
dashboard/src/components/discussion/DiscussionCreate.tsx

@@ -228,13 +228,15 @@ const DiscussionCreateWidget = ({
                   }
                 >
                   <MDEditor
-                    placeholder={
-                      "问题的详细描述" +
-                      (typeof currParent !== "undefined" &&
-                      typeof topic?.tplId !== "undefined"
-                        ? ""
-                        : "(选填)")
-                    }
+                    textareaProps={{
+                      placeholder:
+                        "问题的详细描述" +
+                        (typeof currParent !== "undefined" &&
+                        typeof topic?.tplId !== "undefined"
+                          ? ""
+                          : "(选填)"),
+                      maxLength: 10000,
+                    }}
                   />
                 </Form.Item>
               ) : (