vue实现页面跳转(简易版)

一、用点击函数函数

 <button  class="btntop" @click="gootherpage">跳转页面</button>

函数this

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

 

二、rooterlinkspa

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

 

 

 

 

注以上方法都须要先配置页面的路由code

  {
      path: '/FileDetail',
      name:'FileDetail',
      component: FileDetail
    }
相关文章
相关标签/搜索