click(){varCheckAll=document.getElementById('All');varCheckBox=document.getElementsByName('box');if(CheckAll.checked==true)for(vari=0;i
click() {
var CheckAll = document.getElementById('All');
var CheckBox = document.getElementsByName('box');
if (CheckAll.checked == true)
for (var i = 0; i < this.props.items.length.length; i++) {
CheckBox[i].checked = false;
};
if (CheckAll.checked == false)
for (var i = 0; i < this.props.items.length.length; i++) {
CheckBox[i].checked = true;
};
for (var i = 0; i < this.props.items.length.length; i++) {
if (CheckBox[i].checked == true) {
CheckBox[i].checked = false;
}
else {
CheckBox[i].checked = true;
}
};
this.setState(
this.state.checked = checked
);
}
render(){
let items = [];
if(this.props.items.length == 0) {
items.push(
暂无用户);}else {
this.props.items.forEach(item => {
items.push();
});
}
return (
姓名年龄身份性别操作
{});
}
}
展开