Skip to content

Commit

Permalink
fix: 菜单搜索功能修复 (#3688)
Browse files Browse the repository at this point in the history
  • Loading branch information
WitMiao authored Mar 26, 2024
1 parent 7c52f08 commit c1809cd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/Application/src/search/useMenuSearch.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { type Menu } from '@/router/types';
import { type AnyFunction } from '@vben/types';
import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue';
import { useI18n } from '@/hooks/web/useI18n';
import { useGo } from '@/hooks/web/usePage';
import { getMenus } from '@/router/menus';
import { cloneDeep } from 'lodash-es';
import { type Menu } from '@/router/types';
import { filter, forEach } from '@/utils/helper/treeHelper';
import { useGo } from '@/hooks/web/usePage';
import { useScrollTo } from '@vben/hooks';
import { type AnyFunction } from '@vben/types';
import { onKeyStroke, useDebounceFn } from '@vueuse/core';
import { useI18n } from '@/hooks/web/useI18n';
import { cloneDeep } from 'lodash-es';
import { Ref, nextTick, onBeforeMount, ref, unref } from 'vue';

export interface SearchResult {
name: string;
Expand Down Expand Up @@ -42,7 +42,7 @@ export function useMenuSearch(refs: Ref<HTMLElement[]>, scrollWrap: Ref, emit: A
const list = await getMenus();
menuList = cloneDeep(list);
forEach(menuList, (item) => {
item.name = t(item.name);
item.name = t(item.meta?.title || item.name);
});
});

Expand Down

0 comments on commit c1809cd

Please sign in to comment.