From ebb67243c8583f12bb5ce797e9a53e6ff90b818a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sat, 8 Jul 2017 20:26:11 +0200 Subject: [PATCH] Fix path and add random image --- examples/plugins-vendor/nuxt.config.js | 2 +- examples/plugins-vendor/package.json | 6 +++--- examples/plugins-vendor/pages/about.vue | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/plugins-vendor/nuxt.config.js b/examples/plugins-vendor/nuxt.config.js index 76d693a3a1..f6aac43a42 100644 --- a/examples/plugins-vendor/nuxt.config.js +++ b/examples/plugins-vendor/nuxt.config.js @@ -4,6 +4,6 @@ module.exports = { }, plugins: [ // ssr: false to only include it on client-side - { src: '~plugins/vue-notifications.js', ssr: false } + { src: '~/plugins/vue-notifications.js', ssr: false } ] } diff --git a/examples/plugins-vendor/package.json b/examples/plugins-vendor/package.json index c0bd19a84f..995af2c330 100644 --- a/examples/plugins-vendor/package.json +++ b/examples/plugins-vendor/package.json @@ -1,10 +1,10 @@ { "name": "nuxt-plugins-vendor", "dependencies": { - "axios": "^0.15.2", - "mini-toastr": "^0.3.10", + "axios": "^0.16.2", + "mini-toastr": "^0.6.5", "nuxt": "latest", - "vue-notifications": "^0.7.0" + "vue-notifications": "^0.8.0" }, "scripts": { "dev": "nuxt", diff --git a/examples/plugins-vendor/pages/about.vue b/examples/plugins-vendor/pages/about.vue index 1567978005..8e4571fe61 100644 --- a/examples/plugins-vendor/pages/about.vue +++ b/examples/plugins-vendor/pages/about.vue @@ -10,7 +10,8 @@ import axios from 'axios' export default { asyncData () { - return axios.get('https://jsonplaceholder.typicode.com/photos/4').then(res => res.data) + const nb = Math.max(1, Math.round(Math.random() * 10)) + return axios.get(`https://jsonplaceholder.typicode.com/photos/${nb}`).then(res => res.data) } }