courseware
dinglink 5 years ago
commit d45fa00476

@ -164,7 +164,7 @@ class Fileslists extends Component{
let list = response.data.course_modules;
let course_second_categoriess;
list.map((item, key) => {
course_second_categoriess = item.children
course_second_categoriess = item.children?item.children:[]
})
this.setState({
@ -830,6 +830,7 @@ class Fileslists extends Component{
} = this.state;
let category_id= this.props.match.params.category_id;
// console.log(this.state.course_groups)
return(
<React.Fragment >
@ -1025,7 +1026,7 @@ class Fileslists extends Component{
</style>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'180px'}}>
{/* <p style={{marginLeft:15,color:"#000000",fontSize:20}}>资源</p> */}
{this.state.course_second_categories.length>10? <p className="drop_down_search">
{this.state.course_second_categories&&this.state.course_second_categories.length>10? <p className="drop_down_search">
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
</p>:""}
@ -1037,7 +1038,7 @@ class Fileslists extends Component{
{ course_modules&&course_modules.course_modules.map( (item,key) => {
return item.children.filter((item)=> {
return item.children&&item.children.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{
return(

Loading…
Cancel
Save