Możliwość wyjścia z karty po kliknięciu na zewnątrz niej

This commit is contained in:
2021-07-13 23:17:22 +02:00
parent 9ad3cc45fb
commit 528dce57f7
5 changed files with 111 additions and 99 deletions
+2 -1
View File
@@ -20,7 +20,8 @@ const i18n = createI18n({
const clickOutsideDirective: Directive = {
beforeMount(el, binding) {
console.log("before mount");
el.clickOutsideEvent = (event: Event) => {
if (!(el == event.target || el.contains(event.target))) {
binding.value();