jy-dblclick-outside

1.0.0 • Public • Published

ClickOutside

Vue click outside directive.

Installation

$ npm install jy-dblclick-outside

Example

<template>
  <div>
    <div v-dbl-click-outside="hide" @click="toggle">Toggle</div>
    <div v-show="opened">test</div>
  </div>
</template>

<script>
import DblClickOutside from 'jy-dblclick-outside'

export default {
  data () {
    return {
      opened: false
    }
  },

  methods: {
    toggle () {
      this.opened = true
    },

    hide () {
      this.opened = false
    }
  },
  

  // 自定义指令注册
  directives: {
    DblClickOutside
  }
}
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i jy-dblclick-outside

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.84 kB

Total Files

3

Last publish

Collaborators

  • cxqdfe