feat(Cli): windows系统禁用左右方向键导航 vant2版本 (#8589)

关联PR:#8588
This commit is contained in:
nemo-shen 2021-04-21 09:45:07 +08:00 committed by GitHub
parent 9ef870e491
commit 07f138a308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,10 @@ export default {
},
keyboardNav(direction) {
if (/win(32|64)/.test(navigator.userAgent.toLocaleLowerCase())) {
return;
}
const nav = direction === 'prev' ? this.leftNav : this.rightNav;
if (nav.path) {
this.$router.push(this.base + nav.path);