From 70fa9f20e3ee68c770c8954204227ae40abb809c Mon Sep 17 00:00:00 2001 From: eduardobattisti Date: Sun, 19 Mar 2023 20:43:57 -0300 Subject: [PATCH 1/6] feat: add computed and condition to workspace route --- src/components/NavBar.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 9ece1e2..83e3e8d 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -10,7 +10,11 @@

PreVue

- + +
+ Workspace +
+
Tree
@@ -64,6 +68,9 @@ export default { get() { return this.$store.state.rerenderKey; } + }, + isTreeRoute() { + return this.$router.currentRoute.value.name === 'tree'; } } }; From a6bb2d17287487c8bb8f8516f1be0dab3c563781 Mon Sep 17 00:00:00 2001 From: eduardobattisti Date: Sun, 19 Mar 2023 20:44:31 -0300 Subject: [PATCH 2/6] feat: migrate code to composition API --- src/components/NavBar.vue | 70 ++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 83e3e8d..a80f05d 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -7,14 +7,14 @@ role="navigation" aria-label="main navigation" > - +

PreVue

- +
- Workspace + WorkSpace
- +
Tree
@@ -31,49 +31,37 @@ -