Closed ulissepress closed 5 years ago
Question / suggestion: the 'rete-vue-renderer-plugin' should be built having 'vue; as peerDependencies and not as 'dependencies' ?
This way you avoid vue versions conflicts?
You forgot the </script>
at the end of file
Hi @Ni55aN thank you for the reply.
I created a CodeSandBox (https://codesandbox.io/s/retejs-test-jw1rz) where you can replicate the issue.
I also replaced my own .vue component with the one suggested by you (link)
Now the initial values in the textbox are displayed (without errors) but when you try to change the values you start getting again JS errors (and of course the rete is not updated / processed):
[Vue warn]: Error in v-on handler: "TypeError: this.change is not a function" TypeError: this.change is not a function ... (+others similar)
PS: BTW my local project is a VUE CLI 3 project :-)
Ok I found the issue: I installed latest retejs packages via NPM but the example seems using other version / API. I 'merged' manually my code with this one (https://github.com/retejs/rete.js.org/blob/master/src/rete/controls/field/index.js) and now is working fine.
HI
i just 'imported' one of the example available in the docs in my vue project| (typescript + VUE CLI 3).
Event is compiling correctly, at runtime I get a series of warning from vue:
[Vue warn]: Property or method "readonly" is not defined on the instance but referenced during render. Make sure that this property is reactive, 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.
The result is that visually I see the node (with a textbox inside) but the textbox has no value (emtpy).
Seems that for VUE the component NumberControl.vue does not have the prop 'readyonly' and not have the data 'value' attr.
CODESANDBOX LINK: https://codesandbox.io/s/retejs-test-jw1rz
Here the source code:
NumberControl.vue
Here the rest:
here the packages.json file