<template>
<div id="app">
<button v-focus-outside="focusOustsideHandler">点我啊</button>
<iframe width="100%" height="300"></iframe>
</div>
</template>
<script>
import Vue from 'vue'
import focusOutside from 'vue-focus-outside'
new Vue({
el: '#app',
directives: {
focusOutside
},
methods: {
focusOustsideHandler () {
console.log('点击到按钮外面了。')
}
}
})
</script>
forked from txs1992/v-outside
-
Notifications
You must be signed in to change notification settings - Fork 0
MMhui/v-outside
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
good click outside solution based on vue directives,很棒的基于 vue 指令的 click outside 解决方案。
Resources
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- JavaScript 100.0%