From cb6224df4ba453ad6f9aa8cd5826a5e0d07e9f05 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 23 Jan 2016 16:18:22 +0800 Subject: [PATCH] fix form demo style --- components/form/demo/validate-basic.md | 4 ++-- components/form/demo/validate-customized.md | 19 ++++++++++++------- components/form/demo/validate-other.md | 3 +-- style/components/radio.less | 1 - 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/components/form/demo/validate-basic.md b/components/form/demo/validate-basic.md index 922fdb6128..27fae25762 100644 --- a/components/form/demo/validate-basic.md +++ b/components/form/demo/validate-basic.md @@ -35,7 +35,7 @@ class BasicDemo extends React.Component { handleSubmit(e) { e.preventDefault(); - this.props.form.validateFields(function(errors, values) { + this.props.form.validateFields((errors, values) => { if (!!errors) { console.log('Errors in form!!!'); return; @@ -49,7 +49,7 @@ class BasicDemo extends React.Component { if (!value) { callback(); } else { - setTimeout(function () { + setTimeout(() => { if (value === 'JasonWood') { callback([new Error('抱歉,该用户名已被占用。')]); } else { diff --git a/components/form/demo/validate-customized.md b/components/form/demo/validate-customized.md index f6c42702cb..541bac1edd 100644 --- a/components/form/demo/validate-customized.md +++ b/components/form/demo/validate-customized.md @@ -30,7 +30,7 @@ let Demo = React.createClass({ handleSubmit(e) { e.preventDefault(); - this.props.form.validateFields(function(errors, values) { + this.props.form.validateFields((errors, values) => { if (!!errors) { console.log('Errors in form!!!'); return; @@ -172,12 +172,17 @@ let Demo = React.createClass({ - - -     - - + + + + +     + + + + + ); } diff --git a/components/form/demo/validate-other.md b/components/form/demo/validate-other.md index 31c53b7c18..f6ea8ee2d3 100644 --- a/components/form/demo/validate-other.md +++ b/components/form/demo/validate-other.md @@ -23,7 +23,7 @@ let Demo = React.createClass({ handleSubmit(e) { e.preventDefault(); - this.props.form.validateFields(function(errors, values) { + this.props.form.validateFields((errors, values) => { if (!!errors) { console.log('Errors in form!!!'); return; @@ -129,7 +129,6 @@ let Demo = React.createClass({ label="8~12间的质数:" labelCol={{span: 7}} wrapperCol={{span: 12}} - hasFeedback id="primeNumber" options={{ rules: [{ validator: this.checkPrime }], diff --git a/style/components/radio.less b/style/components/radio.less index 602b34e7b5..dc295767db 100644 --- a/style/components/radio.less +++ b/style/components/radio.less @@ -5,7 +5,6 @@ .@{radio-group-prefix-cls} { display: inline-block; - vertical-align: middle; label { margin-right: 16px; }