调整章节选择

dev_cs
杨树林 6 years ago
parent f0d664bd9a
commit 76e778aba0

@ -41,6 +41,21 @@ const treeData = [
{ title: '0-1-0-0', key: '0-1-0-0' },
{ title: '0-1-0-1', key: '0-1-0-1' },
{ title: '0-1-0-2', key: '0-1-0-2' },
{ title: '0-1-0-3', key: '0-1-0-3' },
{ title: '0-1-0-4', key: '0-1-0-4' },
{ title: '0-1-0-5', key: '0-1-0-5' },
{ title: '0-1-0-6', key: '0-1-0-6' },
{ title: '0-1-0-7', key: '0-1-0-7' },
{ title: '0-1-0-8', key: '0-1-0-8' },
{ title: '0-1-0-9', key: '0-1-0-9' },
{ title: '0-1-0-10', key: '0-1-0-10' },
{ title: '0-1-0-11', key: '0-1-0-11' },
{ title: '0-1-0-12', key: '0-1-0-12' },
{ title: '0-1-0-13', key: '0-1-0-13' },
{ title: '0-1-0-14', key: '0-1-0-15' },
{ title: '0-1-0-16', key: '0-1-0-16' },
{ title: '0-1-0-17', key: '0-1-0-17' },
{ title: '0-1-0-18', key: '0-1-0-18' },
],
},
{
@ -79,6 +94,16 @@ class MyEduChapterupdate extends Component {
myeduchecked:e.target.checked,
})
// console.log(`checked = ${e.target.checked}`);
if(e.target.checked===true){
this.setState({
checkedKeys:['0-0','0-1','0-2'],
})
}else {
this.setState({
checkedKeys:[],
})
}
}
onExpand =(expandedKeys) => {
@ -132,9 +157,24 @@ class MyEduChapterupdate extends Component {
width:"100%"
}}>
<div style={{
heigth:"459px",
width:"100%"
}}>
width:"100%",
}}
className="private-listtwo heigth459px"
>
<style>
{
`
span {
max-width: 500px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
`
}
</style>
<Tree
checkable
onExpand={this.onExpand}

@ -7,3 +7,28 @@
flex-direction: row-reverse;
}
.heigth459px{
max-height:459px;
}
.private-listtwo{
overflow-y: auto;
overflow-x: hidden;
}
/*滚动条*/
.private-listtwo::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.private-listtwo::-webkit-scrollbar-thumb {
background-color: #E3EBF4;
box-shadow: 0px 0px black;
}
.private-listtwo::-webkit-scrollbar-track {
border-radius:3px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
Loading…
Cancel
Save