Skip to content

Commit 5432b8b

Browse files
committed
修复了因按Tab键而造成的布局混乱的问题
1 parent d28f23f commit 5432b8b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/main.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'normalize.css'
33
import './style.css'
44
import App from './App.vue'
55
import { initResources } from '@/utils/resources'
6-
import { i18n,getI18nType } from '@/utils/i18n'
6+
import { i18n, getI18nType } from '@/utils/i18n'
77

88
(async () => {
99
const resource = await initResources();
@@ -15,4 +15,15 @@ import { i18n,getI18nType } from '@/utils/i18n'
1515
setTimeout(() => {
1616
loadingEl.remove()
1717
}, 1000);
18-
})();
18+
})();
19+
20+
document.onkeydown = function HandleTabKey(evt) {
21+
if (evt.keyCode == 9) {
22+
if (evt.preventDefault) {
23+
evt.preventDefault();
24+
}
25+
else {
26+
evt.returnValue = false;
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)