1、引入組件

2、state中設置選中狀態
// button按鈕的默認選中,0代表選中
state = {
currentIndex: 0
}
3、設置class的樣式,點擊更改選中
selectNew(){
this.setState({currentIndex:0});
}
selectOld(){
this.setState({currentIndex:1});
}
