File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed
ko-KR/src/examples/src/todomvc Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,20 @@ const filters = {
10
10
11
11
export default {
12
12
setup ( ) {
13
- // state
13
+ // 상태
14
14
const todos = ref ( JSON . parse ( localStorage . getItem ( STORAGE_KEY ) || '[]' ) )
15
15
const visibility = ref ( 'all' )
16
16
const editedTodo = ref ( )
17
17
18
- // derived state
18
+ // 파생된 상태(계산된 속성)
19
19
const filteredTodos = computed ( ( ) => filters [ visibility . value ] ( todos . value ) )
20
20
const remaining = computed ( ( ) => filters . active ( todos . value ) . length )
21
21
22
- // handle routing
22
+ // 라우팅 핸들링
23
23
window . addEventListener ( 'hashchange' , onHashChange )
24
24
onHashChange ( )
25
25
26
- // persist state
26
+ // 상태 저장
27
27
watchEffect ( ( ) => {
28
28
localStorage . setItem ( STORAGE_KEY , JSON . stringify ( todos . value ) )
29
29
} )
Original file line number Diff line number Diff line change @@ -7,14 +7,14 @@ const filters = {
7
7
}
8
8
9
9
export default {
10
- // app initial state
10
+ // 상태 초기화
11
11
data : ( ) => ( {
12
12
todos : JSON . parse ( localStorage . getItem ( STORAGE_KEY ) || '[]' ) ,
13
13
editedTodo : null ,
14
14
visibility : 'all'
15
15
} ) ,
16
16
17
- // watch todos change for localStorage persistence
17
+ // todos의 변경사항을 감지하여 localStorage에 저장
18
18
watch : {
19
19
todos : {
20
20
handler ( todos ) {
@@ -38,8 +38,8 @@ export default {
38
38
}
39
39
} ,
40
40
41
- // methods that implement data logic .
42
- // note there's no DOM manipulation here at all .
41
+ // 데이터 로직을 구현하는 메소드 .
42
+ // 여기에는 DOM 조작이 전혀 없습니다 .
43
43
methods : {
44
44
toggleAll ( e ) {
45
45
this . todos . forEach ( ( todo ) => ( todo . completed = e . target . checked ) )
Original file line number Diff line number Diff line change 1
1
< section class ="todoapp ">
2
2
< header class ="header ">
3
- < h1 > todos </ h1 >
3
+ < h1 > 해야 할 일 </ h1 >
4
4
< input
5
5
class ="new-todo "
6
6
autofocus
7
- placeholder ="What needs to be done ? "
7
+ placeholder ="무엇을 해야 하나요 ? "
8
8
@keyup.enter ="addTodo "
9
9
>
10
10
</ header >
@@ -16,7 +16,7 @@ <h1>todos</h1>
16
16
:checked ="remaining === 0 "
17
17
@change ="toggleAll "
18
18
>
19
- < label for ="toggle-all "> Mark all as complete </ label >
19
+ < label for ="toggle-all "> 모두 완료로 표시 </ label >
20
20
< ul class ="todo-list ">
21
21
< li
22
22
v-for ="todo in filteredTodos "
@@ -45,21 +45,21 @@ <h1>todos</h1>
45
45
< footer class ="footer " v-show ="todos.length ">
46
46
< span class ="todo-count ">
47
47
< strong > {{ remaining }}</ strong >
48
- < span > {{ remaining === 1 ? 'item' : 'items' }} left </ span >
48
+ < span > 개 남음 </ span >
49
49
</ span >
50
50
< ul class ="filters ">
51
51
< li >
52
- < a href ="#/all " :class ="{ selected: visibility === 'all' } "> All </ a >
52
+ < a href ="#/all " :class ="{ selected: visibility === 'all' } "> 전체 </ a >
53
53
</ li >
54
54
< li >
55
- < a href ="#/active " :class ="{ selected: visibility === 'active' } "> Active </ a >
55
+ < a href ="#/active " :class ="{ selected: visibility === 'active' } "> 해야할 일 </ a >
56
56
</ li >
57
57
< li >
58
- < a href ="#/completed " :class ="{ selected: visibility === 'completed' } "> Completed </ a >
58
+ < a href ="#/completed " :class ="{ selected: visibility === 'completed' } "> 완료된 일 </ a >
59
59
</ li >
60
60
</ ul >
61
61
< button class ="clear-completed " @click ="removeCompleted " v-show ="todos.length > remaining ">
62
- Clear completed
62
+ 완료된 것 삭제
63
63
</ button >
64
64
</ footer >
65
65
</ section >
Original file line number Diff line number Diff line change 1
- A fully spec-compliant TodoMVC implementation
1
+ 완벽히 구현된 TodoMVC
2
2
https://todomvc.com/
You can’t perform that action at this time.
0 commit comments