[Vuejs]-Vue JS – how to set default value from JSON into dynamically created UI fields?

0👍

The JSON node that is being passed to the component through “:currentField=’form'” should be used to set the default value. Like this-

<el-input
      type="text"
      v-model="form.value">
</el-input> 
<script>    
  export default {
    name: 'TextInput',
    props: ['form']
  }
</script>

Thanks to @kitschmaster for directing my thoughts properly

Leave a comment