created() {
var t = this;
document.onkeydown = function (e) {
if (window.event == undefined) {
var key = e.keyCode;
} else {
var key = window.event.keyCode;
}
//enter的ASCII码是13
if (key == 13) {
t.login(); //t.登录方法
}
};
}
created() {
var t = this;
document.onkeydown = function (e) {
if (window.event == undefined) {
var key = e.keyCode;
} else {
var key = window.event.keyCode;
}
//enter的ASCII码是13
if (key == 13) {
t.login(); //t.登录方法
}
};
}