[Vuejs]-Vue.js Dynamic Litera Directivel in plugin does not bind correctly

0👍

found the issue : should use binding.value and not binding.expression

resolved adding

    console.log('NOISE BINDING: ', binding)
    const noisecolor = binding.value || defaultNoiseColor

which lead to following console output :

LOG LOG: 'NOISE BINDING: ', Object{name: 'noise', rawName: 'v-noise',
value: 'brown', expression: 'noisecolor', modifiers: Object{}, def:
Object{isDynamicLiteral: true, bind: function bind(el, binding, vnode)
{ ... }, update: function update(el, binding, vnode) { ... }, unbind:
function unbind(el, binding, vnode) { ... }}}

LOG LOG: 'NOISE BIND: ', 'brown'

Leave a comment