CroudTech / vue-fullcalendar

FullCalendar Wrapper for vue
MIT License
483 stars 100 forks source link

Events mouseover and mouseout ? #75

Closed braimond-carelabs closed 7 years ago

braimond-carelabs commented 7 years ago

Hi,

It seems that there is only eventRender, eventDestroy, eventClick, eventDrop, eventResize, dayClick and select events.

Is it possible to add mouseover and mouseout ? Or a generic method like fireMethod ?

Thank you for this great plugin !

braimond-carelabs commented 7 years ago

After testing it, this work perfectly :


eventMouseover(...args) {
    self.$emit('mouse-over', ...args)
},

eventMouseout(...args) {
    self.$emit('mouse-out', ...args)
},
BrockReece commented 7 years ago

You can also pass these options in as part of the config prop. This is a methodology that I would encourage as it mean's you won't have to rely on us to update this wrapper when things change on Fullcalendar.js

Happy to have a conversation about that though?


// parent.vue
...
config: {
  eventMouseover(...args) {
    // handle the event in this component
  },

  eventMouseout(...args) {
    // handle the event in this component
  },
}
BrockReece commented 7 years ago

Oh and we do have a fire method that can be called from the parent component too.

this.$refs.calendar.fireMethod('name', arg)

I have just realised this isn't in the docs though, I will add it soon.

braimond-carelabs commented 7 years ago

Ok thank you, this feature is really useful :)

I already had found the fireMethod in issues, but not the events in config object !

It will be really helpful for everybody in the doc.

Thanks for your quick answer.

BrockReece commented 7 years ago

Cool, I will look at adding these features to the readme. Happy to help.