forked from Gitlink/forgeplus-react
issue-字符限制
This commit is contained in:
parent
c28ae9adb3
commit
e7eceb5b23
|
@ -6702,4 +6702,10 @@ ul.count_ul li:not(:last-child):after {
|
|||
}
|
||||
input.ant-input-lg::placeholder{
|
||||
font-size: 14px !important;
|
||||
}
|
||||
.toprightNum{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top:4px;
|
||||
color: #999;
|
||||
}
|
|
@ -152,18 +152,18 @@ function DivertModal({form , visible , onSuccess , onCancel,owner,repo}){
|
|||
</Form.Item>
|
||||
}
|
||||
|
||||
<Form.Item label="仓库标识:">
|
||||
<Form.Item label="仓库名称:">
|
||||
{getFieldDecorator("identifier",
|
||||
{
|
||||
rules:[
|
||||
{required:true,message:"请输入仓库标识"},
|
||||
{required:true,message:"请输入仓库名称"},
|
||||
{
|
||||
validator:checkIdentifier
|
||||
}
|
||||
]
|
||||
}
|
||||
)(
|
||||
<Input placeholder="请输入仓库标识" autoComplete={"off"}/>
|
||||
<Input placeholder="请输入仓库名称" autoComplete={"off"}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
|
|
@ -2,16 +2,14 @@ import React, { Component } from 'react';
|
|||
import AccountProfile from "../../modules/user/AccountProfile";
|
||||
import { getImageUrl } from 'educoder'
|
||||
import axios from 'axios';
|
||||
import { Modal, Input, message, notification , Dropdown , Menu ,Divider } from 'antd';
|
||||
import { Modal, Input, message, notification , Dropdown , Menu } from 'antd';
|
||||
|
||||
import LoginDialog from '../../modules/login/LoginDialog';
|
||||
import GotoQQgroup from '../../modal/GotoQQgroup'
|
||||
// import 'antd/lib/modal/style/index.css';
|
||||
// import 'antd/lib/checkbox/style/index.css';
|
||||
// import 'antd/lib/radio/style/index.css';
|
||||
// import 'antd/lib/input/style/index.css';
|
||||
|
||||
import '../../modules/tpm/TPMIndex.css';
|
||||
import logo from '../../modules/tpm/images/logo.png';
|
||||
|
||||
import './header.scss';
|
||||
const $ = window.$
|
||||
// TODO 这部分脚本从公共脚本中直接调用
|
||||
|
|
|
@ -5,7 +5,13 @@
|
|||
background:#fff;
|
||||
border-radius: 3px;
|
||||
.ant-menu-vertical > .ant-menu-item{
|
||||
border:none
|
||||
border:none;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
margin:0px;
|
||||
}
|
||||
.ant-menu-vertical{
|
||||
border:none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -320,7 +320,7 @@ class order_form extends Component {
|
|||
message: "请填写易修标题",
|
||||
},
|
||||
]
|
||||
})(<Input placeholder="标题" size="large" />)}
|
||||
})(<Input placeholder="标题" size="large" maxLength={80}/>)}
|
||||
</Form.Item>
|
||||
<div className="quillContent">
|
||||
<MDEditor
|
||||
|
|
|
@ -24,6 +24,7 @@ export default Form.create()(
|
|||
const [check_box, setCheckBox] = useState(false);
|
||||
const [switch_box, setSwtichBox] = useState([]);
|
||||
const [onwers, setOnwers] = useState(false);
|
||||
const [ descNum , setDescNum ] = useState(0);
|
||||
const [switch_box_code, setSwtichBoxCode] = useState(false);
|
||||
const [switch_box_pull, setSwtichBoxPull] = useState(false);
|
||||
const [switch_box_issue, setSwtichBoxIssue] = useState(false);
|
||||
|
@ -39,6 +40,7 @@ export default Form.create()(
|
|||
setFieldsValue({
|
||||
...GroupDetail
|
||||
})
|
||||
setDescNum(GroupDetail.description ? GroupDetail.description.length : 0);
|
||||
}
|
||||
}, [GroupDetail])
|
||||
|
||||
|
@ -171,14 +173,19 @@ export default Form.create()(
|
|||
[{ required: true, message: "请输入团队名称" }],
|
||||
<Input placeholder="请输入团队名称"/>, true
|
||||
)}
|
||||
{helper(
|
||||
<span className="mb5">团队描述:<span className="color-grey-8">(描述团队的目的或作用)</span></span>,
|
||||
"description",
|
||||
[],
|
||||
<TextArea
|
||||
placeholder="请输入团队描述"
|
||||
/>
|
||||
)}
|
||||
<div className="pr">
|
||||
<span className="toprightNum">{descNum}/200</span>
|
||||
{helper(
|
||||
<span className="mb5">团队描述:<span className="color-grey-8">(描述团队的目的或作用)</span></span>,
|
||||
"description",
|
||||
[],
|
||||
<TextArea
|
||||
placeholder="请输入团队描述"
|
||||
maxLength={200}
|
||||
onChange={(e)=>{setDescNum(e.target.value ? e.target.value.length :0)}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{helper(
|
||||
'项目权限:',
|
||||
|
|
|
@ -9,6 +9,8 @@ export default Form.create()(
|
|||
forwardRef(({ form , showNotification , history })=>{
|
||||
const [ image , setImage ] = useState(undefined);
|
||||
const [ imageFlag , setImageFlag] = useState(false);
|
||||
const [ descNum ,setDescNum ] = useState(0);
|
||||
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
const radioStyle = {
|
||||
display: 'block',
|
||||
|
@ -86,7 +88,7 @@ export default Form.create()(
|
|||
],
|
||||
<Input
|
||||
addonBefore={`https://`+ port ? `${hostname}:${port}/organize`:`${hostname}/organize`}
|
||||
placeholder="组织账号"
|
||||
placeholder="组织账号" maxLength={100}
|
||||
/>
|
||||
)}
|
||||
{helper(
|
||||
|
@ -94,24 +96,28 @@ export default Form.create()(
|
|||
"nickname",
|
||||
[{ required: true, message: "请输入组织名称" }],
|
||||
<Input
|
||||
placeholder="请输入组织名称"
|
||||
placeholder="请输入组织名称" maxLength={100}
|
||||
/>
|
||||
)}
|
||||
<div className="pr">
|
||||
<span className="toprightNum">{descNum}/200</span>
|
||||
{helper(
|
||||
'组织描述',
|
||||
"description",
|
||||
[{ required: true, message: "请输入组织描述" }],
|
||||
<Input.TextArea
|
||||
autoSize={{ minRows: 3, maxRows: 5 }}
|
||||
placeholder="请输入组织描述" maxLength={200}
|
||||
onChange={(e)=>{setDescNum(e.target.value ? e.target.value.length :0)}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{helper(
|
||||
'组织描述',
|
||||
"description",
|
||||
[{ required: true, message: "请输入组织描述" }],
|
||||
<Input.TextArea
|
||||
autoSize={{ minRows: 3, maxRows: 5 }}
|
||||
placeholder="请输入组织描述"
|
||||
/>
|
||||
)}
|
||||
{helper(
|
||||
'所在地区',
|
||||
"location",
|
||||
[],
|
||||
<Input placeholder="请输入地址"/>,false
|
||||
<Input placeholder="请输入地址" maxLength={50}/>,false
|
||||
)}
|
||||
{helper(
|
||||
'可见性',
|
||||
|
|
|
@ -25,6 +25,7 @@ export default Form.create()(
|
|||
const [ password , setPassword ] = useState(undefined);
|
||||
const [ passwordFlag , setPasswordFlag ] = useState(false);
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ descNum , setDescNum ] = useState(0);
|
||||
const { getFieldDecorator , validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
|
@ -33,6 +34,7 @@ export default Form.create()(
|
|||
...organizeDetail
|
||||
})
|
||||
setImage(organizeDetail.avatar_url);
|
||||
setDescNum(organizeDetail.description ? organizeDetail.description.length : 0);
|
||||
}
|
||||
},[organizeDetail])
|
||||
|
||||
|
@ -119,20 +121,27 @@ export default Form.create()(
|
|||
validator:checkname
|
||||
}
|
||||
],
|
||||
<Input placeholder="请输入组织账号" disabled/>,true
|
||||
<Input placeholder="请输入组织账号" maxLength={100} disabled/>,true
|
||||
)}
|
||||
{helper(
|
||||
"组织名称:",
|
||||
"nickname",
|
||||
[{ required: true, message: "请输入组织名称" }],
|
||||
<Input placeholder="请输入组织名称" />,true
|
||||
)}
|
||||
{helper(
|
||||
"组织描述:",
|
||||
"description",
|
||||
[],
|
||||
<TextArea placeholder="请输入组织名称" />
|
||||
<Input placeholder="请输入组织名称" maxLength={100}/>,true
|
||||
)}
|
||||
<div className="pr">
|
||||
<span className="toprightNum">{descNum}/200</span>
|
||||
{helper(
|
||||
"组织描述:",
|
||||
"description",
|
||||
[],
|
||||
<TextArea
|
||||
placeholder="请输入组织名称"
|
||||
maxLength={200}
|
||||
onChange={(e)=>{setDescNum(e.target.value ? e.target.value.length :0)}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{helper(
|
||||
"官方网站:",
|
||||
"website",
|
||||
|
|
|
@ -29,7 +29,7 @@ $flex:flex;
|
|||
& > div{
|
||||
margin-bottom: 20px;
|
||||
display: $flex;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
padding:20px 25px;
|
||||
background-color:rgba(250,250,250,1);
|
||||
.imgBox{
|
||||
|
@ -52,6 +52,11 @@ $flex:flex;
|
|||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-top: 3px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.teamdesc{
|
||||
word-break: break-all;
|
||||
line-height: 20px;
|
||||
}
|
||||
}
|
||||
.infosType{
|
||||
|
|
|
@ -7,7 +7,7 @@ function TeamItem({item,history}){
|
|||
<div className="imgBox"><img alt="" src={getImageUrl(`/${item.avatar_url}`)}/></div>
|
||||
<div style={{flex:'1'}}>
|
||||
<span className="mb5 font-18 color-grey-3 task-hide">{item.name}</span>
|
||||
<div className="task-hide-2">
|
||||
<div className="task-hide-2 teamdesc">
|
||||
{item.description}
|
||||
</div>
|
||||
<p className="item-news">
|
||||
|
|
Loading…
Reference in New Issue