You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/07/29 08:12:23 UTC

[echarts-handbook] branch master updated: fix active style

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts-handbook.git


The following commit(s) were added to refs/heads/master by this push:
     new a1811a0  fix active style
a1811a0 is described below

commit a1811a0857beeeaf9dc5e34e74e7fc0f3f02cb0a
Author: pissang <bm...@gmail.com>
AuthorDate: Thu Jul 29 16:12:11 2021 +0800

    fix active style
---
 components/partials/SidebarNavItem.vue | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/components/partials/SidebarNavItem.vue b/components/partials/SidebarNavItem.vue
index cae9ce1..dea14ea 100644
--- a/components/partials/SidebarNavItem.vue
+++ b/components/partials/SidebarNavItem.vue
@@ -1,5 +1,5 @@
 <template>
-  <li :class="['nav-item', isActived ? 'actived' : '']" v-if="!item.draft">
+  <li class="nav-item" v-if="!item.draft">
     <nuxt-link class="nav-link" v-if="!item.children" :to="link">
       <span class="title">{{ item.title }}</span>
     </nuxt-link>
@@ -59,10 +59,6 @@ export default Vue.extend({
     link(): string {
       const locale = (this as any).$i18n.locale
       return '/' + locale + '/' + this.path
-    },
-
-    isActived(): boolean {
-      return this.$route.params.post === this.path
     }
   },
 
@@ -100,10 +96,8 @@ export default Vue.extend({
       padding: 2px 6px;
     }
 
-    &.actived {
-      .nav-link {
-        color: #5470c6;
-      }
+    .nav-link.nuxt-link-active {
+      color: #5470c6;
     }
 
     .nav-link:hover > .title {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org