Socket
Socket
Sign inDemoInstall

@vant/touch-emulator

Package Overview
Dependencies
0
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vant/touch-emulator


Version published
Weekly downloads
2.1K
decreased by-18.57%
Maintainers
5
Install size
18.4 kB
Created
Weekly downloads
 

Readme

Source

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 />

FAQs

Last updated on 06 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc