7.15 富文本修改

This commit is contained in:
jl-zhoujl2
2022-07-15 16:36:06 +08:00
parent 3ed9809afe
commit 6346cc8f8f
2 changed files with 14 additions and 9 deletions

View File

@ -3,7 +3,7 @@ import AlertMenu from './fullScreen'
import E from 'wangeditor';
import { Button, message, Spin } from 'antd';
import { pictureDisplayPath, uploadAttachmentPath } from '@/utils/DownloadUtils';
import { isEmpty } from '@/utils/CommonUtils';
import { isEmpty, isNotEmpty } from '@/utils/CommonUtils';
import { createNewFileBid } from '@/services/download_';
interface WangType {
@ -194,21 +194,18 @@ const BraftText: React.FC<WangType> = (props) => {
willCreate = false;
}
// 重新设置编辑器内容
echo && editor.txt.html(echo);
return () => {
// 组件销毁时销毁编辑器 注class写法需要在componentWillUnmount中调用
editor.destroy()
setLoading(false);
setContent('');
}
}, [echo]);
}, []);
useEffect(() => {
// 重新设置编辑器内容
value && editor.txt.html(value);
}, [value])
echo && editor.txt.html(echo);
}, [echo])
/**
*提供给父级的内容
**/