Socket
Socket
Sign inDemoInstall

@vant/touch-emulator

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vant/touch-emulator - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

17

changelog.md
# Changelog
### [v1.3.1]
`2021-07-06`
- support data-no-touch-simulate attr
### [v1.3.0]
`2021-05-26`
- add SSR support [\#8767](https://github.com/youzan/vant/pull/8767)
### [v1.2.0]
`2019-11-22`
- fix incorrect touchmove behaviour in Firefox [\#5118](https://github.com/youzan/vant/pull/5118)
- fix incorrect touchmove behavior in Firefox
### [v1.1.0]
`2019-06-03`

@@ -14,4 +28,5 @@

### [v1.0.0]
`2019-05-28`
- initial release

@@ -54,2 +54,15 @@ /* eslint-disable */

if (!Element.prototype.closest) {
Element.prototype.closest = function (s) {
var el = this;
do {
if (el.matches(s)) return el;
el = el.parentElement || el.parentNode;
} while (el !== null && el.nodeType === 1);
return null;
};
}
/**

@@ -134,3 +147,5 @@ * create an touch point

triggerTouch(touchType, ev);
if (eventTarget.closest('[data-no-touch-simulate]') == null) {
triggerTouch(touchType, ev);
}

@@ -137,0 +152,0 @@ // reset

2

package.json
{
"name": "@vant/touch-emulator",
"version": "1.3.0",
"version": "1.3.1",
"description": "Vant touch emulator",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -32,1 +32,9 @@ # Vant Touch Emulator

```
## 禁用 touch 模拟
在标签上添加 `data-no-touch-simulate` 属性后,可以使这个标签(以及它的子元素)不触发 `touch` 模拟事件。
```html
<div data-no-touch-simulate />
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc