記錄vue遇到問題,子頁面沒有router-link對應導航欄激活樣式

li><router-link to="/basicSearch" :class="{'link-active':linkBoolean}">基礎檢索</router-link></li>
 data () {
    return {
      imgUrl,
      linkBoolean:false
    }
  },
  created(){

    if(this.$route.path == "/storeDetails" || this.$route.path == "/utxoDetails" ||                     
    this.$route.path == "/blockAllDetails"){
      this.linkBoolean = true
    }
  },

根據Router中子頁面鏈接名稱,指定對應上級頁面的導航樣式是否激活

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章