1
0
Fork 0

更新 README.md

panliang 2023-09-25 15:46:27 +08:00
parent 2f333c033e
commit eb34f5270c
1 changed files with 27 additions and 0 deletions

View File

@ -22,3 +22,30 @@ return (
</> </>
) )
``` ```
### resources\admin-views\src\components\AmisRender\CustomComponents\components\WangEditor\index.tsx
```tsx
// 编辑器配置
const editorConfig: Partial<IEditorConfig> = {
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,
}
}
}
```