1.快捷键图
2.在vue中的mounted或者created钩子函数上写(_this.queDing是我保存调用的方法)
let _this = this;
window.onkeydown=function(e){
let curKey = e.which;
if(curKey==112){
_this.queDing()
}
}
3.屏蔽window系统自带的操作
document.onkeydown = function (e) {
let ev = typeof event != "undefined" ? window.event : e;
if(ev.keyCode == 112 || ev.keyCode == 115 || ev.keyCode == 120){
return false;
}
};