Last active
October 5, 2017 17:52
-
-
Save bmfteixeira/df269f204e9d0eebd58b807a2bb1d3c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div></div> | |
</template> | |
<script type="text/javascript"> | |
export default { | |
... | |
data () { | |
return { | |
currentObjects: [], | |
hasError: false | |
} | |
}, | |
methods: { | |
getObjects () { | |
... | |
}, | |
setObjects () { | |
const objectsOnStore = this.getObjects() | |
if(objectsOnStore) { | |
this.currentObjects = objectsOnStore | |
return true | |
} else { | |
this.hasError = true | |
return false | |
} | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment