forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
3fce9a99ad
commit
21ce83e537
|
@ -6,6 +6,7 @@ CopyTool.defaultProps = {
|
|||
afterText: '复制成功', //点击后显示的文字
|
||||
className: '', //传给svg的class
|
||||
inputId: 'copyText', //要复制的文本的ID
|
||||
timeOut:true, //复制后将浮动的文字改为beforeText
|
||||
};
|
||||
|
||||
|
||||
|
@ -21,14 +22,11 @@ function CopyTool({ beforeText, afterText, className , inputId , timeOut }) {
|
|||
console.error("您的CopyTool未设置正确的inputId");
|
||||
return;
|
||||
}
|
||||
const range = document.createRange(); // 创造range
|
||||
window.getSelection().removeAllRanges(); //清除页面中已有的selection
|
||||
range.selectNode(copyEle); // 选中需要复制的节点
|
||||
window.getSelection().addRange(range); // 执行选中元素
|
||||
|
||||
copyEle.select(); // 执行选中元素
|
||||
if (document.execCommand('copy')) {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
|
||||
setTitle(afterText);
|
||||
if(timeOut){
|
||||
setTimeout(function(){
|
||||
|
|
|
@ -53,7 +53,7 @@ export default (({ user , img, name, time, focusStatus, is_current_user, login ,
|
|||
is_current_user ?
|
||||
<Button type="default">当前用户</Button>
|
||||
:
|
||||
<FocusButton is_watch={focusStatus} id={login} successFunc={successFunc}/>
|
||||
<FocusButton is_watch={focusStatus} id={login} successFunc={successFunc} notReset={true}/>
|
||||
}
|
||||
</div>
|
||||
</Div>
|
||||
|
|
|
@ -9,9 +9,9 @@ function Modals({title,children,btn,onCancel,visible}) {
|
|||
onCancel={onCancel}
|
||||
title={title}
|
||||
width={"520px"}
|
||||
className="deleteBox"
|
||||
footer={btn}
|
||||
centered={true}
|
||||
wrapClassName={"deleteBox"}
|
||||
>
|
||||
{children}
|
||||
</Modal>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
.deleteBox{
|
||||
z-index: 1033;
|
||||
.ant-modal-close-x{
|
||||
font-size: 17px!important;
|
||||
}
|
||||
|
|
|
@ -362,7 +362,7 @@ class NewHeader extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
// let search_url = settings && settings.common && settings.common.search;
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
let notice_url = settings && settings.common && settings.common.notice;
|
||||
return (
|
||||
<div className="newHeaders" id="nHeader">
|
||||
|
@ -427,7 +427,7 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
<div className="head-right">
|
||||
{/* {search_url ? this.SearchInput(openSearch,search_url):""} */}
|
||||
<HeadSearch {...this.props}/>
|
||||
{ search_url && <HeadSearch {...this.props}/>}
|
||||
{
|
||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||
|
|
|
@ -8,7 +8,7 @@ function Invite({code,className}) {
|
|||
<div className={className}>
|
||||
<span className="font-16 color-grey-6">邀请码</span>
|
||||
<div>
|
||||
<span id="devitecode">{code}</span>
|
||||
<input value={code} id="devitecode" style={{width:"62px",border:"none",cursor:"default"}} readOnly/>
|
||||
<CopyTool timeOut={true} beforeText={<p className="edu-txt-center">可以通过邀请码邀请成员加入项目<br/>点击复制邀请码。</p>} className="ml8 font-16" inputId="devitecode"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -114,7 +114,7 @@ class MilepostDetail extends Component {
|
|||
this.setState({
|
||||
data: result.data,
|
||||
issues: result.data.issues,
|
||||
search_count: result.data.search_count,
|
||||
search_count: params.status_type ==="1" ? result.data.open_issues_count : result.data.close_issues_count,
|
||||
isSpin: false
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue