forked from Gitlink/forgeplus-react
merge
This commit is contained in:
parent
4c48b6c77a
commit
6a546c79e4
|
@ -43,7 +43,8 @@ class Index extends Component {
|
|||
project_language_name: undefined,
|
||||
project_category_name: undefined,
|
||||
license_name: undefined,
|
||||
ignore_name: undefined
|
||||
ignore_name: undefined,
|
||||
descNum:0
|
||||
}
|
||||
}
|
||||
componentDidMount = () => {
|
||||
|
@ -254,6 +255,13 @@ class Index extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
changeDesc=(e)=>{
|
||||
let value = e.target.value;
|
||||
this.setState({
|
||||
descNum:value ? value.length :0
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
// 项目类型:deposit-托管项目,mirror-镜像项目
|
||||
|
@ -273,7 +281,9 @@ class Index extends Component {
|
|||
license_list,
|
||||
ignore_list,
|
||||
|
||||
mirrorCheck
|
||||
mirrorCheck,
|
||||
|
||||
descNum
|
||||
} = this.state;
|
||||
return (
|
||||
<div className="main back-white" style={{padding:"0px",border:"none"}}>
|
||||
|
@ -364,18 +374,20 @@ class Index extends Component {
|
|||
<Input placeholder="例如:团队协作方法与研究" maxLength={50}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label="项目简介"
|
||||
>
|
||||
{getFieldDecorator('description', {
|
||||
rules: [{
|
||||
required: true, message: '请填写项目简介'
|
||||
}],
|
||||
})(
|
||||
<Input.TextArea showCount placeholder="项目的介绍" autoSize={{ minRows: 2, maxRows: 6 }} maxLength={"200"}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<div className="pr">
|
||||
<span className="toprightNum">{descNum}/200</span>
|
||||
<Form.Item
|
||||
label="项目简介"
|
||||
>
|
||||
{getFieldDecorator('description', {
|
||||
rules: [{
|
||||
required: true, message: '请填写项目简介'
|
||||
}],
|
||||
})(
|
||||
<Input.TextArea maxLength={200} placeholder="项目的介绍" autoSize={{ minRows: 2, maxRows: 6 }} onChange={this.changeDesc}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
<Form.Item
|
||||
label="仓库名称"
|
||||
>
|
||||
|
@ -384,7 +396,7 @@ class Index extends Component {
|
|||
required: true, message: '请填写仓库名称'
|
||||
}],
|
||||
})(
|
||||
<Input placeholder="仓库名称请使用与项目相关的英文关键字" maxLength={"100"}/>
|
||||
<Input placeholder="仓库名称请使用与项目相关的英文关键字" maxLength={100} />
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
|
|
Loading…
Reference in New Issue