diff --git a/README.md b/README.md index e39826c..f696486 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,30 @@ return ( ) ``` + +### resources\admin-views\src\components\AmisRender\CustomComponents\components\WangEditor\index.tsx + +```tsx +// 编辑器配置 +const editorConfig: Partial = { + placeholder: props.placeholder, + readOnly: props.disabled || props.static, + autoFocus: props.autoFocus, + maxLength: props.maxLength, + MENU_CONF: { + uploadImage: { + server: props.uploadImageServer, + maxFileSize: props.uploadImageMaxSize || (1024 * 1024 * 2), + maxNumberOfFiles: props.uploadImageMaxNumber || 100, + headers: { + Authorization: `Bearer ${token}` + } + }, + uploadVideo: { + server: props.uploadVideoServer, + maxFileSize: props.uploadVideoMaxSize || (1024 * 1024 * 10), + maxNumberOfFiles: props.uploadVideoMaxNumber || 10, + } + } +} +```