I've recently started working with Vue.js and I encountered an issue where I needed to pass a value to the v-model of a template in my main.js file. Here is the template:
Inside main.js
Vue.component("app-input", {
template: `
<b-row class="my-1 key">
<b-col sm="5" class="text_aln_rht">
<label>{{labelName}}</label>
</b-col>
<b-col sm="7">
<b-form-input
size="sm"
v-model="val"
></b-form-input>
</b-col>
</b-row>
`,
props: {
labelName: String,
val: String
},
methods: {
}
});
This piece of code is from the component
example.vue
<app-input id="MF" name="TYPE_U32" labelName="test" val="Text"></app-input>
Thank you!