Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ant-mini-scratch-card

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ant-mini-scratch-card - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

24

es/scratch/index.js

@@ -54,13 +54,25 @@ Component({

// 在真机上该事件没有changedTouches属性
var point = e.touches[0];
this.lastPoint = point;
if (e.touches && e.touches[0]) {
var point = e.touches[0];
this.lastPoint = point;
}
},
onTouchMove: function onTouchMove(e) {
var point = (e.changedTouches || e.touches)[0];
this.refresh(point);
this.lastPoint = point;
var point = (e.changedTouches || e.touches || [])[0];
if (point) {
this.refresh(point);
this.lastPoint = point;
}
},
onTouchEnd: function onTouchEnd(e) {
if (!this.data.scraping) return;
var point = (e.changedTouches || e.touches)[0];
var point = (e.changedTouches || e.touches || [])[0];
if (!point) {
// 没有拿到point直接完成
this.onFinish();
this.setData({ scraping: false });
this.props.autoFadeOut && this.fadeOut();
}
this.lastPoint = null;

@@ -67,0 +79,0 @@ if (this.clearPercent > this.props.activePercent) {

{
"name": "ant-mini-scratch-card",
"version": "1.0.7",
"version": "1.0.8",
"description": "支付宝小程序刮刮卡组件",

@@ -5,0 +5,0 @@ "files": [

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