@any86/click-outside
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@any86/click-outside

NPM Version

点击指点元素外部触发回调, 支持手机/桌面端.

返回首页

安装

npm i -S @any86/click-outside

使用

import clickOutside from '@any86/click-outside';

// 开始监听
const cancel = clickOutside(el, e=>{
    // 点击el外部触发
});

// 取消监听
cancel();

返回首页

Package Sidebar

Install

npm i @any86/click-outside

Weekly Downloads

7

Version

0.1.2

License

ISC

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • russell-ne