mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-11 05:11:59 +08:00
fix: Unnecessary request in tab children. (#385)
This commit is contained in:
parent
fab480816b
commit
f57a3bd11e
@ -57,6 +57,9 @@ export default {
|
|||||||
},
|
},
|
||||||
getterIsLoadContextParent() {
|
getterIsLoadContextParent() {
|
||||||
return this.getterDataParentTab.isLoadedContext
|
return this.getterDataParentTab.isLoadedContext
|
||||||
|
},
|
||||||
|
isReadyFromGetData() {
|
||||||
|
return !this.getDataSelection.isLoaded && this.getterIsLoadContextParent && this.getterIsLoadRecordParent
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -82,14 +85,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Refrest the records of the TabChildren
|
// Refrest the records of the TabChildren
|
||||||
getDataSelection(value) {
|
isReadyFromGetData(value) {
|
||||||
if (!value.isLoaded && this.getterIsLoadContextParent && this.getterIsLoadRecordParent) {
|
if (value) {
|
||||||
this.getDataTable()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// Load parent tab context
|
|
||||||
getterIsLoadContextParent(value) {
|
|
||||||
if (value && !this.getDataSelection.isLoaded && this.getterIsLoadRecordParent) {
|
|
||||||
this.getDataTable()
|
this.getDataTable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user