tianyunperfect преди 4 години
родител
ревизия
4bf7f1537a
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/pages/Memory/components/UpdateForm.tsx

+ 2 - 0
src/pages/Memory/components/UpdateForm.tsx

@@ -64,6 +64,7 @@ const dealImage = (base64: string, targetWidth: number, targetSize: number, call
  * 压缩html中的base64
  */
 const dealHtml = (html: string,callBack:Function) => {
+  callBack(html);
   const htmlDoc = new DOMParser().parseFromString(html, "text/html");
   const imgs = htmlDoc.querySelectorAll("img");
   for (let i = 0; i < imgs.length; i += 1) {
@@ -144,6 +145,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
             /**
              * 判断
              */
+            console.log(formValues);
             if (getTextFromHtml(formValues.front + formValues.back).length <= 1) {
               message.info("你是不是没有输入文字?");
               return;