Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
vue-recognizer
Advanced tools
Readme
Vue.js plugin to recognize touch, mouse, pointer events using Hammer.js.
npm install --save vue-recognizer
Import vue-recognizer
and install it.
import Vue from 'vue';
import VueRecognizer from 'vue-recognizer';
Vue.use(VueRecognizer);
<template>
<div
v-recognizer:pan="onPan"
v-recognizer:pan.right="onPanRight"
>
Lorem ipsum
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
methods: {
onPan(e: HammerInput) {...},
onPanRight(e: HammerInput) {...}
}
});
</script>
Prepare plugin file to install this plugin as below. Then name it such as vue-recognizer.ts
and put it into plugins
folder.
import Vue from 'vue';
import VueRecognizer from 'vue-recognizer';
Vue.use(VueRecognizer);
To load it, configure nuxt.config.js
or nuxt.config.ts
as below.
const config = {
plugins: [
{
src: '~/plugins/vue-recognizer.ts',
ssr: false
}
]
};
export default config;
v-recognizer:pan="onPan"
v-recognizer:pan.start="onPanStart"
v-recognizer:pan.move="onPanMove"
v-recognizer:pan.end="onPanEnd"
v-recognizer:pan.cancel="onPanCancel"
v-recognizer:pan.left="onPanLeft"
v-recognizer:pan.right="onPanRight"
v-recognizer:pan.up="onPanUp"
v-recognizer:pan.down="onPanDown"
v-recognizer:pinch="onPinch"
v-recognizer:pinch.start="onPinchStart"
v-recognizer:pinch.move="onPinchMove"
v-recognizer:pinch.end="onPinchEnd"
v-recognizer:pinch.cancel="onPinchCancel"
v-recognizer:pinch.in="onPinchIn"
v-recognizer:pinch.out="onPinchOut"
v-recognizer:press="onPress"
v-recognizer:press.up="onPressUp"
v-recognizer:rotate="onRotate"
v-recognizer:rotate.start="onRotateStart"
v-recognizer:rotate.move="onRotateMove"
v-recognizer:rotate.end="onRotateEnd"
v-recognizer:rotate.cancel="onRotateCancel"
v-recognizer:swipe="onSwipe"
v-recognizer:swipe.left="onSwipeLeft"
v-recognizer:swipe.right="onSwipeRight"
v-recognizer:swipe.up="onSwipeUp"
v-recognizer:swipe.down="onSwipeDown"
v-recognizer:tap="onTap"
v-recognizer:doubletap="onDoubleTap"
FAQs
Vue.js plugin to recognize touch, mouse, pointer events using hammerjs
The npm package vue-recognizer receives a total of 146 weekly downloads. As such, vue-recognizer popularity was classified as not popular.
We found that vue-recognizer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.