Created
August 20, 2020 21:18
-
-
Save slim-python/7dffe33a19b6fda184c4fc09d05b428a to your computer and use it in GitHub Desktop.
Vue Js part
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
<script> | |
new Vue({ | |
el: '#app', | |
data: { | |
info: 'null', | |
author: 'null' | |
}, | |
methods: { | |
}, | |
mounted() { | |
axios | |
.get('http://quotes.rest/qod.json?category=inspire') | |
.then(response => { | |
this.info = response.data.contents.quotes[0].quote | |
this.author = response.data.contents.quotes[0].author | |
}) | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment