Browse Source

Merge pull request #2149 from bhikkhu-kosalla-china/agile

placeholder move to textareaProps in MDEditor
Bhikkhu China Kosalla 1 year ago
parent
commit
d6e0e68bd4

+ 3 - 3
dashboard/src/components/dict/UserDictList.tsx

@@ -261,7 +261,7 @@ const UserDictListWidget = ({
             }),
             dataIndex: "word",
             key: "word",
-            tip: "单词过长会自动收缩",
+            tooltip: "单词过长会自动收缩",
             ellipsis: true,
           },
           {
@@ -302,7 +302,7 @@ const UserDictListWidget = ({
             }),
             dataIndex: "meaning",
             key: "meaning",
-            tip: "意思过长会自动收缩",
+            tooltip: "意思过长会自动收缩",
             ellipsis: true,
             search: false,
           },
@@ -313,7 +313,7 @@ const UserDictListWidget = ({
             dataIndex: "note",
             key: "note",
             search: false,
-            tip: "注释过长会自动收缩",
+            tooltip: "注释过长会自动收缩",
             ellipsis: true,
           },
           {

+ 3 - 3
dashboard/src/components/dict/UserDictTable.tsx

@@ -128,7 +128,7 @@ const UserDictTableWidget = ({
             }),
             dataIndex: "word",
             key: "word",
-            tip: "单词过长会自动收缩",
+            tooltip: "单词过长会自动收缩",
             ellipsis: true,
           },
           {
@@ -169,7 +169,7 @@ const UserDictTableWidget = ({
             }),
             dataIndex: "meaning",
             key: "meaning",
-            tip: "意思过长会自动收缩",
+            tooltip: "意思过长会自动收缩",
             ellipsis: true,
             search: false,
           },
@@ -180,7 +180,7 @@ const UserDictTableWidget = ({
             dataIndex: "note",
             key: "note",
             search: false,
-            tip: "注释过长会自动收缩",
+            tooltip: "注释过长会自动收缩",
             ellipsis: true,
           },
           {

+ 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>
               ) : (

+ 3 - 3
dashboard/src/components/term/TermList.tsx

@@ -106,7 +106,7 @@ const TermListWidget = ({ studioName, channelId }: IWidget) => {
             }),
             dataIndex: "word",
             key: "word",
-            tip: "单词过长会自动收缩",
+            tooltip: "单词过长会自动收缩",
             ellipsis: true,
           },
           {
@@ -140,7 +140,7 @@ const TermListWidget = ({ studioName, channelId }: IWidget) => {
             }),
             dataIndex: "meaning2",
             key: "meaning2",
-            tip: "意思过长会自动收缩",
+            tooltip: "意思过长会自动收缩",
             ellipsis: true,
           },
           {
@@ -150,7 +150,7 @@ const TermListWidget = ({ studioName, channelId }: IWidget) => {
             dataIndex: "note",
             key: "note",
             search: false,
-            tip: "注释过长会自动收缩",
+            tooltip: "注释过长会自动收缩",
             ellipsis: true,
           },
           {