Skip to content

Commit 3fd1d03

Browse files
committed
feature: two way data binding
1 parent f7fd7ed commit 3fd1d03

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

todo-list/src/App.vue

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</button>
3030
</div>
3131
<div class="column column-80">
32-
<h3 class="no-margin">{{ task.title }}</h3>
32+
<input type="text" class="task-input no-margin" v-model="task.title">
3333
</div>
3434
</div>
3535
<div v-if="!tasks.length">
@@ -144,6 +144,15 @@ export default {
144144
border-radius: 10px;
145145
}
146146
147+
input.task-input {
148+
padding: 0;
149+
border: 0;
150+
font-size: 2.8rem;
151+
line-height: 1.3;
152+
font-weight: 300;
153+
color: $color-secondary;
154+
}
155+
147156
.button-check {
148157
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.20);
149158
width: 36px;
@@ -154,8 +163,10 @@ export default {
154163
}
155164
156165
.task-done {
157-
text-decoration: line-through;
158-
color: #cccccc;
166+
input.task-input {
167+
text-decoration: line-through;
168+
color: #cccccc;
169+
}
159170
.button-check {
160171
box-shadow: 0 0 10px 0 inset rgba(0, 0, 0, 0.20);
161172
background-color: #cccccc;

0 commit comments

Comments
 (0)