I am currently working on a to-do application using Vue.js and I want to implement a feature where the text rendered in HTML has a line through it when the user checks an item off the list. Here is the snippet of my code:
<html>
<head>
</head>
<body>
<div id="app">
<h2 class="title">What tasks do I need to accomplish today?</h2>
<div v-for="task in tasks">
<input type="checkbox" :value="task.task" @change="handleCheck(task)">
<span :class="{ 'strikethrough': task.checked }" >{{ task.task }}</span>
</div>
<new-task @newtaskadded="addNewTaskHandler" ></new-task>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</body>
</html>