@ecoding/components.antd 0.1.18 → 0.1.19
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface IModalProps {
|
|
3
3
|
key?: string;
|
|
4
4
|
id?: string;
|
|
@@ -13,6 +13,7 @@ export interface IModalProps {
|
|
|
13
13
|
okText?: string;
|
|
14
14
|
cancelText?: string;
|
|
15
15
|
closable?: boolean;
|
|
16
|
+
maskClosable?: boolean;
|
|
16
17
|
footer?: React.ReactNode;
|
|
17
18
|
onOk?: () => Promise<any>;
|
|
18
19
|
onOkAfter?: (args: any) => void | Promise<any>;
|
|
@@ -34,6 +35,7 @@ export declare class Modals extends React.Component<IModalProps> {
|
|
|
34
35
|
okText: string;
|
|
35
36
|
cancelText: string;
|
|
36
37
|
closable: boolean;
|
|
38
|
+
maskClosable: boolean;
|
|
37
39
|
footer: string;
|
|
38
40
|
onOk: () => Promise<void>;
|
|
39
41
|
onCancel: () => Promise<void>;
|
package/lib/core/modal/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Modal, Button } from
|
|
3
|
-
import InjectNotification from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal, Button } from "antd";
|
|
3
|
+
import InjectNotification from "../inject-notification";
|
|
4
4
|
const timeout = 300;
|
|
5
5
|
export class Modals extends React.Component {
|
|
6
6
|
constructor() {
|
|
@@ -49,7 +49,7 @@ export class Modals extends React.Component {
|
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
51
|
// if (!this.props.visible) return null;
|
|
52
|
-
return (React.createElement(Modal, { className: this.props.className, open: this.state.open, bodyStyle: this.props.bodyStyle, width: this.props.width, zIndex: this.props.zIndex, mask: this.props.mask, title: this.props.title, closable: this.props.closable, onCancel: this.cancel, centered: true, destroyOnClose: true, keyboard: false, footer: this.props.footer === null ? null : this.props.footer ? (this.props.footer) : (React.createElement(React.Fragment, null,
|
|
52
|
+
return (React.createElement(Modal, { className: this.props.className, open: this.state.open, bodyStyle: this.props.bodyStyle, width: this.props.width, zIndex: this.props.zIndex, mask: this.props.mask, title: this.props.title, closable: this.props.closable, maskClosable: this.props.maskClosable, onCancel: this.cancel, centered: true, destroyOnClose: true, keyboard: false, footer: this.props.footer === null ? null : this.props.footer ? (this.props.footer) : (React.createElement(React.Fragment, null,
|
|
53
53
|
this.props.addonBefore ? this.props.addonBefore : null,
|
|
54
54
|
React.createElement(Button, { key: "back", onClick: this.cancel }, this.props.cancelText),
|
|
55
55
|
React.createElement(Button, { key: "submit", type: this.props.okType, loading: this.state.loading, onClick: this.ok }, this.props.okText),
|
|
@@ -68,6 +68,7 @@ Modals.defaultProps = {
|
|
|
68
68
|
okText: "保存",
|
|
69
69
|
cancelText: "取消",
|
|
70
70
|
closable: true,
|
|
71
|
+
maskClosable: true,
|
|
71
72
|
footer: "",
|
|
72
73
|
onOk: function () {
|
|
73
74
|
return Promise.resolve();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecoding/components.antd",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"author": "cxc",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"react-quill": "^2.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d91f4e3454066a8e395b7534cb9de10850a48078"
|
|
46
46
|
}
|