forked from Gitlink/forgeplus-react
update
This commit is contained in:
parent
7caa517263
commit
7fa8cca225
|
|
@ -58,7 +58,7 @@ function Datas({checkbox ,item , projectsId,owner}){
|
|||
<span className="mr12">{item.created_at} 发布</span>
|
||||
<span className="mr20">{item.updated_at}更新</span>
|
||||
{item.blockchain_token_num && <span className="mr30"><img src={gold} alt="" width="13px" className="mr3"/>{item.blockchain_token_num}</span>}
|
||||
{item.milestone_name && <span style={{maxWidth:item.blockchain_token_num ? "261px":"340px"}} title={item.milestone_name} className="task-hide"><i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>{item.milestone_name}</span> }
|
||||
{/* {item.milestone_name && <span style={{maxWidth:item.blockchain_token_num ? "261px":"340px"}} title={item.milestone_name} className="task-hide"><i className="iconfont icon-lichengbeiicon1 font-12 mr3"></i>{item.milestone_name}</span> } */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -319,19 +319,22 @@ function Details(props){
|
|||
setCommentReload(Math.random());
|
||||
}
|
||||
|
||||
function editReward(){
|
||||
setRewardFlag(true);
|
||||
setTimeout(() => {
|
||||
ref.current && ref.current.focus();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// 悬赏金额 失去焦点保存数据
|
||||
function amountBlur(e){
|
||||
setRewardFlag(false);
|
||||
const value = e.target.value;
|
||||
if(value && value >= 0){
|
||||
saveForeach(undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,value);
|
||||
if(!editFlag){
|
||||
setRewardFlag(false);
|
||||
const value = e.target.value;
|
||||
if(value && value >= 0){
|
||||
saveForeach(undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,value);
|
||||
}else{
|
||||
setRewardAmount(rewardAmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeAmount(value){
|
||||
if(editFlag && value > 0){
|
||||
setRewardAmount(value);
|
||||
}
|
||||
}
|
||||
return(
|
||||
|
|
@ -472,9 +475,17 @@ function Details(props){
|
|||
<li style={{paddingBottom:"0px"}}>
|
||||
<span>
|
||||
悬赏金额
|
||||
{!(editFlag) && <a onClick={editReward}><i className="iconfont icon-a-bianji12 font-13" style={{color:"#898d9d"}}></i></a> }
|
||||
{/* {!editFlag && <a onClick={editReward}><i className="iconfont icon-a-bianji12 font-13" style={{color:"#898d9d"}}></i></a> } */}
|
||||
</span>
|
||||
<InputNumber onBlur={amountBlur} placeholder="未设置" style={{width:"100%",color:rewardAmount?"#333":"#acb0bf"}} ref={ref} value={rewardAmount} onChange={(value)=>setRewardAmount(value)} className="borderNo mt5" disabled={!rewardFlag}/>
|
||||
<InputNumber
|
||||
onBlur={amountBlur}
|
||||
placeholder="请输入悬赏金额"
|
||||
style={{width:"100%",color:rewardAmount?"#333":"#acb0bf"}}
|
||||
value={rewardAmount}
|
||||
onChange={changeAmount}
|
||||
className="borderNo mt5"
|
||||
disabled={editFlag}
|
||||
/>
|
||||
</li>
|
||||
}
|
||||
<Date name="开始日期" today={start_date} setDate={(date)=>{setStartDate(date);saveForeach(undefined,undefined,undefined,undefined,undefined,undefined,date)}} editFlag={editFlag}/>
|
||||
|
|
|
|||
|
|
@ -185,6 +185,7 @@ function List(props){
|
|||
setAllValue([]);
|
||||
setValue(undefined);
|
||||
setNames(undefined);
|
||||
setValue(undefined);
|
||||
Init();
|
||||
// 清除下拉选项
|
||||
menuRef.current && menuRef.current.clearChoose();
|
||||
|
|
|
|||
|
|
@ -204,18 +204,12 @@ function New(props){
|
|||
}
|
||||
|
||||
|
||||
function editReward(){
|
||||
setRewardFlag(true);
|
||||
setTimeout(() => {
|
||||
ref.current && ref.current.focus();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// 悬赏金额 失去焦点保存数据
|
||||
function amountBlur(e){
|
||||
setRewardFlag(false);
|
||||
const value = e.target.value;
|
||||
value && value>=0 && setRewardAmount(value);
|
||||
function changeAmount(value){
|
||||
if(value > 0){
|
||||
setRewardAmount(value);
|
||||
}else{
|
||||
setRewardAmount(rewardAmount);
|
||||
}
|
||||
}
|
||||
return(
|
||||
<div>
|
||||
|
|
@ -285,9 +279,14 @@ function New(props){
|
|||
<li style={{paddingBottom:"0px"}}>
|
||||
<span>
|
||||
悬赏金额
|
||||
{!(milepostId ? true : false) && <a onClick={editReward}><i className="iconfont icon-a-bianji12 font-13" style={{color:"#898d9d"}}></i></a> }
|
||||
{/* {!(milepostId ? true : false) && <a onClick={editReward}><i className="iconfont icon-a-bianji12 font-13" style={{color:"#898d9d"}}></i></a> } */}
|
||||
</span>
|
||||
<InputNumber onBlur={amountBlur} placeholder="未设置" style={{width:"100%",color:rewardAmount?"#333":"#acb0bf"}} ref={ref} value={rewardAmount} onChange={(value)=>setRewardAmount(value)} className="borderNo mt5" disabled={!rewardFlag}/>
|
||||
<InputNumber
|
||||
placeholder="请输入悬赏金额"
|
||||
style={{width:"100%",color:rewardAmount?"#333":"#acb0bf"}}
|
||||
value={rewardAmount}
|
||||
onChange={changeAmount}
|
||||
className="borderNo mt5" disabled={milepostId ? true : false}/>
|
||||
</li>
|
||||
}
|
||||
<Date name="开始日期" today={start_date} setDate={(date)=>setStartDate(date)}/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue