@quansitech/antd-admin 1.0.0 → 1.1.0

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.
Files changed (41) hide show
  1. package/components/Column/Cascader.tsx +78 -78
  2. package/components/Column/File.tsx +165 -167
  3. package/components/Column/Image.tsx +76 -76
  4. package/components/{Table/Option → Column/Readonly/Action}/Link.tsx +77 -67
  5. package/components/{Table/Option → Column/Readonly/Action}/types.d.ts +5 -4
  6. package/components/Column/Readonly/Action.tsx +80 -0
  7. package/components/Column/Readonly/Cascader.tsx +50 -50
  8. package/components/Column/Readonly/File.tsx +52 -53
  9. package/components/Column/Readonly/Image.tsx +38 -77
  10. package/components/Column/Readonly/Ueditor.tsx +18 -0
  11. package/components/Column/Readonly/types.d.ts +9 -8
  12. package/components/Column/Ueditor.tsx +313 -313
  13. package/components/Column/types.d.ts +29 -28
  14. package/components/Form/Action/Button.tsx +128 -124
  15. package/components/Form/Action/types.d.ts +5 -4
  16. package/components/Form/Actions.tsx +38 -34
  17. package/components/Form.tsx +176 -170
  18. package/components/FormContext.ts +8 -7
  19. package/components/Layout/New.tsx +252 -0
  20. package/components/Layout.tsx +52 -237
  21. package/components/LayoutContext.ts +25 -25
  22. package/components/ModalContext.ts +15 -15
  23. package/components/Table/Action/Button.tsx +88 -88
  24. package/components/Table/Action/StartEditable.tsx +58 -58
  25. package/components/Table/Action/types.d.ts +7 -6
  26. package/components/Table/ToolbarActions.tsx +43 -38
  27. package/components/Table.scss +4 -7
  28. package/components/Table.tsx +280 -279
  29. package/components/TableContext.ts +14 -13
  30. package/components/Tabs.tsx +71 -71
  31. package/lib/container.ts +83 -81
  32. package/lib/customRule.ts +9 -9
  33. package/lib/global.ts +10 -10
  34. package/lib/helpers.tsx +145 -149
  35. package/lib/http.ts +73 -73
  36. package/lib/schemaHandler.ts +121 -121
  37. package/lib/upload.ts +177 -177
  38. package/lib/writeExtra.js +31 -0
  39. package/package.json +2 -6
  40. package/readme.md +151 -128
  41. package/components/Column/Readonly/Option.tsx +0 -58
@@ -1,314 +1,314 @@
1
- import {ColumnProps} from "./types";
2
- import {Component} from "react";
3
- import {createScript, filterObjectKeys} from "../../lib/helpers";
4
- import {Spin} from "antd";
5
- import {ModalContext, ModalContextProps} from "../ModalContext";
6
- import uniqueId from "lodash/uniqueId";
7
- import {FormContext, FormContextProps} from "../FormContext";
8
-
9
- declare global {
10
- interface Window {
11
- UE: any,
12
- UE_LOADING_PROMISE: Promise<any>,
13
- }
14
- }
15
-
16
- export default class Ueditor extends Component<ColumnProps & {
17
- fieldProps: {
18
- ueditorPath: string,
19
- }
20
- }, any> {
21
- modalContext = {} as ModalContextProps
22
- formContext = {} as FormContextProps
23
-
24
- editor: any = null
25
- catching = false
26
- containerRef: HTMLElement | null = null
27
- state = {
28
- loading: true,
29
- containerId: uniqueId('ueditor_'),
30
- width: '',
31
- }
32
-
33
-
34
- componentDidMount() {
35
- this.setState({
36
- width: this.containerRef?.offsetWidth ? `${this.containerRef?.offsetWidth}px` : '100%'
37
- })
38
-
39
- this.props.rules?.push({
40
- validator: async (rule: any, value: any) => {
41
- if (this.catching) {
42
- throw new Error('正在抓取图片')
43
- }
44
- return true
45
- },
46
- })
47
-
48
- if (!window.UE && !window.UE_LOADING_PROMISE) {
49
- window.UE_LOADING_PROMISE =
50
- createScript(this.props.fieldProps.configJsPath || this.props.fieldProps.ueditorPath + '/ueditor.config.js')
51
- .then(() => {
52
- return createScript(this.props.fieldProps.ueditorPath + '/ueditor.all.js')
53
- })
54
- .then(() => {
55
- return createScript(this.props.fieldProps.ueditorPath + '/lang/zh-cn/zh-cn.js')
56
- })
57
- }
58
-
59
- window.UE_LOADING_PROMISE.then(() => {
60
- let that = this
61
- window.UE.plugins['forceCatchRemoteImg'] = function () {
62
- if (this.options.forcecatchremote) {
63
- this.addListener("afterpaste", function (t: any, a: any) {
64
- const load_src = that.props.fieldProps.ueditorPath + '/img/load.gif';
65
- const domUtils = window.UE.dom.domUtils;
66
-
67
- const parser = new DOMParser();
68
- const pasteDom = parser.parseFromString(a.html, "text/html");
69
-
70
- // @ts-ignore
71
- const allImgs = domUtils.getElementsByTagName(this.document, "img");
72
- const imgs = domUtils.getElementsByTagName(pasteDom, "img");
73
-
74
- let notCatch = (src: string) => {
75
- if (src.indexOf(location.host) !== -1) {
76
- return true;
77
- }
78
- if (/(^\.)|(^\/)/.test(src)) {
79
- return true;
80
- }
81
- return src.indexOf('img_catch_success') !== -1;
82
-
83
- }
84
-
85
- let catchGo = false;
86
- for (let i = 0; i < imgs.length; i++) {
87
- if (notCatch(imgs[i].src)) {
88
- continue
89
- }
90
- for (let l = 0; l < allImgs.length; l++) {
91
- if (allImgs[l].src == imgs[i].src) {
92
- catchGo = true;
93
- domUtils.setAttributes(allImgs[l], {
94
- "src": load_src,
95
- "_src": allImgs[l].src
96
- });
97
- }
98
- }
99
- }
100
-
101
- if (catchGo) {
102
- // $('.submit').trigger('startHandlePostData', '正在抓取图片');
103
- that.catching = true
104
- that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
105
- }
106
- });
107
-
108
- this.addListener("catchremotesuccess", function () {
109
- that.catching = false
110
- that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
111
- // $('.submit').trigger('endHandlePostData');
112
- });
113
- }
114
-
115
- }
116
-
117
- // plugins/insert_richtext.js
118
- /**
119
- * 抓取微信富文本
120
- */
121
- window.UE.plugin.register('insert_richtext', function () {
122
- // @ts-ignore
123
- const me = this;
124
-
125
- function filter(div: HTMLElement) {
126
- const domUtils = window.UE.dom.domUtils;
127
- const browser = window.UE.browser;
128
- const utils = window.UE.utils;
129
-
130
- let html;
131
- let ci;
132
- if (div.firstChild) {
133
- //去掉cut中添加的边界值
134
- const nodes = domUtils.getElementsByTagName(div, 'span');
135
- for (let i = 0, ni; ni = nodes[i++];) {
136
- if (ni.id == '_baidu_cut_start' || ni.id == '_baidu_cut_end') {
137
- domUtils.remove(ni);
138
- }
139
- }
140
-
141
- if (browser.webkit) {
142
-
143
- let brs = div.querySelectorAll('div br');
144
- for (let i = 0, bi; bi = brs[i++];) {
145
- const pN = bi.parentNode as HTMLElement;
146
- if (pN) {
147
- if (pN.tagName == 'DIV' && pN.childNodes.length == 1) {
148
- pN.innerHTML = '<p><br/></p>';
149
- domUtils.remove(pN);
150
- }
151
- }
152
- }
153
- const divs = div.querySelectorAll('#baidu_pastebin');
154
- for (let i = 0, di; di = divs[i++];) {
155
- const tmpP = me.document.createElement('p');
156
- di.parentNode?.insertBefore(tmpP, di);
157
- while (di.firstChild) {
158
- tmpP.appendChild(di.firstChild);
159
- }
160
- domUtils.remove(di);
161
- }
162
-
163
- const metas = div.querySelectorAll('meta');
164
- for (let i = 0, ci; ci = metas[i++];) {
165
- domUtils.remove(ci);
166
- }
167
-
168
- brs = div.querySelectorAll('br');
169
- for (let i = 0; ci = brs[i++];) {
170
- if (/^apple-/i.test(ci.className)) {
171
- domUtils.remove(ci);
172
- }
173
- }
174
- }
175
- if (browser.gecko) {
176
- const dirtyNodes = div.querySelectorAll('[_moz_dirty]');
177
- for (let i = 0; ci = dirtyNodes[i++];) {
178
- ci.removeAttribute('_moz_dirty');
179
- }
180
- }
181
- if (!browser.ie) {
182
- const spans = div.querySelectorAll('span.Apple-style-span');
183
- for (let i = 0, ci; ci = spans[i++];) {
184
- domUtils.remove(ci, true);
185
- }
186
- }
187
-
188
- //ie下使用innerHTML会产生多余的\r\n字符,也会产生&nbsp;这里过滤掉
189
- html = div.innerHTML;//.replace(/>(?:(\s|&nbsp;)*?)</g,'><');
190
-
191
- //过滤word粘贴过来的冗余属性
192
- html = window.UE.filterWord(html);
193
- //取消了忽略空白的第二个参数,粘贴过来的有些是有空白的,会被套上相关的标签
194
- var root = window.UE.htmlparser(html);
195
-
196
- //如果给了过滤规则就先进行过滤
197
- if (me.options.filterRules) {
198
- window.UE.filterNode(root, me.options.filterRules);
199
- }
200
- //执行默认的处理
201
- me.filterInputRule(root);
202
- //针对chrome的处理
203
- if (browser.webkit) {
204
- var br = root.lastChild();
205
- if (br && br.type == 'element' && br.tagName == 'br') {
206
- root.removeChild(br)
207
- }
208
- utils.each(me.body.querySelectorAll('div'), function (node: HTMLElement) {
209
- if (domUtils.isEmptyBlock(node)) {
210
- domUtils.remove(node, true)
211
- }
212
- })
213
- }
214
- html = {'html': root.toHtml()};
215
- me.fireEvent('beforepaste', html, root);
216
- //抢了默认的粘贴,那后边的内容就不执行了,比如表格粘贴
217
- if (!html.html) {
218
- return;
219
- }
220
- root = window.UE.htmlparser(html.html, true);
221
- //如果开启了纯文本模式
222
- if (me.queryCommandState('pasteplain') === 1) {
223
- me.execCommand('insertHtml', window.UE.filterNode(root, me.options.filterTxtRules).toHtml(), true);
224
- } else {
225
- //文本模式
226
- window.UE.filterNode(root, me.options.filterTxtRules);
227
- const txtContent = root.toHtml();
228
- //完全模式
229
- const htmlContent = html.html;
230
-
231
- const address = me.selection.getRange().createAddress(true);
232
- // @ts-ignore
233
- me.execCommand('insertHtml', me.getOpt('retainOnlyLabelPasted') === true ? getPureHtml(htmlContent) : htmlContent, true);
234
- }
235
-
236
- me.fireEvent("afterpaste", html);
237
- }
238
- }
239
-
240
-
241
- return {
242
- bindEvents: {
243
- 'afterInsertRichText': function (e: Event, html: HTMLElement) {
244
- me.execCommand('cleardoc');
245
- filter.call(me, html);
246
- me.document.body.innerHTML = `<section>${html}</section>`;
247
-
248
- me.fireEvent('catchremoteimage');
249
-
250
- that.catching = true
251
- that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
252
- // $('.submit').trigger('startHandlePostData', '正在抓取图片');
253
- },
254
- },
255
- commands: {}
256
- }
257
- });
258
-
259
-
260
- const config = {
261
- ...this.props.fieldProps?.config,
262
- forcecatchremote: typeof this.props.fieldProps?.config?.forcecatchremote === 'undefined' ? true : this.props.fieldProps.config.forcecatchremote,
263
- }
264
- if (this.modalContext?.inModal) {
265
- config.zIndex = 2000
266
- config.topOffset = 0
267
- }
268
-
269
- this.editor = window.UE.getEditor(this.state.containerId, config)
270
- this.editor?.ready(() => {
271
- this.editor?.addListener('contentChange', () => {
272
- this.formContext.formRef?.current?.setFieldValue(this.props.dataIndex, this.editor?.getContent())
273
- })
274
- this.setState({loading: false})
275
- })
276
- })
277
-
278
- }
279
-
280
- componentWillUnmount() {
281
- this.editor?.destroy()
282
- }
283
-
284
- render() {
285
- return <ModalContext.Consumer>
286
- {
287
- modalContext =>
288
- <FormContext.Consumer>
289
- {
290
- formContext => {
291
- this.modalContext = modalContext
292
- this.formContext = formContext
293
- return <div {...filterObjectKeys(this.props, [
294
- 'id',
295
- 'fieldProps',
296
- 'onChange',
297
- 'value',
298
- 'form',
299
- 'config',
300
- 'rules',
301
- 'ueditorPath',
302
- 'dataIndex',
303
- ])} ref={el => this.containerRef = el}>
304
- <Spin spinning={this.state.loading}>
305
- <div id={this.state.containerId} style={{width: this.state.width}}/>
306
- </Spin>
307
- </div>
308
- }
309
- }
310
- </FormContext.Consumer>
311
- }
312
- </ModalContext.Consumer>
313
- }
1
+ import {ColumnProps} from "./types";
2
+ import {Component} from "react";
3
+ import {createScript, filterObjectKeys} from "../../lib/helpers";
4
+ import {Spin} from "antd";
5
+ import {ModalContext, ModalContextProps} from "../ModalContext";
6
+ import {uniqueId} from "lodash";
7
+
8
+ declare global {
9
+ interface Window {
10
+ UE: any,
11
+ UE_LOADING_PROMISE: Promise<any>,
12
+ }
13
+ }
14
+
15
+ export default class Ueditor extends Component<ColumnProps & {
16
+ fieldProps: {
17
+ ueditorPath: string,
18
+ }
19
+ }, any> {
20
+ modalContext = {} as ModalContextProps
21
+
22
+ editor: any = null
23
+ catching = false
24
+ containerRef: HTMLElement | null = null
25
+ state = {
26
+ loading: true,
27
+ containerId: uniqueId('ueditor_'),
28
+ width: '',
29
+ }
30
+
31
+
32
+ componentDidMount() {
33
+ this.setState({
34
+ width: this.containerRef?.offsetWidth ? `${this.containerRef?.offsetWidth}px` : '100%'
35
+ })
36
+
37
+ this.props.rules?.push({
38
+ validator: async (rule: any, value: any) => {
39
+ if (this.catching) {
40
+ throw new Error('正在抓取图片')
41
+ }
42
+ return true
43
+ },
44
+ })
45
+
46
+ if (!window.UE && !window.UE_LOADING_PROMISE) {
47
+ window.UE_LOADING_PROMISE =
48
+ createScript(this.props.fieldProps.configJsPath || this.props.fieldProps.ueditorPath + '/ueditor.config.js')
49
+ .then(() => {
50
+ return createScript(this.props.fieldProps.ueditorPath + '/ueditor.all.js')
51
+ })
52
+ .then(() => {
53
+ return createScript(this.props.fieldProps.ueditorPath + '/lang/zh-cn/zh-cn.js')
54
+ })
55
+ }
56
+
57
+ window.UE_LOADING_PROMISE.then(() => {
58
+ let that = this
59
+ window.UE.plugins['forceCatchRemoteImg'] = function () {
60
+ if (this.options.forcecatchremote) {
61
+ this.addListener("afterpaste", function (t: any, a: any) {
62
+ const load_src = that.props.fieldProps.ueditorPath + '/img/load.gif';
63
+ const domUtils = window.UE.dom.domUtils;
64
+
65
+ const parser = new DOMParser();
66
+ const pasteDom = parser.parseFromString(a.html, "text/html");
67
+
68
+ // @ts-ignore
69
+ const allImgs = domUtils.getElementsByTagName(this.document, "img");
70
+ const imgs = domUtils.getElementsByTagName(pasteDom, "img");
71
+
72
+ let notCatch = (src: string) => {
73
+ if (src.indexOf(location.host) !== -1) {
74
+ return true;
75
+ }
76
+ if (/(^\.)|(^\/)/.test(src)) {
77
+ return true;
78
+ }
79
+ return src.indexOf('img_catch_success') !== -1;
80
+
81
+ }
82
+
83
+ let catchGo = false;
84
+ for (let i = 0; i < imgs.length; i++) {
85
+ if (notCatch(imgs[i].src)) {
86
+ continue
87
+ }
88
+ for (let l = 0; l < allImgs.length; l++) {
89
+ if (allImgs[l].src == imgs[i].src) {
90
+ catchGo = true;
91
+ domUtils.setAttributes(allImgs[l], {
92
+ "src": load_src,
93
+ "_src": allImgs[l].src
94
+ });
95
+ }
96
+ }
97
+ }
98
+
99
+ if (catchGo) {
100
+ // $('.submit').trigger('startHandlePostData', '正在抓取图片');
101
+ that.catching = true
102
+ that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
103
+ }
104
+ });
105
+
106
+ this.addListener("catchremotesuccess", function () {
107
+ that.catching = false
108
+ that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
109
+ // $('.submit').trigger('endHandlePostData');
110
+ });
111
+ }
112
+
113
+ }
114
+
115
+ // plugins/insert_richtext.js
116
+ /**
117
+ * 抓取微信富文本
118
+ */
119
+ window.UE.plugin.register('insert_richtext', function () {
120
+ // @ts-ignore
121
+ const me = this;
122
+
123
+ function filter(div: HTMLElement) {
124
+ const domUtils = window.UE.dom.domUtils;
125
+ const browser = window.UE.browser;
126
+ const utils = window.UE.utils;
127
+
128
+ let html;
129
+ let ci;
130
+ if (div.firstChild) {
131
+ //去掉cut中添加的边界值
132
+ const nodes = domUtils.getElementsByTagName(div, 'span');
133
+ for (let i = 0, ni; ni = nodes[i++];) {
134
+ if (ni.id == '_baidu_cut_start' || ni.id == '_baidu_cut_end') {
135
+ domUtils.remove(ni);
136
+ }
137
+ }
138
+
139
+ if (browser.webkit) {
140
+
141
+ let brs = div.querySelectorAll('div br');
142
+ for (let i = 0, bi; bi = brs[i++];) {
143
+ const pN = bi.parentNode as HTMLElement;
144
+ if (pN) {
145
+ if (pN.tagName == 'DIV' && pN.childNodes.length == 1) {
146
+ pN.innerHTML = '<p><br/></p>';
147
+ domUtils.remove(pN);
148
+ }
149
+ }
150
+ }
151
+ const divs = div.querySelectorAll('#baidu_pastebin');
152
+ for (let i = 0, di; di = divs[i++];) {
153
+ const tmpP = me.document.createElement('p');
154
+ di.parentNode?.insertBefore(tmpP, di);
155
+ while (di.firstChild) {
156
+ tmpP.appendChild(di.firstChild);
157
+ }
158
+ domUtils.remove(di);
159
+ }
160
+
161
+ const metas = div.querySelectorAll('meta');
162
+ for (let i = 0, ci; ci = metas[i++];) {
163
+ domUtils.remove(ci);
164
+ }
165
+
166
+ brs = div.querySelectorAll('br');
167
+ for (let i = 0; ci = brs[i++];) {
168
+ if (/^apple-/i.test(ci.className)) {
169
+ domUtils.remove(ci);
170
+ }
171
+ }
172
+ }
173
+ if (browser.gecko) {
174
+ const dirtyNodes = div.querySelectorAll('[_moz_dirty]');
175
+ for (let i = 0; ci = dirtyNodes[i++];) {
176
+ ci.removeAttribute('_moz_dirty');
177
+ }
178
+ }
179
+ if (!browser.ie) {
180
+ const spans = div.querySelectorAll('span.Apple-style-span');
181
+ for (let i = 0, ci; ci = spans[i++];) {
182
+ domUtils.remove(ci, true);
183
+ }
184
+ }
185
+
186
+ //ie下使用innerHTML会产生多余的\r\n字符,也会产生&nbsp;这里过滤掉
187
+ html = div.innerHTML;//.replace(/>(?:(\s|&nbsp;)*?)</g,'><');
188
+
189
+ //过滤word粘贴过来的冗余属性
190
+ html = window.UE.filterWord(html);
191
+ //取消了忽略空白的第二个参数,粘贴过来的有些是有空白的,会被套上相关的标签
192
+ var root = window.UE.htmlparser(html);
193
+
194
+ //如果给了过滤规则就先进行过滤
195
+ if (me.options.filterRules) {
196
+ window.UE.filterNode(root, me.options.filterRules);
197
+ }
198
+ //执行默认的处理
199
+ me.filterInputRule(root);
200
+ //针对chrome的处理
201
+ if (browser.webkit) {
202
+ var br = root.lastChild();
203
+ if (br && br.type == 'element' && br.tagName == 'br') {
204
+ root.removeChild(br)
205
+ }
206
+ utils.each(me.body.querySelectorAll('div'), function (node: HTMLElement) {
207
+ if (domUtils.isEmptyBlock(node)) {
208
+ domUtils.remove(node, true)
209
+ }
210
+ })
211
+ }
212
+ html = {'html': root.toHtml()};
213
+ me.fireEvent('beforepaste', html, root);
214
+ //抢了默认的粘贴,那后边的内容就不执行了,比如表格粘贴
215
+ if (!html.html) {
216
+ return;
217
+ }
218
+ root = window.UE.htmlparser(html.html, true);
219
+ //如果开启了纯文本模式
220
+ if (me.queryCommandState('pasteplain') === 1) {
221
+ me.execCommand('insertHtml', window.UE.filterNode(root, me.options.filterTxtRules).toHtml(), true);
222
+ } else {
223
+ //文本模式
224
+ window.UE.filterNode(root, me.options.filterTxtRules);
225
+ const txtContent = root.toHtml();
226
+ //完全模式
227
+ const htmlContent = html.html;
228
+
229
+ const address = me.selection.getRange().createAddress(true);
230
+ // @ts-ignore
231
+ me.execCommand('insertHtml', me.getOpt('retainOnlyLabelPasted') === true ? getPureHtml(htmlContent) : htmlContent, true);
232
+ }
233
+
234
+ me.fireEvent("afterpaste", html);
235
+ }
236
+ }
237
+
238
+
239
+ return {
240
+ bindEvents: {
241
+ 'afterInsertRichText': function (e: Event, html: HTMLElement) {
242
+ me.execCommand('cleardoc');
243
+ filter.call(me, html);
244
+ me.document.body.innerHTML = `<section>${html}</section>`;
245
+
246
+ me.fireEvent('catchremoteimage');
247
+
248
+ that.catching = true
249
+ that.props.dataIndex && that.props.form?.validateFields([that.props.dataIndex])
250
+ // $('.submit').trigger('startHandlePostData', '正在抓取图片');
251
+ },
252
+ },
253
+ commands: {}
254
+ }
255
+ });
256
+
257
+
258
+ const config = {
259
+ ...this.props.fieldProps?.config,
260
+ forcecatchremote: typeof this.props.fieldProps?.config?.forcecatchremote === 'undefined' ? true : this.props.fieldProps.config.forcecatchremote,
261
+ }
262
+ if (this.modalContext?.inModal) {
263
+ config.zIndex = 2000
264
+ config.topOffset = 0
265
+ }
266
+
267
+ this.editor = window.UE.getEditor(this.state.containerId, config)
268
+ this.editor?.ready(() => {
269
+ const value = this.props.config.value
270
+ if (value) {
271
+ const div = document.createElement('div')
272
+ div.innerHTML = value
273
+ this.editor?.setContent(div.innerText || '')
274
+ this.props.form?.setFieldValue(this.props.dataIndex, this.editor?.getContent())
275
+ }
276
+
277
+ this.editor?.addListener('contentChange', () => {
278
+ this.props.form?.setFieldValue(this.props.dataIndex, this.editor?.getContent())
279
+ })
280
+ this.setState({loading: false})
281
+ })
282
+ })
283
+
284
+ }
285
+
286
+ componentWillUnmount() {
287
+ this.editor?.destroy()
288
+ }
289
+
290
+ render() {
291
+ return <ModalContext.Consumer>
292
+ {
293
+ modalContext => {
294
+ this.modalContext = modalContext
295
+ return <div {...filterObjectKeys(this.props, [
296
+ 'id',
297
+ 'fieldProps',
298
+ 'onChange',
299
+ 'value',
300
+ 'form',
301
+ 'config',
302
+ 'rules',
303
+ 'ueditorPath',
304
+ 'dataIndex',
305
+ ])} ref={el => this.containerRef = el}>
306
+ <Spin spinning={this.state.loading}>
307
+ <div id={this.state.containerId} style={{width: this.state.width}}/>
308
+ </Spin>
309
+ </div>
310
+ }
311
+ }
312
+ </ModalContext.Consumer>
313
+ }
314
314
  }