dev_ec
杨树明 5 years ago
parent bae0380eb2
commit af28a5c5e8

@ -8,12 +8,13 @@ class WordsBtn extends Component {
}
render() {
let{to, href,target}=this.props
let{to, href,targets}=this.props
return(
<React.Fragment>
{
to==undefined ?
<a href={href || "javascript:void(0)"} target={target} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>
to==undefined&&targets==undefined ?
<a href={href || "javascript:void(0)"} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>:
target!=undefined? <a href={href || "javascript:void(0)"} target="_blank" onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>
:
<Link to={to} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</Link>
}

@ -1021,6 +1021,7 @@ class Studentshavecompletedthelist extends Component {
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}
@ -1211,6 +1212,7 @@ class Studentshavecompletedthelist extends Component {
>--</span>
:
<a style={{textAlign: "center"}} className="color-blue"
target="_blank"
href={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${record.myid}`}>{record.finalscore}</a>
}

@ -228,7 +228,7 @@ class PollDetailTabFirst extends Component{
width:120,
render:(operation,item,index)=>{
return(
item.status == 1 ? <WordsBtn style="blue" target={"_blank"} to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
item.status == 1 ? <WordsBtn style="blue" targets={"_blank"} to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
)
}
}];

Loading…
Cancel
Save