fan-standard-comp 3.0.17 → 3.0.18

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.
@@ -175,10 +175,10 @@ var FieldComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
175
175
  onChange: function onChange(value, Option) {
176
176
  return _onChange(value, resetResultOption(Option));
177
177
  }
178
- }), selectOptions.map(function (val) {
178
+ }), selectOptions.map(function (val, index) {
179
179
  return /*#__PURE__*/React.createElement(Option, {
180
180
  value: val.value,
181
- key: val.value,
181
+ key: index,
182
182
  title: selectOptionRender ? selectOptionRender(val) : val.title || val.label,
183
183
  disabled: val.disabled
184
184
  }, selectOptionRender ? selectOptionRender(val) : val.label);
@@ -210,10 +210,10 @@ var FieldComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
210
210
  style: Object.assign({
211
211
  width: 'auto'
212
212
  }, defaultProps.style)
213
- }), selectOptions && selectOptions.map(function (val) {
213
+ }), selectOptions && selectOptions.map(function (val, index) {
214
214
  return /*#__PURE__*/React.createElement(_Checkbox, {
215
215
  value: val.value,
216
- key: val.value,
216
+ key: index,
217
217
  // @ts-ignore
218
218
  title: /*#__PURE__*/React.createElement(TitleNode, {
219
219
  render: selectOptionRender,
@@ -235,11 +235,11 @@ var FieldComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
235
235
  style: Object.assign({
236
236
  width: 'auto'
237
237
  }, defaultProps.style)
238
- }), selectOptions && selectOptions.map(function (val) {
238
+ }), selectOptions && selectOptions.map(function (val, index) {
239
239
  if (defaultProps.optionType === 'button') {
240
240
  return /*#__PURE__*/React.createElement(_Radio.Button, {
241
241
  value: val.value,
242
- key: val.value,
242
+ key: index,
243
243
  // @ts-ignore
244
244
  title: /*#__PURE__*/React.createElement(TitleNode, {
245
245
  render: selectOptionRender,
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import 'ant-design-draggable-modal/dist/index.css';
3
+ interface StandardDragModalProps {
4
+ visible: boolean;
5
+ title?: string | React.ReactNode;
6
+ initialWidth?: number;
7
+ initialHeight?: number;
8
+ [k: string]: any;
9
+ }
10
+ declare const StandardDragModal: (props: StandardDragModalProps) => JSX.Element;
11
+ export default StandardDragModal;
@@ -0,0 +1,30 @@
1
+ import { __rest } from "tslib";
2
+ import React from 'react';
3
+ import { DraggableModal, DraggableModalProvider } from 'ant-design-draggable-modal';
4
+ import 'ant-design-draggable-modal/dist/index.css';
5
+
6
+ var StandardDragModal = function StandardDragModal(props) {
7
+ var visible = props.visible,
8
+ onCancel = props.onCancel,
9
+ onSubmit = props.onSubmit,
10
+ children = props.children,
11
+ others = __rest(props, ["visible", "onCancel", "onSubmit", "children"]);
12
+
13
+ var handleOk = function handleOk() {
14
+ onSubmit && onSubmit();
15
+ };
16
+
17
+ var handleCancel = function handleCancel() {
18
+ onCancel && onCancel();
19
+ };
20
+
21
+ return /*#__PURE__*/React.createElement(DraggableModalProvider, null, /*#__PURE__*/React.createElement(DraggableModal, Object.assign({
22
+ visible: visible,
23
+ onOk: handleOk,
24
+ onCancel: handleCancel
25
+ }, others, {
26
+ zIndex: 1001
27
+ }), children));
28
+ };
29
+
30
+ export default StandardDragModal;
@@ -3,6 +3,7 @@ import { ModalProps } from 'antd/es/modal';
3
3
  import PropTypes from 'prop-types';
4
4
  import { ItemGroupProps } from '../StandardForm/index';
5
5
  import './style/index.less';
6
+ import 'ant-design-draggable-modal/dist/index.css';
6
7
  export interface StandardModalProps extends ModalProps {
7
8
  children?: React.ReactNode;
8
9
  title?: String;
@@ -36,6 +37,8 @@ export interface StandardModalProps extends ModalProps {
36
37
  okButtonProps?: any;
37
38
  confirmButtonProps?: any;
38
39
  cancelButtonProps?: any;
40
+ dragAble?: boolean;
41
+ [k: string]: any;
39
42
  }
40
43
  declare const StandardModal: (props: StandardModalProps) => JSX.Element;
41
44
  export default StandardModal;
@@ -1,7 +1,7 @@
1
- import "antd/es/row/style";
2
- import _Row from "antd/es/row";
3
1
  import "antd/es/modal/style";
4
2
  import _Modal from "antd/es/modal";
3
+ import "antd/es/row/style";
4
+ import _Row from "antd/es/row";
5
5
  import "antd/es/button/style";
6
6
  import _Button from "antd/es/button";
7
7
  import "antd/es/form/style";
@@ -31,6 +31,8 @@ import TabForm from '../StandardForm/TabForm';
31
31
  import StepForm from '../StandardForm/StepForm';
32
32
  import ActionList from '../StandardForm/ActionList.js';
33
33
  import './style/index.less';
34
+ import { DraggableModal, DraggableModalProvider } from 'ant-design-draggable-modal';
35
+ import 'ant-design-draggable-modal/dist/index.css';
34
36
 
35
37
  var StandardModal = function StandardModal(props) {
36
38
  var children = props.children,
@@ -58,7 +60,9 @@ var StandardModal = function StandardModal(props) {
58
60
  tabsConfig = props.tabsConfig,
59
61
  stepsConfig = props.stepsConfig,
60
62
  displayLayout = props.displayLayout,
61
- otherProps = __rest(props, ["children", "className", "style", "size", "type", "formItemGroup", "title", "visible", "formPrefix", "formPostfix", "initialValues", "hideRequiredMark", "bodyStyle", "footer", "footerButtonGroup", "hideFooter", "getFormFields", "fieldStatus", "formLayout", "tabsConfig", "stepsConfig", "displayLayout"]);
63
+ _props$dragAble = props.dragAble,
64
+ dragAble = _props$dragAble === void 0 ? false : _props$dragAble,
65
+ otherProps = __rest(props, ["children", "className", "style", "size", "type", "formItemGroup", "title", "visible", "formPrefix", "formPostfix", "initialValues", "hideRequiredMark", "bodyStyle", "footer", "footerButtonGroup", "hideFooter", "getFormFields", "fieldStatus", "formLayout", "tabsConfig", "stepsConfig", "displayLayout", "dragAble"]);
62
66
 
63
67
  var _Form$useForm = _Form.useForm(),
64
68
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -402,15 +406,77 @@ var StandardModal = function StandardModal(props) {
402
406
  }
403
407
 
404
408
  return hasFooterBar ? renderButtonGroup() : null;
405
- };
409
+ }; // 内容渲染
410
+
411
+
412
+ var renderChildrenNodes = function renderChildrenNodes() {
413
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children, type === 'form' && /*#__PURE__*/React.createElement(_Form, {
414
+ layout: formLayout,
415
+ ref: setModalFormRef,
416
+ form: modalForm,
417
+ onFinish: handleSubmit,
418
+ hideRequiredMark: fieldStatus === 'viewOnly' || hideRequiredMark,
419
+ // initialValues={{ ...initialValues }}
420
+ scrollToFirstError: true,
421
+ className: "modalForm"
422
+ }, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/React.createElement(TabForm, {
423
+ grid: size,
424
+ layout: formLayout,
425
+ fieldStatus: fieldStatus,
426
+ actionHide: true,
427
+ // @ts-ignore
428
+ getFormFields: function getFormFields(fields, form) {
429
+ setFormChild(form);
430
+ _getFormFields && _getFormFields(fields, form);
431
+ },
432
+ formItemGroup: formItemGroup,
433
+ tabsConfig: tabsConfig,
434
+ onSubmit: handleSubmit,
435
+ initialValues: Object.assign({}, initialValues),
436
+ displayLayout: displayLayout
437
+ }), type === 'stepForm' && /*#__PURE__*/React.createElement(StepForm, {
438
+ grid: size,
439
+ layout: formLayout,
440
+ fieldStatus: fieldStatus,
441
+ actionHide: true,
442
+ // @ts-ignore
443
+ getFormFields: function getFormFields(fields, form) {
444
+ setFormChild(form);
445
+ _getFormFields && _getFormFields(fields, form);
446
+ },
447
+ formItemGroup: formItemGroup,
448
+ stepsConfig: stepsConfig,
449
+ onSubmit: handleSubmit,
450
+ initialValues: Object.assign({}, initialValues),
451
+ displayLayout: displayLayout
452
+ }));
453
+ }; // 可拖动及缩放
454
+
455
+
456
+ if (dragAble) {
457
+ return /*#__PURE__*/React.createElement(DraggableModalProvider, null, /*#__PURE__*/React.createElement(DraggableModal, Object.assign({
458
+ destroyOnClose: true,
459
+ initialWidth: otherProps.width || general.modalSize[size].width,
460
+ initialHeight: otherProps.height
461
+ }, otherProps, {
462
+ zIndex: 1001,
463
+ visible: visible,
464
+ className: "standardModal ".concat(className || '', " ").concat(fieldStatus === 'viewOnly' ? 'is-view' : ''),
465
+ onCancel: handleCancel,
466
+ afterClose: onAfterClose,
467
+ onOk: handleSubmit,
468
+ title: title,
469
+ footer: renderFooter()
470
+ }), renderChildrenNodes()));
471
+ }
406
472
 
407
473
  return /*#__PURE__*/React.createElement(_Modal, Object.assign({
408
474
  destroyOnClose: true,
409
- maskClosable: false
475
+ maskClosable: false,
476
+ width: general.modalSize[size].width
410
477
  }, otherProps, {
411
478
  visible: visible,
412
479
  title: title,
413
- width: general.modalSize[size].width,
414
480
  footer: renderFooter(),
415
481
  className: "standardModal ".concat(className || '', " ").concat(fieldStatus === 'viewOnly' ? 'is-view' : ''),
416
482
  style: Object.assign({
@@ -423,46 +489,7 @@ var StandardModal = function StandardModal(props) {
423
489
  onCancel: handleCancel,
424
490
  afterClose: onAfterClose,
425
491
  onOk: handleSubmit
426
- }), children, type === 'form' && /*#__PURE__*/React.createElement(_Form, {
427
- layout: formLayout,
428
- ref: setModalFormRef,
429
- form: modalForm,
430
- onFinish: handleSubmit,
431
- hideRequiredMark: fieldStatus === 'viewOnly' || hideRequiredMark,
432
- // initialValues={{ ...initialValues }}
433
- scrollToFirstError: true,
434
- className: "modalForm"
435
- }, formPrefix && /*#__PURE__*/React.createElement(_Row, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/React.createElement(_Row, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/React.createElement(TabForm, {
436
- grid: size,
437
- layout: formLayout,
438
- fieldStatus: fieldStatus,
439
- actionHide: true,
440
- // @ts-ignore
441
- getFormFields: function getFormFields(fields, form) {
442
- setFormChild(form);
443
- _getFormFields && _getFormFields(fields, form);
444
- },
445
- formItemGroup: formItemGroup,
446
- tabsConfig: tabsConfig,
447
- onSubmit: handleSubmit,
448
- initialValues: Object.assign({}, initialValues),
449
- displayLayout: displayLayout
450
- }), type === 'stepForm' && /*#__PURE__*/React.createElement(StepForm, {
451
- grid: size,
452
- layout: formLayout,
453
- fieldStatus: fieldStatus,
454
- actionHide: true,
455
- // @ts-ignore
456
- getFormFields: function getFormFields(fields, form) {
457
- setFormChild(form);
458
- _getFormFields && _getFormFields(fields, form);
459
- },
460
- formItemGroup: formItemGroup,
461
- stepsConfig: stepsConfig,
462
- onSubmit: handleSubmit,
463
- initialValues: Object.assign({}, initialValues),
464
- displayLayout: displayLayout
465
- }));
492
+ }), renderChildrenNodes());
466
493
  };
467
494
 
468
495
  export default StandardModal;
@@ -213,10 +213,10 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
213
213
  onChange: function onChange(value, Option) {
214
214
  return _onChange(value, resetResultOption(Option));
215
215
  }
216
- }), selectOptions.map(function (val) {
216
+ }), selectOptions.map(function (val, index) {
217
217
  return /*#__PURE__*/_react.default.createElement(Option, {
218
218
  value: val.value,
219
- key: val.value,
219
+ key: index,
220
220
  title: selectOptionRender ? selectOptionRender(val) : val.title || val.label,
221
221
  disabled: val.disabled
222
222
  }, selectOptionRender ? selectOptionRender(val) : val.label);
@@ -248,10 +248,10 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
248
248
  style: Object.assign({
249
249
  width: 'auto'
250
250
  }, defaultProps.style)
251
- }), selectOptions && selectOptions.map(function (val) {
251
+ }), selectOptions && selectOptions.map(function (val, index) {
252
252
  return /*#__PURE__*/_react.default.createElement(_checkbox.default, {
253
253
  value: val.value,
254
- key: val.value,
254
+ key: index,
255
255
  // @ts-ignore
256
256
  title: /*#__PURE__*/_react.default.createElement(_TitleNode.default, {
257
257
  render: selectOptionRender,
@@ -273,11 +273,11 @@ var FieldComponent = /*#__PURE__*/_react.default.forwardRef(function (props, ref
273
273
  style: Object.assign({
274
274
  width: 'auto'
275
275
  }, defaultProps.style)
276
- }), selectOptions && selectOptions.map(function (val) {
276
+ }), selectOptions && selectOptions.map(function (val, index) {
277
277
  if (defaultProps.optionType === 'button') {
278
278
  return /*#__PURE__*/_react.default.createElement(_radio.default.Button, {
279
279
  value: val.value,
280
- key: val.value,
280
+ key: index,
281
281
  // @ts-ignore
282
282
  title: /*#__PURE__*/_react.default.createElement(_TitleNode.default, {
283
283
  render: selectOptionRender,
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import 'ant-design-draggable-modal/dist/index.css';
3
+ interface StandardDragModalProps {
4
+ visible: boolean;
5
+ title?: string | React.ReactNode;
6
+ initialWidth?: number;
7
+ initialHeight?: number;
8
+ [k: string]: any;
9
+ }
10
+ declare const StandardDragModal: (props: StandardDragModalProps) => JSX.Element;
11
+ export default StandardDragModal;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _tslib = require("tslib");
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _antDesignDraggableModal = require("ant-design-draggable-modal");
13
+
14
+ require("ant-design-draggable-modal/dist/index.css");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
18
+ var StandardDragModal = function StandardDragModal(props) {
19
+ var visible = props.visible,
20
+ onCancel = props.onCancel,
21
+ onSubmit = props.onSubmit,
22
+ children = props.children,
23
+ others = (0, _tslib.__rest)(props, ["visible", "onCancel", "onSubmit", "children"]);
24
+
25
+ var handleOk = function handleOk() {
26
+ onSubmit && onSubmit();
27
+ };
28
+
29
+ var handleCancel = function handleCancel() {
30
+ onCancel && onCancel();
31
+ };
32
+
33
+ return /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModalProvider, null, /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModal, Object.assign({
34
+ visible: visible,
35
+ onOk: handleOk,
36
+ onCancel: handleCancel
37
+ }, others, {
38
+ zIndex: 1001
39
+ }), children));
40
+ };
41
+
42
+ var _default = StandardDragModal;
43
+ exports.default = _default;
@@ -3,6 +3,7 @@ import { ModalProps } from 'antd/es/modal';
3
3
  import PropTypes from 'prop-types';
4
4
  import { ItemGroupProps } from '../StandardForm/index';
5
5
  import './style/index.less';
6
+ import 'ant-design-draggable-modal/dist/index.css';
6
7
  export interface StandardModalProps extends ModalProps {
7
8
  children?: React.ReactNode;
8
9
  title?: String;
@@ -36,6 +37,8 @@ export interface StandardModalProps extends ModalProps {
36
37
  okButtonProps?: any;
37
38
  confirmButtonProps?: any;
38
39
  cancelButtonProps?: any;
40
+ dragAble?: boolean;
41
+ [k: string]: any;
39
42
  }
40
43
  declare const StandardModal: (props: StandardModalProps) => JSX.Element;
41
44
  export default StandardModal;
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- require("antd/es/row/style");
9
-
10
- var _row = _interopRequireDefault(require("antd/es/row"));
11
-
12
8
  require("antd/es/modal/style");
13
9
 
14
10
  var _modal = _interopRequireDefault(require("antd/es/modal"));
15
11
 
12
+ require("antd/es/row/style");
13
+
14
+ var _row = _interopRequireDefault(require("antd/es/row"));
15
+
16
16
  require("antd/es/button/style");
17
17
 
18
18
  var _button = _interopRequireDefault(require("antd/es/button"));
@@ -41,6 +41,10 @@ var _ActionList = _interopRequireDefault(require("../StandardForm/ActionList.js"
41
41
 
42
42
  require("./style/index.less");
43
43
 
44
+ var _antDesignDraggableModal = require("ant-design-draggable-modal");
45
+
46
+ require("ant-design-draggable-modal/dist/index.css");
47
+
44
48
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
45
49
 
46
50
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -87,7 +91,9 @@ var StandardModal = function StandardModal(props) {
87
91
  tabsConfig = props.tabsConfig,
88
92
  stepsConfig = props.stepsConfig,
89
93
  displayLayout = props.displayLayout,
90
- otherProps = (0, _tslib.__rest)(props, ["children", "className", "style", "size", "type", "formItemGroup", "title", "visible", "formPrefix", "formPostfix", "initialValues", "hideRequiredMark", "bodyStyle", "footer", "footerButtonGroup", "hideFooter", "getFormFields", "fieldStatus", "formLayout", "tabsConfig", "stepsConfig", "displayLayout"]);
94
+ _props$dragAble = props.dragAble,
95
+ dragAble = _props$dragAble === void 0 ? false : _props$dragAble,
96
+ otherProps = (0, _tslib.__rest)(props, ["children", "className", "style", "size", "type", "formItemGroup", "title", "visible", "formPrefix", "formPostfix", "initialValues", "hideRequiredMark", "bodyStyle", "footer", "footerButtonGroup", "hideFooter", "getFormFields", "fieldStatus", "formLayout", "tabsConfig", "stepsConfig", "displayLayout", "dragAble"]);
91
97
 
92
98
  var _Form$useForm = _form.default.useForm(),
93
99
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -429,15 +435,77 @@ var StandardModal = function StandardModal(props) {
429
435
  }
430
436
 
431
437
  return hasFooterBar ? renderButtonGroup() : null;
432
- };
438
+ }; // 内容渲染
439
+
440
+
441
+ var renderChildrenNodes = function renderChildrenNodes() {
442
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children, type === 'form' && /*#__PURE__*/_react.default.createElement(_form.default, {
443
+ layout: formLayout,
444
+ ref: setModalFormRef,
445
+ form: modalForm,
446
+ onFinish: handleSubmit,
447
+ hideRequiredMark: fieldStatus === 'viewOnly' || hideRequiredMark,
448
+ // initialValues={{ ...initialValues }}
449
+ scrollToFirstError: true,
450
+ className: "modalForm"
451
+ }, formPrefix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/_react.default.createElement(_TabForm.default, {
452
+ grid: size,
453
+ layout: formLayout,
454
+ fieldStatus: fieldStatus,
455
+ actionHide: true,
456
+ // @ts-ignore
457
+ getFormFields: function getFormFields(fields, form) {
458
+ setFormChild(form);
459
+ _getFormFields && _getFormFields(fields, form);
460
+ },
461
+ formItemGroup: formItemGroup,
462
+ tabsConfig: tabsConfig,
463
+ onSubmit: handleSubmit,
464
+ initialValues: Object.assign({}, initialValues),
465
+ displayLayout: displayLayout
466
+ }), type === 'stepForm' && /*#__PURE__*/_react.default.createElement(_StepForm.default, {
467
+ grid: size,
468
+ layout: formLayout,
469
+ fieldStatus: fieldStatus,
470
+ actionHide: true,
471
+ // @ts-ignore
472
+ getFormFields: function getFormFields(fields, form) {
473
+ setFormChild(form);
474
+ _getFormFields && _getFormFields(fields, form);
475
+ },
476
+ formItemGroup: formItemGroup,
477
+ stepsConfig: stepsConfig,
478
+ onSubmit: handleSubmit,
479
+ initialValues: Object.assign({}, initialValues),
480
+ displayLayout: displayLayout
481
+ }));
482
+ }; // 可拖动及缩放
483
+
484
+
485
+ if (dragAble) {
486
+ return /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModalProvider, null, /*#__PURE__*/_react.default.createElement(_antDesignDraggableModal.DraggableModal, Object.assign({
487
+ destroyOnClose: true,
488
+ initialWidth: otherProps.width || _data.general.modalSize[size].width,
489
+ initialHeight: otherProps.height
490
+ }, otherProps, {
491
+ zIndex: 1001,
492
+ visible: visible,
493
+ className: "standardModal ".concat(className || '', " ").concat(fieldStatus === 'viewOnly' ? 'is-view' : ''),
494
+ onCancel: handleCancel,
495
+ afterClose: onAfterClose,
496
+ onOk: handleSubmit,
497
+ title: title,
498
+ footer: renderFooter()
499
+ }), renderChildrenNodes()));
500
+ }
433
501
 
434
502
  return /*#__PURE__*/_react.default.createElement(_modal.default, Object.assign({
435
503
  destroyOnClose: true,
436
- maskClosable: false
504
+ maskClosable: false,
505
+ width: _data.general.modalSize[size].width
437
506
  }, otherProps, {
438
507
  visible: visible,
439
508
  title: title,
440
- width: _data.general.modalSize[size].width,
441
509
  footer: renderFooter(),
442
510
  className: "standardModal ".concat(className || '', " ").concat(fieldStatus === 'viewOnly' ? 'is-view' : ''),
443
511
  style: Object.assign({
@@ -450,46 +518,7 @@ var StandardModal = function StandardModal(props) {
450
518
  onCancel: handleCancel,
451
519
  afterClose: onAfterClose,
452
520
  onOk: handleSubmit
453
- }), children, type === 'form' && /*#__PURE__*/_react.default.createElement(_form.default, {
454
- layout: formLayout,
455
- ref: setModalFormRef,
456
- form: modalForm,
457
- onFinish: handleSubmit,
458
- hideRequiredMark: fieldStatus === 'viewOnly' || hideRequiredMark,
459
- // initialValues={{ ...initialValues }}
460
- scrollToFirstError: true,
461
- className: "modalForm"
462
- }, formPrefix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPrefix(modalForm, props, forceUpdateForm)), formItemGroup ? renderFormItemGroup() : null, formPostfix && /*#__PURE__*/_react.default.createElement(_row.default, null, formPostfix(modalForm, props, forceUpdateForm), " ")), type === 'tabForm' && /*#__PURE__*/_react.default.createElement(_TabForm.default, {
463
- grid: size,
464
- layout: formLayout,
465
- fieldStatus: fieldStatus,
466
- actionHide: true,
467
- // @ts-ignore
468
- getFormFields: function getFormFields(fields, form) {
469
- setFormChild(form);
470
- _getFormFields && _getFormFields(fields, form);
471
- },
472
- formItemGroup: formItemGroup,
473
- tabsConfig: tabsConfig,
474
- onSubmit: handleSubmit,
475
- initialValues: Object.assign({}, initialValues),
476
- displayLayout: displayLayout
477
- }), type === 'stepForm' && /*#__PURE__*/_react.default.createElement(_StepForm.default, {
478
- grid: size,
479
- layout: formLayout,
480
- fieldStatus: fieldStatus,
481
- actionHide: true,
482
- // @ts-ignore
483
- getFormFields: function getFormFields(fields, form) {
484
- setFormChild(form);
485
- _getFormFields && _getFormFields(fields, form);
486
- },
487
- formItemGroup: formItemGroup,
488
- stepsConfig: stepsConfig,
489
- onSubmit: handleSubmit,
490
- initialValues: Object.assign({}, initialValues),
491
- displayLayout: displayLayout
492
- }));
521
+ }), renderChildrenNodes());
493
522
  };
494
523
 
495
524
  var _default = StandardModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fan-standard-comp",
3
- "version": "3.0.17",
3
+ "version": "3.0.18",
4
4
  "description": "FZ standard-comp,basic of antd4.0 and custom component.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -24,7 +24,7 @@
24
24
  "devDependencies": {
25
25
  "@ant-design/icons": "^4.3.0",
26
26
  "@types/classnames": "^2.2.11",
27
- "antd": "^4.16.13",
27
+ "antd": "4.24.7",
28
28
  "babel-loader": "^8.2.2",
29
29
  "babel-plugin-import": "^1.13.3",
30
30
  "classnames": "^2.2.6",
@@ -34,5 +34,8 @@
34
34
  "react": "^16.11.0",
35
35
  "react-dom": "^16.11.0",
36
36
  "webpack-cli": "^4.3.1"
37
+ },
38
+ "dependencies": {
39
+ "ant-design-draggable-modal": "^1.0.0"
37
40
  }
38
41
  }