displaySelect(){
console.log(this.state.taskArray);
componentDidMount() {
returnData = [
{ "name": "任务一:开始了", "id": "1,2,3" },
{ "name": "任务二:准备中", "id": "2,3,5,6,7" },
{ "name": "任务三:进行中", "id": "5,6,7" },
{ "name": "任务四:执行了", "id": "10,12,15" },
{ "name": "任务五:结束了", "id": "21,23,25" }
]
var taskArray = []
for(var tname in returnData){
taskArray[tname] = returnData[tname]['name']
}
this.setState({taskArray: taskArray})
console.log('=========this.state.taskArray=========')
console.log(this.state.taskArray)
var taskId = []
for(var tid in returnData){
taskId[tid] = returnData[tid]['id']
}
this.setState({taskId: taskId})
}
return (
{/* 选择 锁定与未锁定 onmouseenter onmouseleave */}
<div className={'locking_frame'}
onMouseEnter={this.displaySelect}
onMouseLeave={this.hideSelect}>
<div className={'locking_result'} >
<span className={'locking_show'}></span>
</div>
<div className={'locking_list'}>
<ul className={'locking_ul'}>
</ul>
</div>
</div>
)
相关分类