From ee60b42d6d9f7e14bdd739ed16415565d42c488b Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 29 Aug 2016 20:48:47 +0800 Subject: [PATCH] improve Modal code style --- components/modal/Modal.jsx | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/components/modal/Modal.jsx b/components/modal/Modal.jsx index 090c152c9c..c18d372932 100644 --- a/components/modal/Modal.jsx +++ b/components/modal/Modal.jsx @@ -66,35 +66,40 @@ export default class Modal extends React.Component { } render() { - let props = this.props; + let { okText, cancelText, confirmLoading, footer, visible } = this.props; - let { okText, cancelText } = props; if (this.context.antLocale && this.context.antLocale.Modal) { okText = okText || this.context.antLocale.Modal.okText; cancelText = cancelText || this.context.antLocale.Modal.cancelText; } - let defaultFooter = [ - , - , ]; - let footer = props.footer || defaultFooter; + return ( - ); }