mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
perf: optimize lazy loading components
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import type { TimeoutFnResult, Fn } from './types';
|
||||
|
||||
import { isFunction } from '/@/utils/is';
|
||||
import { watch } from 'vue';
|
||||
import { Ref, watch } from 'vue';
|
||||
|
||||
import { useTimeoutRef } from '/@/hooks/core/useTimeoutRef';
|
||||
|
||||
type TimeoutFnResult = [Fn<void>, Fn<void>, Ref<boolean>];
|
||||
|
||||
export function useTimeout(handle: Fn<any>, wait: number): TimeoutFnResult {
|
||||
if (!isFunction(handle)) {
|
||||
throw new Error('handle is not Function!');
|
||||
|
Reference in New Issue
Block a user