feat: add use-touch hook

This commit is contained in:
陈嘉涵
2020-01-13 15:40:38 +08:00
parent f329fd9f6f
commit 0dfce17f6c
3 changed files with 67 additions and 6 deletions
+3 -5
View File
@@ -1,5 +1,5 @@
import { Ref, onMounted } from 'vue';
import { useHandler } from './use-handler';
import { Ref } from 'vue';
import { useGlobalEvent } from './use-global-event';
export type UseClickOutsideOpitons = {
event: string;
@@ -17,7 +17,5 @@ export function useClickOutside(options: UseClickOutsideOpitons) {
}
}
onMounted(() => {
useHandler(document, event, onClick, false, flag);
});
useGlobalEvent(document, event, onClick, false, flag);
}