I have a v-select list box in one component (RoadsType.vue) and its items are listed in data in export default.
<v-select v-model="position"
:items="gps_items"
:loading="loading"
label="GPS R-Positioning"
:color="color"
></v-select>
export default {
data() {
return {
gps_items: ["0", "5", "7", "10", "15", "Random"]
};
}, }
Now on selecting the item in the v-select input box, I want the output to be shown in another component's (Summary.vue) v-card text box, by calling a function.
<v-card title="Environment"
:subtitle="getPosition"
</v-card>
getPosition() {
return `GPS R-Positioning: ${this.position}`;
}
But the output doesn't print if I call the v-model of the v-select box. What should be done?