首页 > 其他分享 >点击事件和路由跳转

点击事件和路由跳转

时间:2022-09-24 18:01:32浏览次数:59  
标签:component goDetail 点击 跳转 login 路由

 

工作常用的点击事件

1. @click="goDetail"

2. 在方法中使用

  methods:{

// 跳转到登录页

      goDetail(){

         this.$router.push("/login")

          }

  }

3.在Vue router路由中的path和component的使用

{

   path:"/login"

 component:()=>import("@/views/ucenter/login.vue")

 }

标签:component,goDetail,点击,跳转,login,路由
From: https://www.cnblogs.com/jzq521/p/16726112.html

相关文章