@hzab/form-render 1.6.10 → 1.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,14 +1,18 @@
1
+ # @hzab/form-render@1.6.11
2
+
3
+ feat: editor添加配置merage
4
+
1
5
  # @hzab/form-render@1.6.10
2
6
 
3
7
  feat: 富文本编辑器实例像外暴露
4
8
 
5
9
  # @hzab/form-render@1.6.9
6
10
 
7
- feat: PersonnelSelect组件
11
+ feat: PersonnelSelect 组件
8
12
 
9
13
  # @hzab/form-render@1.6.8
10
14
 
11
- feat:富文本组件添加私有化部署文件上传与oss上传的区分
15
+ feat:富文本组件添加私有化部署文件上传与 oss 上传的区分
12
16
 
13
17
  # @hzab/form-render@1.6.7
14
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/form-render",
3
- "version": "1.6.10",
3
+ "version": "1.6.11",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -7,7 +7,7 @@ import { handlePreviewUrls } from "../Upload/common/OfflineUpload";
7
7
  import "./index.less";
8
8
  import { Spin, message } from "antd";
9
9
  import { connect, mapProps, observer, useField } from "@formily/react";
10
-
10
+ import { merge } from "lodash";
11
11
  interface AnyObject {
12
12
  [key: string]: any;
13
13
  }
@@ -136,9 +136,37 @@ export const RichEditor = observer(function (props: PropsType, parentRef) {
136
136
  customUpload,
137
137
  },
138
138
  },
139
- ...editorConfig,
139
+ ...merge(editorConfig, {
140
+ MENU_CONF: {
141
+ uploadImage: {
142
+ // form-data fieldName ,默认值 'wangeditor-uploaded-image'
143
+ fieldName: "wangeditor-uploaded-image",
144
+ // 单个文件的最大体积限制,默认为 2M
145
+ maxFileSize: 1 * 1024 * 1024, // 1M
146
+ // 最多可上传几个文件,默认为 100
147
+ maxNumberOfFiles: 1,
148
+ // 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
149
+ allowedFileTypes: ["image/*"],
150
+ // 跨域是否传递 cookie ,默认为 false
151
+ withCredentials: false,
152
+ // 超时时间,默认为 10 秒
153
+ timeout: 5 * 1000, // 5 秒
154
+ customUpload,
155
+ },
156
+ uploadVideo: {
157
+ // form-data fieldName ,默认值 'wangeditor-uploaded-image'
158
+ fieldName: "wangeditor-uploaded-video",
159
+ // 最多可上传几个文件,默认为 100
160
+ maxNumberOfFiles: 1,
161
+ // 选择文件时的类型限制,默认为 ['image/*'] 。如不想限制,则设置为 []
162
+ allowedFileTypes: ["video/*"],
163
+ // 跨域是否传递 cookie ,默认为 false
164
+ withCredentials: false,
165
+ customUpload,
166
+ },
167
+ },
168
+ }),
140
169
  };
141
-
142
170
  const onEditorChange = (e) => {
143
171
  const content = e.getHtml();
144
172
  setHtml(content);