diff --git a/dist/index.js b/dist/index.js index 50e7e7ad..16c7fbd5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1864,16 +1864,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ exports.default = { name: 'vuebbble', - mounted: function mounted() { - this.get(); - }, - data: function data() { - return { - shots: [], - url: '', - error: '' - }; - }, props: { token: { @@ -1886,6 +1876,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ required: false } }, + + data: function data() { + return { + shots: [], + url: '', + error: '' + }; + }, + mounted: function mounted() { + this.get(); + }, + + methods: { get: function get() { var _this = this; diff --git a/docs/build/app.js b/docs/build/app.js index de14f788..e99d80a4 100644 --- a/docs/build/app.js +++ b/docs/build/app.js @@ -12902,16 +12902,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ exports.default = { name: 'vuebbble', - mounted: function mounted() { - this.get(); - }, - data: function data() { - return { - shots: [], - url: '', - error: '' - }; - }, props: { token: { @@ -12924,6 +12914,19 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ required: false } }, + + data: function data() { + return { + shots: [], + url: '', + error: '' + }; + }, + mounted: function mounted() { + this.get(); + }, + + methods: { get: function get() { var _this = this; diff --git a/src/components/Vuebbble.vue b/src/components/Vuebbble.vue index 47166ee3..021fd875 100755 --- a/src/components/Vuebbble.vue +++ b/src/components/Vuebbble.vue @@ -12,16 +12,7 @@ import axios from 'axios'; export default { name: 'vuebbble', - mounted() { - this.get(); - }, - data() { - return { - shots: [], - url: '', - error: '', - }; - }, + props: { token: { type: String, @@ -33,6 +24,19 @@ export default { required: false, }, }, + + data() { + return { + shots: [], + url: '', + error: '', + }; + }, + + mounted() { + this.get(); + }, + methods: { get() { this.url = 'https://api.dribbble.com/v2/user/shots?access_token=' + this.token + '&per_page=' + this.count;