123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Title</title>
- <link rel="stylesheet" href="../styles.css" />
- <link rel="stylesheet" href="styles.css" />
- </head>
- <body>
- <nav>
- <h1><span class="index">6</span>The need for computed properties</h1>
- <ul>
- <li><a href="../lesson5">Prev</a></li>
- <li><a href="../lesson7">Next</a></li>
- </ul>
- </nav>
- <div id="root">
- <h2>All tasks</h2>
- <ul>
- <li v-for="(task,index) in tasks">
- {{ task.description }}
- <button v-bind:data-key="index" v-on:click="onIncomplete">Incomplete</button>
- <button v-bind:data-key="index" v-on:click="onComplete">Complete</button>
- </li>
- </ul>
- <h2>Complete tasks</h2>
- <ul>
- <li v-for="task in completeTasks" v-text="task.description" />
- </ul>
- <h2>Incomplete tasks</h2>
- <ul>
- <li v-for="task in incompleteTasks" v-text="task.description" />
- </ul>
- </div>
- <script src="../lib/vue-2.1.3.js"></script>
- <script src="code.js"></script>
- </body>
- </html>
|