Class VueDirective
java.lang.Object
io.github.jeemv.springboot.vuejs.parts.AbstractVueComposition
io.github.jeemv.springboot.vuejs.parts.VueDirective
VueDirective
This class is part of springBoot-VueJS
-
Field Summary
FieldsFields inherited from class io.github.jeemv.springboot.vuejs.parts.AbstractVueComposition
internal, name
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()
protected VueDirective
Adds an event in the directivecalled only once, when the directive is first bound to the element.onComponentUpdated
(String body) called after the containing component’s VNode and the VNodes of its children have updated.onInserted
(String body) called when the bound element has been inserted into its parent node (this only guarantees parent node presence, not necessarily in-document).called only once, when the directive is unbound from the element.called after the containing component’s VNode has updated, but possibly before its children have updated.void
setDeep()
To also detect nested value changes inside Objectsvoid
setShortHand
(String shortHand) toString()
Methods inherited from class io.github.jeemv.springboot.vuejs.parts.AbstractVueComposition
getScript
-
Field Details
-
methods
-
shortHand
-
-
Constructor Details
-
VueDirective
public VueDirective() -
VueDirective
- Parameters:
name
- The directive name (ex: demo for v-demo directive)
-
VueDirective
- Parameters:
name
- The directive nameshortHand
- Same behavior on bind and update, but don’t care about the other hooks
-
-
Method Details
-
setShortHand
-
onBind
called only once, when the directive is first bound to the element. This is where you can do one-time setup work. arguments of the method are el, binding and vnode- Parameters:
body
- The javascript code associated- Returns:
- the directive
-
onUpdate
called after the containing component’s VNode has updated, but possibly before its children have updated. arguments of the method are el, binding, vnode and oldVnode- Parameters:
body
- The javascript code associated- Returns:
- The directive
-
onComponentUpdated
called after the containing component’s VNode and the VNodes of its children have updated. arguments of the method are el, binding, vnode and oldVnode- Parameters:
body
- The javascript code associated- Returns:
- The directive
-
onInserted
called when the bound element has been inserted into its parent node (this only guarantees parent node presence, not necessarily in-document). arguments of the method are el, binding and vnode- Parameters:
body
- The javascript code associated- Returns:
- The directive
-
onUnbind
called only once, when the directive is unbound from the element. arguments of the method are el, binding and vnode- Parameters:
body
- The javascript code associated- Returns:
- The directive
-
on
Adds an event in the directive- Parameters:
event
- The associated eventbody
- The javascript code associated- Returns:
-
toString
-
getType
- Specified by:
getType
in classAbstractVueComposition
-
setDeep
public void setDeep()To also detect nested value changes inside Objects
-