Merge branch 'newVersion_forge' into dev_devOps

# Conflicts:
#	src/forge/Main/CoderRootDirectory.js
This commit is contained in:
caishi 2020-08-31 16:37:31 +08:00
commit 15d3102c51
4 changed files with 26 additions and 22 deletions

View File

@ -28,8 +28,6 @@ function getPathUrl(array,index){
return str.substr(1);
}
}
class CoderRootDirectory extends Component {
constructor(props) {
super(props);
@ -92,7 +90,6 @@ class CoderRootDirectory extends Component {
this.setState({
filePath: url,
});
console.log('filepath',url);
this.getFileDetail(url);
} else {
const { branch } = this.state;
@ -368,6 +365,7 @@ class CoderRootDirectory extends Component {
}
title = (branchLastCommit,lastCommitAuthor) => {
console.log(branchLastCommit)
if (branchLastCommit) {
return (
<div className="f-wrap-alignCenter">
@ -468,18 +466,19 @@ class CoderRootDirectory extends Component {
>
{projectDetail && projectDetail.identifier}
</a>
{ array && array.map((item, key) => {
return (
<React.Fragment>
{
key === array.length-1 ?
<span className="color-grey-6 subFileName" key={key}>{item}</span>
:
<a onClick={()=>this.returnUlr(`${getPathUrl(array,key+1)}`)} className="color-blue subFileName">{item}</a>
}
</React.Fragment>
);
})}
{array &&
array.map((item, key) => {
return (
<React.Fragment>
{
key === array.length-1 ?
<span className="color-grey-6 subFileName" key={key}>{item}</span>
:
<a onClick={()=>this.returnUlr(`${getPathUrl(array,key+1)}`)} className="color-blue subFileName">{item}</a>
}
</React.Fragment>
);
})}
</span>
)}
</div>

View File

@ -1,10 +1,9 @@
import React, { Component } from 'react';
import ReactDOM from 'react-dom'
import { Button, Icon } from 'antd';
import './TaskResultLayer.css'
import './TaskResultLayer.css';
class ImageLayer extends Component {
constructor(props) {
super(props);
this.state = {
@ -21,13 +20,13 @@ class ImageLayer extends Component {
});
}
render() {
let { showImage, imageSrc, } = this.props;
return ReactDOM.createPortal(
<div>
{showImage ?
<div className="taskResultLayer">
<div className="closePanel" onClick={() => this.props.onImageLayerClose()}></div>
<div className={"ImageLayerbutton mt20"}>
<Button
className={"fr"}
@ -53,8 +52,6 @@ class ImageLayer extends Component {
<div className="passContent" style={{ transform: this.state.transStyle }}>
<img src={imageSrc} className="passImg" unselectable="on" alt="" />
</div>
</div>
:
<div></div>

View File

@ -16,7 +16,6 @@ export function ImageLayerOfCommentHOC(options = {}) {
}
onDelegateClick = (event) => {
console.log("imgclick",event);
const imageSrc = event.target.src || event.target.getAttribute('src') || event.target.getAttribute('href')
// 判断imageSrc是否是图片
const fileName = event.target.innerHTML.trim()

View File

@ -40,8 +40,17 @@
justify-content: center;
align-items: center;
display: -webkit-flex;
height: 90%;
height: 100%;
text-align: center;
position: absolute;
width:100%;
z-index: 4;
}
.closePanel{
position: absolute;
width: 100%;
height: 100%;
z-index: 5;
}
.passImg{
max-width: 86%;