Browse Source

:globe_with_meridians: 成功

visuddhinanda 2 years ago
parent
commit
f60f890c98
1 changed files with 3 additions and 3 deletions
  1. 3 3
      dashboard/src/components/dict/MyCreate.tsx

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

@@ -148,7 +148,6 @@ const MyCreateWidget = ({ word }: IWidget) => {
           loading={loading}
           loading={loading}
           icon={<SaveOutlined />}
           icon={<SaveOutlined />}
           onClick={() => {
           onClick={() => {
-            console.log("edit word", editWord);
             setLoading(true);
             setLoading(true);
             const data = [
             const data = [
               {
               {
@@ -163,7 +162,6 @@ const MyCreateWidget = ({ word }: IWidget) => {
                 confidence: editWord.confidence,
                 confidence: editWord.confidence,
               },
               },
             ];
             ];
-            console.log("wbw data", data);
             post<IUserDictCreate, IDictResponse>("/v2/userdict", {
             post<IUserDictCreate, IDictResponse>("/v2/userdict", {
               view: "dict",
               view: "dict",
               data: JSON.stringify(data),
               data: JSON.stringify(data),
@@ -173,7 +171,9 @@ const MyCreateWidget = ({ word }: IWidget) => {
               })
               })
               .then((json) => {
               .then((json) => {
                 if (json.ok) {
                 if (json.ok) {
-                  message.success("成功");
+                  message.success(
+                    intl.formatMessage({ id: "flashes.success" })
+                  );
                 } else {
                 } else {
                   message.error(json.message);
                   message.error(json.message);
                 }
                 }