File tree Expand file tree Collapse file tree 5 files changed +18
-18
lines changed
src/examples/src/handling-input Expand file tree Collapse file tree 5 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ export const sidebar = {
428
428
link : '/examples/#hello-world'
429
429
} ,
430
430
{
431
- text : '사용자 입력 처리하기 ' ,
431
+ text : '사용자 입력 핸들링 ' ,
432
432
link : '/examples/#handling-input'
433
433
} ,
434
434
{
Original file line number Diff line number Diff line change @@ -2,16 +2,15 @@ import { ref } from 'vue'
2
2
3
3
export default {
4
4
setup ( ) {
5
- const message = ref ( 'Hello World !' )
5
+ const message = ref ( '안녕 Vue !' )
6
6
7
7
function reverseMessage ( ) {
8
- // Access/mutate the value of a ref via
9
- // its .value property.
8
+ // .value 속성을 통해 ref 값에 접근/변경합니다.
10
9
message . value = message . value . split ( '' ) . reverse ( ) . join ( '' )
11
10
}
12
11
13
12
function notify ( ) {
14
- alert ( 'navigation was prevented .' )
13
+ alert ( '탐색이 금지되었습니다 .' )
15
14
}
16
15
17
16
return {
Original file line number Diff line number Diff line change 1
1
export default {
2
2
data ( ) {
3
3
return {
4
- message : 'Hello World !'
4
+ message : '안녕 Vue !'
5
5
}
6
6
} ,
7
7
methods : {
8
8
reverseMessage ( ) {
9
9
this . message = this . message . split ( '' ) . reverse ( ) . join ( '' )
10
10
} ,
11
11
notify ( ) {
12
- alert ( 'navigation was prevented .' )
12
+ alert ( '탐색이 금지되었습니다 .' )
13
13
}
14
14
}
15
15
}
Original file line number Diff line number Diff line change 1
1
<!--
2
- Note we don't need .value inside templates because
3
- refs are automatically "unwrapped" in templates.
2
+ 컴포지션 API 스타일의 경우,
3
+ ref는 템플릿에서 자동으로 "언래핑"되므로
4
+ 템플릿 내에서 .value가 필요하지 않습니다.
4
5
-->
5
6
< h1 > {{ message }}</ h1 >
6
7
7
8
<!--
8
- Bind to a method/function .
9
- The @click syntax is short for v-on:click .
9
+ 메서드/함수에 바인딩합니다 .
10
+ @click 문법은 v-on:click의 줄임말입니다 .
10
11
-->
11
- < button @click ="reverseMessage "> Reverse Message </ button >
12
+ < button @click ="reverseMessage "> 메시지 뒤집기 </ button >
12
13
13
- <!-- Can also be an inline expression statement -->
14
- < button @click ="message += '!' "> Append "!"</ button >
14
+ <!-- 인라인 표현식 문장이 될 수도 있습니다 -->
15
+ < button @click ="message += '!' "> "!" 추가하기 </ button >
15
16
16
17
<!--
17
- Vue also provides modifiers for common tasks
18
- such as e.preventDefault() and e.stopPropagation()
18
+ Vue는 e.preventDefault() 및 e.stopPropagation()과 같은
19
+ 일반적인 작업에 대한 수식어를 제공합니다.
19
20
-->
20
21
< a href ="https://vuejs.org " @click.prevent ="notify ">
21
- A link with e.preventDefault()
22
+ e.preventDefault()가 작동하는 링크
22
23
</ a >
Original file line number Diff line number Diff line change 1
- This example demonstrates handling user input with the v-on directive .
1
+ 이 예제는 v-on 디렉티브로 사용자 입력을 처리하는 방법을 보여줍니다 .
You can’t perform that action at this time.
0 commit comments