fix lint errors

This commit is contained in:
pooya parsa 2019-02-26 13:11:30 +03:30
parent a43246d0e1
commit a9d9bbe207
4 changed files with 14 additions and 14 deletions

View File

@ -18,6 +18,9 @@ function getRandomColor() {
} }
export default { export default {
components: {
DoughnutChart
},
async asyncData({ env }) { async asyncData({ env }) {
const res = await axios.get(`https://api.github.com/repos/nuxt/nuxt.js/stats/contributors?access_token=${env.githubToken}`) const res = await axios.get(`https://api.github.com/repos/nuxt/nuxt.js/stats/contributors?access_token=${env.githubToken}`)
return { return {
@ -32,9 +35,6 @@ export default {
] ]
} }
} }
},
components: {
DoughnutChart
} }
} }
</script> </script>

View File

@ -10,6 +10,9 @@ import axios from 'axios'
import moment from 'moment' import moment from 'moment'
export default { export default {
components: {
BarChart
},
async asyncData({ env }) { async asyncData({ env }) {
const res = await axios.get(`https://api.github.com/repos/nuxt/nuxt.js/stats/commit_activity?access_token=${env.githubToken}`) const res = await axios.get(`https://api.github.com/repos/nuxt/nuxt.js/stats/commit_activity?access_token=${env.githubToken}`)
return { return {
@ -24,9 +27,6 @@ export default {
] ]
} }
} }
},
components: {
BarChart
} }
} }
</script> </script>

View File

@ -21,6 +21,9 @@
import socket from '~/plugins/socket.io.js' import socket from '~/plugins/socket.io.js'
export default { export default {
watch: {
'messages': 'scrollToBottom'
},
asyncData(context, callback) { asyncData(context, callback) {
socket.emit('last-messages', function (messages) { socket.emit('last-messages', function (messages) {
callback(null, { callback(null, {
@ -29,9 +32,6 @@ export default {
}) })
}) })
}, },
watch: {
'messages': 'scrollToBottom'
},
beforeMount() { beforeMount() {
socket.on('new-message', (message) => { socket.on('new-message', (message) => {
this.messages.push(message) this.messages.push(message)

View File

@ -6,15 +6,15 @@
<script> <script>
export default { export default {
asyncData() {
return {
[Math.random()]: true
}
},
computed: { computed: {
debug() { debug() {
return JSON.stringify(this.$data, null, 2) return JSON.stringify(this.$data, null, 2)
} }
},
asyncData() {
return {
[Math.random()]: true
}
} }
} }
</script> </script>