1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

fix: Unnecessary request in tab children. (#385)

This commit is contained in:
Edwin Betancourt 2020-03-11 21:24:33 -04:00 committed by GitHub
parent fab480816b
commit f57a3bd11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,9 @@ export default {
},
getterIsLoadContextParent() {
return this.getterDataParentTab.isLoadedContext
},
isReadyFromGetData() {
return !this.getDataSelection.isLoaded && this.getterIsLoadContextParent && this.getterIsLoadRecordParent
}
},
watch: {
@ -82,14 +85,8 @@ export default {
}
},
// Refrest the records of the TabChildren
getDataSelection(value) {
if (!value.isLoaded && this.getterIsLoadContextParent && this.getterIsLoadRecordParent) {
this.getDataTable()
}
},
// Load parent tab context
getterIsLoadContextParent(value) {
if (value && !this.getDataSelection.isLoaded && this.getterIsLoadRecordParent) {
isReadyFromGetData(value) {
if (value) {
this.getDataTable()
}
}