From 5717c5fd51cfe215d39a9fa48a9bdb98167dd944 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Tue, 21 Jan 2020 16:32:34 +0100 Subject: [PATCH] refactor: use vue 3 --- explorations/html5.html | 35 +++--- explorations/html5.ts | 175 ++++++++++++++++++---------- package.json | 5 +- src/components/Link.ts | 44 ++++--- src/components/View.ts | 82 +++++-------- src/index.ts | 104 +++-------------- src/router.ts | 74 ++++++------ src/types/index.ts | 11 +- src/utils/index.ts | 8 +- yarn.lock | 247 +++++++++------------------------------- 10 files changed, 295 insertions(+), 490 deletions(-) diff --git a/explorations/html5.html b/explorations/html5.html index 3f4118c6..e74fde52 100644 --- a/explorations/html5.html +++ b/explorations/html5.html @@ -16,21 +16,21 @@ .fade-leave-active { transition: opacity 0.15s ease; } - .fade-enter, - .fade-leave-active { + .fade-enter-from, + .fade-leave-to { opacity: 0; } .child-view { position: absolute; transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1); } - .slide-left-enter, - .slide-right-leave-active { + .slide-left-enter-from, + .slide-right-leave-to { opacity: 0; transform: translate(30px, 0); } - .slide-left-leave-active, - .slide-right-enter { + .slide-left-leave-to, + .slide-right-enter-from { opacity: 0; transform: translate(-30px, 0); } @@ -42,42 +42,42 @@
-

{{ message }}

-
{{ $route }}
+
{{ currentLocation }}
Name: -
{{ $route.name }}
+
{{ currentLocation.name }}
Params: -
{{ $route.params }}
+
{{ currentLocation.params }}
Query: -
{{ $route.query }}
+
{{ currentLocation.query }}
Hash: -
{{ $route.hash }}
+
{{ currentLocation.hash }}
FullPath: -
{{ $route.fullPath }}
+
{{ currentLocation.fullPath }}
path: -
{{ $route.path }}
+
{{ currentLocation.path }}