0👍
✅
You should use computed
property instead method:
computed: {
vselectItem() {
let selectedItem = this.items.find((item) => item.value == this.selected);
return (selectedItem && selectedItem.text2) ? selectedItem.text2 : "";
},
}
Here is codepen sample show how it works.
Source:stackexchange.com