shaogen1995 пре 2 година
родитељ
комит
f45058cad2
1 измењених фајлова са 1 додато и 6 уклоњено
  1. 1 6
      后台/src/components/Z_RichText/index.tsx

+ 1 - 6
后台/src/components/Z_RichText/index.tsx

@@ -67,11 +67,6 @@ function RichText({ check, dirCode, isLook, myUrl }: Props, ref: any) {
     } else return false;
   }, [editorValue]);
 
-  // 富文本信息改变的回调
-  const handleChange = useCallback((e: any) => {
-    setEditorValue(e);
-  }, []);
-
   const myInput = useRef<HTMLInputElement>(null);
 
   // 上传图片
@@ -154,7 +149,7 @@ function RichText({ check, dirCode, isLook, myUrl }: Props, ref: any) {
           readOnly={isLook}
           placeholder="请输入内容"
           value={editorValue}
-          onChange={(e) => handleChange(e)}
+          onChange={(e) => setEditorValue(e)}
           imageControls={["remove"]}
         />
       </div>