vue實現頁面跳轉(簡易版)


1、用點擊函數

 <button  class="btntop" @click="gootherpage">跳轉頁面</button>

函數

gootherpage(){
              this.$router.push('/FileDetail')
          },

 

2、rooterlink

<router-link to="/FileDetail"  tag='a'>詳情 </router-link>

 

 

 

 

注以上方法都需要先配置頁面的路由

  {
      path: '/FileDetail',
      name:'FileDetail',
      component: FileDetail
    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM