mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
transform animation to computed method
This commit is contained in:
parent
ab8bec8a4e
commit
adcff96e29
@ -44,24 +44,24 @@ export default {
|
|||||||
oldPublicKey: '',
|
oldPublicKey: '',
|
||||||
communities: [],
|
communities: [],
|
||||||
icon: '',
|
icon: '',
|
||||||
animation: '',
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
animation() {
|
||||||
|
return this.$apollo.queries.GetCommunities.loading ? 'spin' : ''
|
||||||
|
},
|
||||||
|
},
|
||||||
apollo: {
|
apollo: {
|
||||||
GetCommunities: {
|
GetCommunities: {
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
query() {
|
query() {
|
||||||
this.animation = 'spin'
|
|
||||||
|
|
||||||
return getCommunities
|
return getCommunities
|
||||||
},
|
},
|
||||||
update({ getCommunities }) {
|
update({ getCommunities }) {
|
||||||
this.communities = getCommunities
|
this.communities = getCommunities
|
||||||
this.animation = ''
|
|
||||||
},
|
},
|
||||||
error({ message }) {
|
error({ message }) {
|
||||||
this.toastError(message)
|
this.toastError(message)
|
||||||
this.animation = ''
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user