I've been exploring the idea of incorporating multiple values into a vue
form input binding
Here's an example snippet of my code.
<template>
<div>
<label for=""> Employee </label>
<input class="form-control-plaintext" v-model="asset.current_status.user.surname" type= "text" readonly name="surname">
</div>
</template>
<script>
data(){
return:{
asset:{},
}
},
methods:{
getAsset(){
axios.get('/api/assets/'+this.id)
.then ( response => {
this.asset = response.data.data[0].data;
this.toFill = this.asset()
this.assetForm.fill(this.toFill)
})
},
},
mounted(){
this.getAsset();
}
</script>
The v-model
is currently configured to handle and display a single value for surname, I am contemplating adding another value
asset.current_status.user.last_name
to the v-model
inline but struggling to implement it correctly.