parent
bb2691767b
commit
f6b2e1748b
@ -0,0 +1,32 @@
|
||||
import React , { Component } from 'react';
|
||||
import { Dropdown , Icon , Menu } from 'antd';
|
||||
|
||||
import "./branch.css"
|
||||
|
||||
// 点击按钮复制功能
|
||||
function jsCopy(){
|
||||
var e = document.getElementById("copy_rep_content");
|
||||
e.select();
|
||||
document.execCommand("Copy");
|
||||
}
|
||||
class CloneAddress extends Component{
|
||||
|
||||
render(){
|
||||
const { http_url , downloadUrl } = this.props;
|
||||
return(
|
||||
<div className="gitAddressClone">
|
||||
<span className={"addressType active"} onClick={()=>this.changeAddress("http")}>HTTP</span>
|
||||
{/* <span className={address ==="ssh" ? "addressType active":"addressType"} onClick={()=>this.changeAddress("ssh")}>SSH</span> */}
|
||||
<input type="text" id="copy_rep_content" value={ http_url }/>
|
||||
<span onClick={()=>jsCopy()}><i className="iconfont icon-fuzhi"></i></span>
|
||||
<span>
|
||||
<Dropdown overlay={downloadUrl} trigger={['click']} placement="bottomRight">
|
||||
<a className="ant-dropdown-link">
|
||||
<Icon type="cloud-download" className="font-18 fl"/>
|
||||
</a>
|
||||
</Dropdown></span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default CloneAddress;
|
@ -0,0 +1,9 @@
|
||||
.branchDropdown{
|
||||
border:1px solid #eee;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding:0px 10px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
Loading…
Reference in new issue