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

0.0.2 • Public • Published

@6h/click-outside

NPM Version

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

返回首页

安装

npm i -S @6h/click-outside

使用

import clickOutside from '@6h/click-outside';

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

// 取消监听
cancel();

返回首页

Package Sidebar

Install

npm i @6h/click-outside

Weekly Downloads

1

Version

0.0.2

License

ISC

Unpacked Size

53.5 kB

Total Files

23

Last publish

Collaborators

  • russell-ne