forked from pu428f3pz/InternshipProject
parent
15b931d884
commit
92a21c0edd
@ -0,0 +1,56 @@
|
||||
import React, { Component } from "react";
|
||||
|
||||
export default class Center2 extends Component {
|
||||
state = {
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
text: "云端编程环境",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
text: "远程桌面",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
text: "远程命令行",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
text: "虚拟仿真",
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
text: "交互式笔记",
|
||||
},
|
||||
],
|
||||
current: 0,
|
||||
};
|
||||
render() {
|
||||
return (
|
||||
<div className="center2">
|
||||
<h2 className="center2_box1">异质架构实践运行环境</h2>
|
||||
<h5 className="center2_box2">
|
||||
Heterogeneous Architecture Pratice Runtime Environments
|
||||
</h5>
|
||||
<ul className="center2_box3">
|
||||
{this.state.list.map((item, index) => (
|
||||
<li
|
||||
key={item.id}
|
||||
className={this.state.current === index ? "active_xuanxiang" : ""}
|
||||
onClick={() => this.handleClick(index)}
|
||||
>
|
||||
{item.text}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
handleClick(index) {
|
||||
console.log(index);
|
||||
this.setState({
|
||||
current: index,
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue