修改兄弟组件传值

This commit is contained in:
qq787203167
2022-02-14 09:14:52 +08:00
parent 59b0ee8684
commit e2e2076002
2 changed files with 7 additions and 8 deletions
+1 -4
View File
@@ -94,10 +94,6 @@
export default {
name: 'index',
props: {
searchList: {
type: Array,
default: []
},
url: {
type: Object,
default: {}
@@ -111,6 +107,7 @@
return {
queryParam: {},
toggleSearchStatus:false,
searchList:[],
}
},
mounted() {
+6 -4
View File
@@ -111,9 +111,11 @@
this.tableAll = event.target.checked
this.checkboxList = []
if (this.tableAll) {
this.jsonBody.forEach(res => {
this.checkboxList.push(res.id)
})
if (this.jsonBody.length > 0){
this.jsonBody.forEach(res => {
this.checkboxList.push(res.id)
})
}
}
},
getTableList(search) {
@@ -122,7 +124,7 @@
}
getAction(this.url.tableList, params).then((res) => {
if (res.success) {
this.jsonBody = res.result
this.jsonBody = res.result || []
}
})
},