From b89c0028caa24b5941a4e70df9ac175a14c379bf Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Sat, 5 May 2018 21:38:03 +0800 Subject: [PATCH] feat: add form demo --- components/checkbox/Checkbox.jsx | 11 +- components/form/FormItem.jsx | 9 +- components/form/demo/advanced-search.md | 134 ++++++++++++++++++++++++ components/form/demo/normal-login.md | 79 ++++++++++++++ components/form/demo/test.vue | 29 +++-- components/input/Input.jsx | 24 +++-- 6 files changed, 258 insertions(+), 28 deletions(-) create mode 100644 components/form/demo/advanced-search.md create mode 100644 components/form/demo/normal-login.md diff --git a/components/checkbox/Checkbox.jsx b/components/checkbox/Checkbox.jsx index 623428528..f9508a8c3 100644 --- a/components/checkbox/Checkbox.jsx +++ b/components/checkbox/Checkbox.jsx @@ -1,7 +1,8 @@ - -import hasProp from '../_util/props-util' +import classNames from 'classnames' +import hasProp, { getClass, getStyle } from '../_util/props-util' import PropTypes from '../_util/vue-types' export default { + inheritAttrs: false, name: 'ACheckbox', props: { prefixCls: { @@ -104,9 +105,13 @@ export default { onChange = () => checkboxGroupContext.toggleOption({ value: props.value }) disabled = props.disabled || checkboxGroupContext.disabled } + const classString = classNames(getClass(this), { + [`${prefixCls}-wrapper`]: true, + }) return (