Skip to content

Commit

Permalink
update: examples with iframe within click outside element
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodeleao committed Sep 3, 2020
1 parent e22831a commit d2d287f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions example/src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<p>Click Outside Lime box</p>
</div>

<div class="blue-box" v-click-outside="onBlueClick">
<p>Click Outside blue box</p>
<iframe tabindex="1" class="iframe-button-example" src="/about" />
</div>

<iframe class="iframe" src="/about" width="100%" />
</div>
</div>
Expand Down Expand Up @@ -64,6 +69,10 @@ export default {
onLimeClick(ev) {
console.log('Clicked outside Lime!', ev)
},
onBlueClick(ev) {
console.log(`Clicked outside Blue!`, ev)
},
},
}
</script>
Expand All @@ -85,6 +94,19 @@ export default {
height: 50px;
}
.blue-box {
background-color: blue;
color: white;
}
.iframe-button-example {
border: 2px solid white;
border-radius: 8px;
width: 200px;
height: 50px;
overflow: hidden;
}
.iframe {
border: 1px solid lightgrey;
margin-top: 1em;
Expand Down

0 comments on commit d2d287f

Please sign in to comment.