Skip to content

Commit

Permalink
fix showEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji8 committed Mar 8, 2021
1 parent bb2d459 commit 0921479
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/components/shared/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,21 @@ export default class Calendar extends Vue {
}
showEvent({ nativeEvent, event }) {
const open = () => {
this.selectedEvent = event
this.selectedElement = nativeEvent.target
setTimeout(() => {
this.selectedOpen = true
}, 10)
}
if (this.selectedOpen) {
this.selectedOpen = false
setTimeout(open, 10)
} else {
this.selectedOpen = true
this.selectedEvent = event
this.selectedElement = nativeEvent.target
open()
}
nativeEvent.stopPropagation()
}
Expand Down

0 comments on commit 0921479

Please sign in to comment.