perf(@vant/use): reduce usePageVisibility event binding (#9835)
* perf(@vant/use): reduce usePageVisibility event binding * chore: update
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Ref, unref } from 'vue';
|
||||
import { inBrowser } from '../utils';
|
||||
import { useEventListener } from '../useEventListener';
|
||||
|
||||
export type UseClickAwayOptions = {
|
||||
@@ -11,10 +10,6 @@ export function useClickAway(
|
||||
listener: EventListener,
|
||||
options: UseClickAwayOptions = {}
|
||||
) {
|
||||
if (!inBrowser) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { eventName = 'click' } = options;
|
||||
|
||||
const onClick = (event: Event) => {
|
||||
|
||||
Reference in New Issue
Block a user