mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
Update example
This commit is contained in:
parent
209beb0677
commit
1f7508d033
@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "nuxt-async-data",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"axios": "^0.15.2",
|
||||
"axios": "latest",
|
||||
"nuxt": "latest"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -9,14 +9,9 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData ({ req }, callback) {
|
||||
setTimeout(function () {
|
||||
// callback(err, data)
|
||||
callback(null, {
|
||||
asyncData: ({ req }) => ({
|
||||
userAgent: (req ? req.headers['user-agent'] : navigator.userAgent)
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user