UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

30 lines (28 loc) 747 B
import React from 'react' import Form from 'antd' class Item extends React.Component { render () { const { getFieldDecorator } = this.props.form return ( <Item label={label}> { getFieldDecorator(name, { initialValue, getValueProps: value => getter(value), rules: [{ required, message: `${label}不能为空`, }], })(<Upload action={url} listType={listType} defaultFileList={initialValue}> <Button> <Icon type="upload" /> {uploadText || '上传'} </Button> </Upload>) } { hide && hide.length && this.renderHideItem({ hide }) } </Item> ) } }