You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ko-KR/src/tutorial/src/step-11/description.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
-
# Components
1
+
# 컴포넌트
2
2
3
-
So far, we've only been working with a single component. Real Vue applications are typically created with nested components.
3
+
지금까지 우리는 단일 컴포넌트로만 작업했습니다.
4
+
일반적으로 실제 Vue 앱은 중첩된 컴포넌트를 사용하여 생성됩니다.
4
5
5
-
A parent component can render another component in its template as a child component. To use a child component, we need to first import it:
6
+
상위 컴포넌트는 다른 컴포넌트를 템플릿의 하위 컴포넌트로 렌더링할 수 있습니다.
7
+
자식 컴포넌트를 사용하려면 먼저 가져와야 합니다:
6
8
7
9
<divclass="composition-api">
8
10
<divclass="sfc">
@@ -27,14 +29,15 @@ export default {
27
29
}
28
30
```
29
31
30
-
We also need to register the component using the `components` option. Here we are using the object property shorthand to register the `ChildComp` component under the `ChildComp` key.
32
+
그런 다음 `components` 옵션을 사용하여 컴포넌트를 등록해야 합니다.
33
+
여기서는 [객체 축약형 속성명](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#property_definitions) 문법을 사용하여 `ChildComp`로 컴포넌트를 등록했습니다.
31
34
32
35
</div>
33
36
</div>
34
37
35
38
<divclass="sfc">
36
39
37
-
Then, we can use the component in the template as:
40
+
그런 다음 템플릿에서 컴포넌트를 다음과 같이 사용할 수 있습니다:
38
41
39
42
```vue-html
40
43
<ChildComp />
@@ -54,15 +57,16 @@ createApp({
54
57
})
55
58
```
56
59
57
-
We also need to register the component using the `components` option. Here we are using the object property shorthand to register the `ChildComp` component under the `ChildComp` key.
60
+
그런 다음 `components` 옵션을 사용하여 컴포넌트를 등록해야 합니다.
61
+
여기서는 [객체 축약형 속성명](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#property_definitions) 문법을 사용하여 `ChildComp`로 컴포넌트를 등록했습니다.
58
62
59
-
Because we are writing the template in the DOM, it will be subject to browser's parsing rules, which is case-insensitive for tag names. Therefore, we need to use the kebab-cased name to reference the child component:
63
+
DOM에 템플릿을 작성하므로 태그의 대소문자를 구분하지 않는 브라우저 문법 분석 규칙이 적용됩니다.
64
+
따라서 하위 컴포넌트를 참조하려면 케밥 케이스(kebab-cased) 이름을 사용해야 합니다:
60
65
61
66
```vue-html
62
67
<child-comp></child-comp>
63
68
```
64
69
65
70
</div>
66
71
67
-
68
-
Now try it yourself - import the child component and render it in the template.
0 commit comments