vue回车键登陆

created() {
    let that = this;
    document.onkeypress = function(e) {
      var keycode = document.all ? event.keyCode : e.which;
      if (keycode == 13) {
        that.login();// 登录方法名
         return false;
      }
    };
  }
发布了117 篇原创文章 · 获赞 446 · 访问量 62万+

猜你喜欢

转载自blog.csdn.net/zhuoganliwanjin/article/details/94985100
今日推荐