From 1f6d89b2e9a568800947e8e0312dc92189f9ac31 Mon Sep 17 00:00:00 2001 From: Atinux Date: Mon, 6 Nov 2017 18:24:43 +0100 Subject: [PATCH] example: Update example, and use watchQuery --- examples/layout-transitions/assets/main.css | 4 +- .../layout-transitions/layouts/secondary.vue | 7 +- examples/layout-transitions/package.json | 2 +- examples/layout-transitions/pages/index.vue | 1 + examples/layout-transitions/pages/users-2.vue | 91 +++++++++++++++++++ examples/layout-transitions/pages/users.vue | 11 ++- 6 files changed, 104 insertions(+), 12 deletions(-) create mode 100644 examples/layout-transitions/pages/users-2.vue diff --git a/examples/layout-transitions/assets/main.css b/examples/layout-transitions/assets/main.css index dbb73ba005..63b42c3f6f 100644 --- a/examples/layout-transitions/assets/main.css +++ b/examples/layout-transitions/assets/main.css @@ -17,14 +17,14 @@ body { } .layout-enter-active, .layout-leave-active { - transition: opacity .5s + transition: opacity 0.5s } .layout-enter, .layout-leave-active { opacity: 0 } .bounce-enter-active { - animation: bounce-in .8s; + animation: bounce-in .5s; } .bounce-leave-active { animation: bounce-out .5s; diff --git a/examples/layout-transitions/layouts/secondary.vue b/examples/layout-transitions/layouts/secondary.vue index d4a9065bd3..57a89e59ee 100644 --- a/examples/layout-transitions/layouts/secondary.vue +++ b/examples/layout-transitions/layouts/secondary.vue @@ -1,11 +1,6 @@ diff --git a/examples/layout-transitions/package.json b/examples/layout-transitions/package.json index 38fd64e26c..822831ec96 100644 --- a/examples/layout-transitions/package.json +++ b/examples/layout-transitions/package.json @@ -5,7 +5,7 @@ "nuxt": "latest" }, "scripts": { - "dev": "../../bin/nuxt", + "dev": "nuxt", "build": "nuxt build", "start": "nuxt start" } diff --git a/examples/layout-transitions/pages/index.vue b/examples/layout-transitions/pages/index.vue index fe5ce74005..9b8b4fefa5 100644 --- a/examples/layout-transitions/pages/index.vue +++ b/examples/layout-transitions/pages/index.vue @@ -3,5 +3,6 @@

Home page

About page

Lists of users

+

Lists of users #2 (with `watch`)

diff --git a/examples/layout-transitions/pages/users-2.vue b/examples/layout-transitions/pages/users-2.vue new file mode 100644 index 0000000000..e1a038e0f1 --- /dev/null +++ b/examples/layout-transitions/pages/users-2.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/examples/layout-transitions/pages/users.vue b/examples/layout-transitions/pages/users.vue index d608a5ad7f..f7399382cf 100644 --- a/examples/layout-transitions/pages/users.vue +++ b/examples/layout-transitions/pages/users.vue @@ -6,7 +6,7 @@ Next > Next >