@zhpfe/touch-emulator

1.0.0 • Public • Published

Touch Emulator

在桌面端上模拟移动端 touch 事件,实现方式来自于 hammerjs/touchemulator.

Install

NPM

npm i @zhpfe/touch-emulator -S

YARN

yarn add @zhpfe/touch-emulator

使用指南

直接在代码中引入模块即可,模块会自动完成初始化并生效

import '@zhpfe/touch-emulator';

禁用 touch 模拟

在标签上添加 data-no-touch-simulate 属性后,可以使这个标签(以及它的子元素)不触发 touch 模拟事件。

<div data-no-touch-simulate />

Readme

Keywords

none

Package Sidebar

Install

npm i @zhpfe/touch-emulator

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

6.28 kB

Total Files

4

Last publish

Collaborators

  • sanlang