Open DerProfi opened 3 years ago
Hey @DerProfi, nice start!
@click works normally on App.vue. You can check that by changing the following line on that file (add the click there):
<div class="container" @click="change">
The problem is that your Field.vue does not emit any click events. To solve it, you have two options:
<field v-for="(field, idx) in fields" :key="idx" @click.native="change"/>
You can read more about this modifier here: https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components
That should solve your problem.
Now, let me also add a couple of comments about the code structure and the app here.
Let me know what you think.
@leandroinacio I can't figure out how to make the rendered components clickable in the App.Vue. Tried using $emit, but it doesn't work.