, true
)}
- {helper(
-
团队描述:(描述团队的目的或作用),
- "description",
- [],
-
- )}
+
+ {descNum}/200
+ {helper(
+ 团队描述:(描述团队的目的或作用),
+ "description",
+ [],
+
{helper(
'项目权限:',
diff --git a/src/forge/Team/New.jsx b/src/forge/Team/New.jsx
index c7e48e8c..f4a9880b 100644
--- a/src/forge/Team/New.jsx
+++ b/src/forge/Team/New.jsx
@@ -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()(
],
)}
{helper(
@@ -94,24 +96,28 @@ export default Form.create()(
"nickname",
[{ required: true, message: "请输入组织名称" }],
)}
+
+ {descNum}/200
+ {helper(
+ '组织描述',
+ "description",
+ [{ required: true, message: "请输入组织描述" }],
+ {setDescNum(e.target.value ? e.target.value.length :0)}}
+ />
+ )}
+
- {helper(
- '组织描述',
- "description",
- [{ required: true, message: "请输入组织描述" }],
-
- )}
{helper(
'所在地区',
"location",
[],
-
,false
+
,false
)}
{helper(
'可见性',
diff --git a/src/forge/Team/Setting/TeamSettingCommon.jsx b/src/forge/Team/Setting/TeamSettingCommon.jsx
index 6a94beb5..5be03db0 100644
--- a/src/forge/Team/Setting/TeamSettingCommon.jsx
+++ b/src/forge/Team/Setting/TeamSettingCommon.jsx
@@ -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
}
],
-
,true
+
,true
)}
{helper(
"组织名称:",
"nickname",
[{ required: true, message: "请输入组织名称" }],
-
,true
- )}
- {helper(
- "组织描述:",
- "description",
- [],
-
+
,true
)}
+
+ {descNum}/200
+ {helper(
+ "组织描述:",
+ "description",
+ [],
+
{helper(
"官方网站:",
"website",
diff --git a/src/forge/users/Index.scss b/src/forge/users/Index.scss
index 3ea86108..d8d4ecd4 100644
--- a/src/forge/users/Index.scss
+++ b/src/forge/users/Index.scss
@@ -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{
diff --git a/src/forge/users/Team-item.jsx b/src/forge/users/Team-item.jsx
index f3dbc47c..251fe511 100644
--- a/src/forge/users/Team-item.jsx
+++ b/src/forge/users/Team-item.jsx
@@ -7,7 +7,7 @@ function TeamItem({item,history}){