From eb34f5270c48c7cccdd6bd8a144c499d9f84aeae Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Mon, 25 Sep 2023 15:46:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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, + } + } +} +```