更新 README.md
parent
2f333c033e
commit
eb34f5270c
27
README.md
27
README.md
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue