perf(login): enter to log in

This commit is contained in:
Vben
2021-03-05 00:47:14 +08:00
parent 8f76ef4e70
commit b93f20f0df
16 changed files with 64 additions and 55 deletions

View File

@@ -3,6 +3,7 @@ import type { Menu } from '/@/router/types';
import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue';
import { getMenus } from '/@/router/menus';
import { KeyCodeEnum } from '/@/enums/keyCodeEnum';
import { cloneDeep } from 'lodash-es';
import { filter, forEach } from '/@/utils/helper/treeHelper';
@@ -19,13 +20,6 @@ export interface SearchResult {
icon?: string;
}
const enum KeyCodeEnum {
UP = 38,
DOWN = 40,
ENTER = 13,
ESC = 27,
}
// Translate special characters
function transform(c: string) {
const code: string[] = ['$', '(', ')', '*', '+', '.', '[', ']', '?', '\\', '^', '{', '}', '|'];