@vant/touch-emulator
Vant touch emulator
Last updated 2 years ago by chenjiahan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @vant/touch-emulator 
SYNC missed versions from official npm registry.

Vant Touch Emulator

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

Install

# with npm
npm i @vant/touch-emulator

# with yarn
yarn add @vant/touch-emulator

# with pnpm
pnpm add @vant/touch-emulator

使用指南

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

import '@vant/touch-emulator';

CDN 引入

<script src="https://fastly.jsdelivr.net/npm/@vant/touch-emulator"></script>

禁用 touch 模拟

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

<div data-no-touch-simulate />

Current Tags

  • 0.0.1-beta.0                                ...           beta (6 years ago)
  • 1.4.0                                ...           latest (2 years ago)

8 Versions

  • 1.4.0                                ...           2 years ago
  • 1.3.2                                ...           3 years ago
  • 1.3.1                                ...           3 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.1-beta.0                                ...           6 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE