JuliaGizmos / Vue.jl

a Julia wrapper for Vue.js
Other
21 stars 8 forks source link

vue can't be nested #8

Open piever opened 6 years ago

piever commented 6 years ago

The following works:

using Blink, WebIO, Vue
s = Observable("")
ui = vue(dom"input[v-model=value]"(), ["value" => s])
using Blink
w = Window()
body!(w, ui)

and s gets updated correctly as I type. However if I put it into another vue:

template = dom"div"(ui)
ui2 = vue(template, ["test" => Observable("")])
body!(w, ui2)

the observable s does not get updated and in the Blink console I get the error (at vue.js:584):

[Vue warn]: Property or method "value" is not defined on the instance but referenced
during render. Make sure that this property is active either in the data option, or for
class-based components, by initializing the property. See
https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

(found in <Root>)