|
|
@@ -53,9 +53,9 @@ Component({
|
|
|
let index = e.currentTarget.dataset.index
|
|
|
let list =_that.data.list
|
|
|
list[index].checked = !list[index].checked
|
|
|
- if (list[index].subMenus && list[index].subMenus.length > 0) {
|
|
|
- console.log('list[index].subMenus',list[index].subMenus)
|
|
|
- list[index].subMenus.forEach(res => {
|
|
|
+ if (list[index].children && list[index].children.length > 0) {
|
|
|
+ console.log('list[index].children',list[index].children)
|
|
|
+ list[index].children.forEach(res => {
|
|
|
res.checked = list[index].checked
|
|
|
})
|
|
|
}
|
|
|
@@ -72,10 +72,10 @@ Component({
|
|
|
let index = e.currentTarget.dataset.index
|
|
|
let index_ = e.currentTarget.dataset.index_
|
|
|
let list = this.data.list
|
|
|
- list[index].subMenus[index_].checked = !list[index].subMenus[index_].checked
|
|
|
- if(list[index].subMenus.filter(res=>{
|
|
|
+ list[index].children[index_].checked = !list[index].children[index_].checked
|
|
|
+ if(list[index].children.filter(res=>{
|
|
|
res.checked
|
|
|
- }).length == list[index].subMenus.length){
|
|
|
+ }).length == list[index].children.length){
|
|
|
list[index].checked = true
|
|
|
}else{
|
|
|
list[index].checked = false
|