i want it so that i can call a variable and manipulate it in the method like this,
<template>
<div>
<a @click=change(hair,'red')>Red</a>
<a @click=change(hair,'blue')>Blue</a>
<a @click=change(eyes,'yellow')>Yellow</a>
</div>
</template>
data() {
return {
eyes: '',
hair: ''
}
}
methods: {
change(model, type){
model = type
... someother actions
}
}
when i call the change function it receives a model and a text and then i can manipulate it on the methods area