All Projects → BosNaufal → Vue Click Outside

BosNaufal / Vue Click Outside

Licence: mit
Vue Directive to make a click outside event

Programming Languages

javascript
184084 projects - #8 most used programming language

Vue Click Outside

Vue Directive to make a click outside event, inspired by vue-clickaway

DEMO

Install

Include the vue-click-outside.js to your HTML or web page file after Vue.Js. or import it to your Javscript / Vue File.

Usage

<template>
  <div v-click-outside="clickedOutside"></div>

  <!-- You Need Delay, if you're using it together with v-if directive -->
  <div v-if="something" v-click-outside:delay="clickedOutside"></div>
</template>

<script>

  export default {

    methods: {
      hasClickedOutside(){
        alert('Clicked OutSide!')
      },
    }

  };

</script>

Thank You for Making this useful~

Hopefully this can be useful for your next projects.

Let's talk about some projects with me

Just Contact Me At:

License

MIT Copyright (c) 2016 - forever Naufal Rabbani

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].