I stumbled upon this interesting question, but unfortunately it didn't provide any solution.
"element": [
{
"value": "<button @click='changeTheme()' class='theme-link btn btn-light'>Default</button>",
"class": "text-success"
}
]
I have connected the JSON data with my Vue Component in the following way:
<p v-else v-html="element[0].value"></p>
Now, I am attempting to trigger this method. However, it's not working as expected!
methods: {
changeTheme() {
alert("Y");
}
}