vue 導航欄路由切換樣式隨着切換

若是當前的路由相等,那就顯示這個  activejavascript <p :class="{active:'/home' == $route.path}" @click="goIndex()">首頁</p> methods: { goIndex() { this.$router.push("/home"); } }
相關文章
相關標籤/搜索