vLongpress
长按指令(仅支持在vue3项目中使用)
引入版本
0.80.0
Demo
vue
<script setup lang="ts">
import { vLongpress } from '@wyfex/iutils'
const val = ref(10)
// 点击增加1
const incrementPlusOne = () => {
val.value++
}
// 长按增加10
const incrementPlusTen = () => {
val.value += 10
}
</script>
<template>
<UseElButton
:btnText="val"
:extConfig="{ debounce: { delay: 0 } }"
v-longpress="incrementPlusTen"
@click="incrementPlusOne"
/>
</template>