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.
@vuemod/vue-touch
Advanced tools
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
Readme
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
yarn add @vuemod/vue-touch
import touch from "@vuemod/vue-touch";
import type {VueTouch} from "@vuemod/vue-touch";
const app = createApp(App); // App - common component
app.use(touch, {} as VueTouch.Options); // options is optional
When installed globally, directives will be added:
import {defineTouch} from "@vuemod/vue-touch";
import type {VueTouch} from "@vuemod/vue-touch";
import {defineComponent} from "vue";
const app = createApp(defineComponent({
directives: {
touch: defineComponent({} as VueTouch.Options)
}
})); // App - common component
<template>
<div v-touch:tap:10="onTap">Test Event</div>
</template>
<script lang="ts">
import {defineComponent} from "vue";
import type {VueTouchEvent} from "@vuemod/vue-touch";
export default defineComponent({
name: "App",
methods: {
onAll(event: VueTouchEvent) {
console.log(event);
}
}
});
</script>
interface VueTouchEvent {
originalEvent: event,
type: VueTouch.events,
direction: "left" | "right" | "up" | "down",
currentXY: number[],
multi: number,
shiftXY: number[],
scale: 0|1|-1,
scroll: number[]
}
interface VueTouchScrollEvent {
originalEvent: event,
scroll: [number, number]
}
interface Options {
classes?: {
hover?: string,
leave?: string,
press?: string,
tap?: string,
dbltap?:string,
multi?:string,
longtap?: string,
hold?: string,
rollover?: string,
swipe?: string,
drag?: string,
release?: string,
} // classes for all state of component
tolerance?: { // in ms
tap?: number, // in px
multi?: number, // in px
dbltap?: number, // on pc it auto
longtap?: number, // in ms
hold?: number, // in ms
timeout?: number, // in ms
debounce?: number, // in ms
drag?: number, // min distance in px
swipe?: number // min distance in px
}
}
hold: "v-touch-hold",
press: "v-touch-press",
multi: "v-touch-multi",
dbltap: "v-touch-dbltap",
tap: "v-touch-tap",
longtap: "v-touch-longtap",
hover: "v-touch-hover",
leave: "v-touch-leave",
rollover: "v-touch-rollover",
swipe: "v-touch-swipe",
dragstart: "v-touch-dragstart",
drag: "v-touch-drag",
release: "v-touch-release",
FAQs
Enable tap, swipe, drag, touch, hold, mouse down, mouse up events on DOM Element in vue 3
The npm package @vuemod/vue-touch receives a total of 3 weekly downloads. As such, @vuemod/vue-touch popularity was classified as not popular.
We found that @vuemod/vue-touch 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.