Skip to content

v-onOnce

Function Introduction

Only one callback is triggered

Example

Usage

typescript
<script setup lang="ts">
  const handler = () => {
    window.alert('Hello!')
  }
</script>
<template>
  <button v-onOnce:click="handler">Trigger only once</button>
</template>

Released under the MIT License.