Теперь у меня есть следующее < /p>
@{{packhouse.PlantName}}
@{{ selectLabel }}
< /code>
и < /p>
var packhouses = {!! json_encode($plants) !!};
new Vue({
el: '#root',
data: { key: '',
select: '',
message: 'Hello World'
},
methods:{
onChange(event)
{
console.log(event.target.value);
VownerTitle = '9999';
}
},
computed: {
selectLabel() {
if (!this.selected) return 'Make a selection';
return this.packhouses.find(opt => opt.id == this.selected).PlantName;
}
},
});
< /code>
Когда я изменяюсь
value="@{packhouse.id )">образно>
Подробнее здесь: https://stackoverflow.com/questions/582 ... in-a-label