mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
feat: 重构 useRefs
This commit is contained in:
parent
14ba72dd1c
commit
9f8e010534
@ -1,2 +1,3 @@
|
||||
export * from './onMountedOrActivated';
|
||||
export * from './useAttrs';
|
||||
export * from './useRefs';
|
||||
|
@ -64,7 +64,7 @@
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import vClickOutside from '/@/directives/clickOutside';
|
||||
import { useDesign } from '/@/hooks/web/useDesign';
|
||||
import { useRefs } from '/@/hooks/core/useRefs';
|
||||
import { useRefs } from '@vben/hooks';
|
||||
import { useMenuSearch } from './useMenuSearch';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useAppInject } from '/@/hooks/web/useAppInject';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import type { Menu } from '/@/router/types';
|
||||
import { type Menu } from '/@/router/types';
|
||||
import { type AnyFunction } from '@vben/types';
|
||||
import { ref, onBeforeMount, unref, Ref, nextTick } from 'vue';
|
||||
import { getMenus } from '/@/router/menus';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
@ -26,7 +27,7 @@ function createSearchReg(key: string) {
|
||||
return new RegExp(str);
|
||||
}
|
||||
|
||||
export function useMenuSearch(refs: Ref<HTMLElement[]>, scrollWrap: Ref<ElRef>, emit: EmitType) {
|
||||
export function useMenuSearch(refs: Ref<HTMLElement[]>, scrollWrap: Ref, emit: AnyFunction) {
|
||||
const searchResult = ref<SearchResult[]>([]);
|
||||
const keyword = ref('');
|
||||
const activeIndex = ref(-1);
|
||||
|
Loading…
Reference in New Issue
Block a user