From 02e811083bbc01f099ceb016b1812dce4c97cde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 3 Sep 2018 18:10:06 +0800 Subject: [PATCH] fix buttonText is null in LoginItem --- package.json | 1 + src/components/Login/LoginItem.js | 4 ++++ src/global.js | 1 + 3 files changed, 6 insertions(+) create mode 100644 src/global.js diff --git a/package.json b/package.json index 75d84303..a8614a90 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ }, "dependencies": { "@antv/data-set": "^0.9.0", + "@babel/polyfill": "^7.0.0", "@babel/runtime": "^7.0.0", "antd": "^3.9.0", "bizcharts": "^3.1.10", diff --git a/src/components/Login/LoginItem.js b/src/components/Login/LoginItem.js index 762964c2..a1d216a3 100644 --- a/src/components/Login/LoginItem.js +++ b/src/components/Login/LoginItem.js @@ -8,6 +8,10 @@ import LoginContext from './loginContext'; const FormItem = Form.Item; class WarpFormItem extends Component { + static defaultProps = { + buttonText: '获取验证码', + }; + constructor(props) { super(props); this.state = { diff --git a/src/global.js b/src/global.js new file mode 100644 index 00000000..c3030bdd --- /dev/null +++ b/src/global.js @@ -0,0 +1 @@ +import '@babel/polyfill'; -- GitLab