哪位大神知道我写的vue返回上一页代码哪里错了

<!DOCTYPE html> <meta charset="utf-8"/> <html>  <script src="vue.js"></script> <script src="vue-router.js"></script>   <body>  <div id="app">  <button @click="goback">goback</button> </div>  </body> <script>  var app = new Vue({ el:"#app",  data:{

        },  methods:{ goback:function(){ this.$router.go(-1);  }
        }
    }) </script>  </html>
#前端##JavaScript#
全部评论

相关推荐

点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务