Matestack's Vue.js APIs
Event Hub
Matestack offers an event hub, which can be used to communicate between components.
Emitting events
app/matestack/components/some_component.js
Use MatestackUiVueJs.eventHub.$emit(EVENT_NAME, OPTIONAL PAYLOAD)
Receiving events
app/matestack/components/some_component.js
Make sure to cancel the event listener within the beforeUnmount
hook!
General Vue.js API
As we're pretty much implementing pure Vue.js components, you can refer to the Vue.js guides in order to learn more about Vue.js component usage.
Please note the following differences from the original Vue.js API:
component $refs
use
this.getRefs()
instead ofthis.$refs
use
matestack_ui_vuejs_ref()
when applying refs to your componen template:
component $el
use
this.getElement()
instead ofthis.$el
in order to get the root element defined in yourresponse
method
component template/root element
use
this.getTemplateElement()
in order to get the template element wrapping the root element defined in yourresponse
method
Last updated