index.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <link rel="stylesheet" href="../styles.css" />
  7. <link rel="stylesheet" href="styles.css" />
  8. </head>
  9. <body>
  10. <nav>
  11. <h1><span class="index">6</span>The need for computed properties</h1>
  12. <ul>
  13. <li><a href="../lesson5">Prev</a></li>
  14. <li><a href="../lesson7">Next</a></li>
  15. </ul>
  16. </nav>
  17. <div id="root">
  18. <h2>All tasks</h2>
  19. <ul>
  20. <li v-for="(task,index) in tasks">
  21. {{ task.description }}
  22. <button v-bind:data-key="index" v-on:click="onIncomplete">Incomplete</button>
  23. <button v-bind:data-key="index" v-on:click="onComplete">Complete</button>
  24. </li>
  25. </ul>
  26. <h2>Complete tasks</h2>
  27. <ul>
  28. <li v-for="task in completeTasks" v-text="task.description" />
  29. </ul>
  30. <h2>Incomplete tasks</h2>
  31. <ul>
  32. <li v-for="task in incompleteTasks" v-text="task.description" />
  33. </ul>
  34. </div>
  35. <script src="../lib/vue-2.1.3.js"></script>
  36. <script src="code.js"></script>
  37. </body>
  38. </html>