Skip to content

Commit e588bcb

Browse files
committed
번역: tutorial/step-4
1 parent f0c4bb7 commit e588bcb

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<!-- make this button work -->
2-
<button>count is: {{ count }}</button>
1+
<!-- 이 버튼이 작동하도록 만들어 봅시다 -->
2+
<button>숫자 세기: {{ count }}</button>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<button @click="increment">count is: {{ count }}</button>
1+
<button @click="increment">숫자 세기: {{ count }}</button>

ko-KR/src/tutorial/src/step-4/description.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Event Listeners
1+
# 이벤트 리스너
22

3-
We can listen to DOM events using the `v-on` directive:
3+
`v-on` 디렉티브를 사용하여 DOM 이벤트를 수신할 수 있습니다:
44

55
```vue-html
66
<button v-on:click="increment">{{ count }}</button>
77
```
88

9-
Due to its frequent use, `v-on` also has a shorthand syntax:
9+
자주 사용되기 때문에 `v-on`에는 다음과 같은 단축 문법도 있습니다:
1010

1111
```vue-html
1212
<button @click="increment">{{ count }}</button>
1313
```
1414

1515
<div class="options-api">
1616

17-
Here, `increment` references a function declared using the `methods` option:
17+
여기서 참조되는 `increment``methods` 옵션을 사용하여 선언된 함수입니다:
1818

1919
<div class="sfc">
2020

@@ -27,7 +27,7 @@ export default {
2727
},
2828
methods: {
2929
increment() {
30-
// update component state
30+
// 컴포넌트의 count 상태 업데이트
3131
this.count++
3232
}
3333
}
@@ -46,7 +46,7 @@ createApp({
4646
},
4747
methods: {
4848
increment() {
49-
// update component state
49+
// 컴포넌트의 count 상태 업데이트
5050
this.count++
5151
}
5252
}
@@ -55,15 +55,17 @@ createApp({
5555

5656
</div>
5757

58-
Inside a method, we can access the component instance using `this`. The component instance exposes the data properties declared by `data`. We can update the component state by mutating these properties.
58+
메서드 내에서 `this`를 사용하여 컴포넌트 인스턴스에 접근할 수 있습니다.
59+
컴포넌트 인스턴스는 `data`에 의해 선언된 데이터 속성을 노출합니다.
60+
이러한 속성을 변경하여 컴포넌트 상태를 업데이트할 수 있습니다.
5961

6062
</div>
6163

6264
<div class="composition-api">
6365

6466
<div class="sfc">
6567

66-
Here, `increment` is referencing a function declared in `<script setup>`:
68+
여기서 참조되는 `increment``<script setup>`에서 선언된 함수입니다:
6769

6870
```vue{6-9}
6971
<script setup>
@@ -72,7 +74,7 @@ import { ref } from 'vue'
7274
const count = ref(0)
7375
7476
function increment() {
75-
// update component state
77+
// 컴포넌트의 count 상태 업데이트
7678
count.value++
7779
}
7880
</script>
@@ -82,14 +84,14 @@ function increment() {
8284

8385
<div class="html">
8486

85-
Here, `increment` is referencing a method in the object returned from `setup()`:
87+
여기서 참조되는 `increment``setup()`에서 반환된 객체의 메서드입니다:
8688

8789
```js{$}
8890
setup() {
8991
const count = ref(0)
9092
9193
function increment(e) {
92-
// update component state
94+
// 컴포넌트의 count 상태 업데이트
9395
count.value++
9496
}
9597
@@ -102,10 +104,13 @@ setup() {
102104

103105
</div>
104106

105-
Inside the function, we can update the component state by mutating refs.
107+
함수 내에서 ref 값을 변경하여 컴포넌트 상태를 업데이트할 수 있습니다.
106108

107109
</div>
108110

109-
Event handlers can also use inline expressions, and can simplify common tasks with modifiers. These details are covered in <a target="_blank" href="/guide/essentials/event-handling.html">Guide - Event Handling</a>.
111+
이벤트 핸들러는 인라인 표현식을 사용할 수도 있으며,
112+
수식어를 사용하여 일반적인 작업을 단순화할 수 있습니다.
113+
이러한 세부 사항은 <a target="_blank" href="/guide/essentials/event-handling.html">가이드 - 이벤트 핸들링</a>에서 다룹니다.
110114

111-
Now, try to implement the `increment` <span class="options-api">method</span><span class="composition-api">function</span> yourself and bind it to the button using `v-on`.
115+
이제 `increment` <span class="options-api">메소드</span><span class="composition-api">함수</span>를 직접 구현하고,
116+
`v-on`을 사용하여 버튼에 바인딩 해봅시다.

0 commit comments

Comments
 (0)