js的hover实现方法。
onMouseEnter={(utils.isiPad() || utils.isPhone()) ? () => { } : () => this.toggleHoverEnter(modules.length, index)}
onMouseLeave={(utils.isiPad() || utils.isPhone()) ? () => { } : () => this.toggleHoverLeave(modules.length, index)}
toggleHoverEnter = (length, index) => {
let _num = new Array(length + 1).join(0).split('');
_num[index] = 1;
this.setState({
num: _num
})
}
toggleHoverLeave = (length, index) => {
let _num = new Array(length + 1).join(0).split('');
_num[index] = 0;
this.setState({
num: _num
})
}