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