Skip to content

Commit

Permalink
いろいろ変更
Browse files Browse the repository at this point in the history
  • Loading branch information
mpg-mariko-kobayashi committed May 21, 2018
1 parent 0fa1d84 commit ab6b0f4
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions src/Todos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@
<input v-model="text" type="textarea" id="textarea" ref="profile" v-on:keyup.13="addTodos" placeholder="追加したい内容を入力してください" maxlength='50'>
</div>
<h3>やるべきことリスト</h3>
<table id="todoList">
<thead><td></td><td>id</td><td>項目名</td><td>日付</td></thead>
<template v-for="(todo, index) in todoList">
<tr v-on:click="changeTodosStatus(todo.id, 1)">
<td>○</td>
<td>{{todo.id}}</td>
<td id="todo[index]">{{todo.value}}</td>
<td>{{todo.date}}</td>
</tr>
</template>
</table>
<template v-if="todoList.length > 0">
<table id="todoList">
<thead><td></td><td>id</td><td>項目名</td><td>日付</td></thead>
<template v-for="(todo, index) in todoList">
<tr v-on:click="changeTodosStatus(todo.id, 1)">
<td>○</td>
<td>{{todo.id}}</td>
<td id="todo[index]">{{todo.value}}</td>
<td>{{todo.date}}</td>
</tr>
</template>
</table>
</template>
<h3>完了済み</h3>
<table id="doneList">
<thead><td></td><td>id</td><td>項目名</td><td>日付</td></thead>
<template v-for="(todo, index) in doneList">
<tr v-on:click="changeTodosStatus(todo.id, 0)">
<td>✔</td>
<td>{{todo.id}}</td>
<td id="todo[index]">{{todo.value}}</td>
<td>{{todo.date}}</td>
</tr>
</template>
</table>

<template v-if="doneList.length > 0">
<table id="doneList">
<thead><td></td><td>id</td><td>項目名</td><td>日付</td></thead>
<template v-for="(todo, index) in doneList">
<tr v-on:click="changeTodosStatus(todo.id, 0)">
<td>✔</td>
<td>{{todo.id}}</td>
<td id="todo[index]">{{todo.value}}</td>
<td>{{todo.date}}</td>
</tr>
</template>
</table>
</template>
</div>
</template>

Expand Down

0 comments on commit ab6b0f4

Please sign in to comment.