<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>
-
Notifications
You must be signed in to change notification settings - Fork 2
txs1992/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 解决方案。
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published