diff --git a/components/button/demo/basic.md b/components/button/demo/basic.md index a67dfafec..a8f6a91db 100644 --- a/components/button/demo/basic.md +++ b/components/button/demo/basic.md @@ -1,11 +1,11 @@ #### 按钮类型 -按钮有四种类型:主按钮、次按钮、虚线按钮、危险按钮和链接按钮。主按钮在同一个操作区域最多出现一次。 +按钮有五种类型:主按钮、次按钮、虚线按钮、危险按钮和链接按钮。主按钮在同一个操作区域最多出现一次。 #### Type -There are `primary` button, `default` button, `dashed` button and `danger` button and `link` button in antd. +There are `primary` button, `default` button, `dashed` button , `danger` button and `link` button in antd. ```tpl diff --git a/components/form/Form.jsx b/components/form/Form.jsx index a9b8318df..95c98c971 100755 --- a/components/form/Form.jsx +++ b/components/form/Form.jsx @@ -1,5 +1,6 @@ import PropTypes from '../_util/vue-types'; import classNames from 'classnames'; +import { ColProps } from '../grid/Col'; import Vue from 'vue'; import isRegExp from 'lodash/isRegExp'; import warning from '../_util/warning'; @@ -59,6 +60,8 @@ export const WrappedFormUtils = { export const FormProps = { layout: PropTypes.oneOf(['horizontal', 'inline', 'vertical']), + labelCol: PropTypes.shape(ColProps).loose, + wrapperCol: PropTypes.shape(ColProps).loose, form: PropTypes.object, // onSubmit: React.FormEventHandler; prefixCls: PropTypes.string, diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx index cfd049ed9..07f04f239 100644 --- a/components/form/FormItem.jsx +++ b/components/form/FormItem.jsx @@ -314,7 +314,8 @@ export default { }, renderWrapper(prefixCls, children) { - const { wrapperCol = {} } = this; + const { FormProps: { wrapperCol: wrapperColForm = {} } = {} } = this; + const { wrapperCol = wrapperColForm } = this; const { class: cls, style, id, on, ...restProps } = wrapperCol; const className = classNames(`${prefixCls}-item-control-wrapper`, cls); const colProps = { @@ -369,7 +370,8 @@ export default { }, renderLabel(prefixCls) { - const { labelCol = {}, colon, id } = this; + const { FormProps: { labelCol: labelColForm = {} } = {} } = this; + const { labelCol = labelColForm, colon, id } = this; const label = getComponentFromProp(this, 'label'); const required = this.isRequired(); const { diff --git a/components/form/demo/validate-other.vue b/components/form/demo/validate-other.vue index ab14cd5a0..9b73edee3 100644 --- a/components/form/demo/validate-other.vue +++ b/components/form/demo/validate-other.vue @@ -9,13 +9,13 @@ Demonstration of validation configuration for form controls which are not shown