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/api/built-in-special-elements.md
+31-25Lines changed: 31 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,16 @@
1
-
:::warning 현재 이 문서는 번역 작업이 진행중입니다
2
-
:::
3
-
4
-
# Built-in Special Elements
5
-
6
-
:::info Not Components
7
-
`<component>` and `<slot>` are component-like features and part of the template syntax. They are not true components and are compiled away during template compilation. As such, they are conventionally written with lowercase in templates.
1
+
# 빌트인 특수 엘리먼트 {#built-in-special-elements}
2
+
3
+
:::info 컴포넌트가 아님
4
+
`<component>` 및 `<slot>`은 컴포넌트와 유사한 기능이며,
5
+
템플릿 문법의 일부입니다.
6
+
이것들은 진정한 컴포넌트가 아니며,
7
+
템플릿 컴파일 중에 편집됩니다.
8
+
따라서 템플릿에서 일반적으로 소문자로 작성됩니다.
8
9
:::
9
10
10
11
## `<component>`
11
12
12
-
A "meta component" for rendering dynamic components or elements.
13
+
동적 컴포넌트 또는 엘리먼트를 렌더링하기 위한 "메타 컴포넌트"입니다.
13
14
14
15
-**Props**
15
16
@@ -21,15 +22,15 @@ A "meta component" for rendering dynamic components or elements.
21
22
22
23
-**세부 사항**:
23
24
24
-
The actual component to render is determined by the `is` prop.
25
+
`is`라는 prop의 값으로 랜더링할 실제 컴포넌트가 결정됩니다:
25
26
26
-
-When `is` is a string, it could be either an HTML tag name or a component's registered name.
27
+
-문자열인 경우, HTML 태그 이름 또는 컴포넌트로 등록된 이름일 수 있음.
27
28
28
-
-Alternatively, `is` can also be directly bound to the definition of a component.
29
+
-컴포넌트의 정의에 직접 바인딩될 수도 있음.
29
30
30
31
-**예제**:
31
32
32
-
Rendering components by registered name (Options API):
33
+
등록된 이름으로 컴포넌트 렌더링(옵션 API):
33
34
34
35
```vue
35
36
<script>
@@ -51,7 +52,7 @@ A "meta component" for rendering dynamic components or elements.
51
52
</template>
52
53
```
53
54
54
-
Rendering components by definition (Composition API with `<script setup>`):
55
+
정의에 따른 컴포넌트 렌더링(`<script setup>`이 있는 컴포지션 API):
55
56
56
57
```vue
57
58
<script setup>
@@ -64,13 +65,15 @@ A "meta component" for rendering dynamic components or elements.
64
65
</template>
65
66
```
66
67
67
-
Rendering HTML elements:
68
+
HTML 엘리먼트 렌더링:
68
69
69
70
```vue-html
70
71
<component :is="href ? 'a' : 'span'"></component>
71
72
```
72
73
73
-
The [built-in components](./built-in-components.html) can all be passed to `is`, but you must register them if you want to pass them by name. For example:
74
+
[빌트인 컴포넌트](./built-in-components.html)는 모두 `is`에 전달할 수 있지만,
75
+
이름으로 전달하려면 등록해야 합니다.
76
+
예를 들어:
74
77
75
78
```vue
76
79
<script>
@@ -91,36 +94,39 @@ A "meta component" for rendering dynamic components or elements.
91
94
</template>
92
95
```
93
96
94
-
Registration is not required if you pass the component itself to `is` rather than its name, e.g. in `<script setup>`.
-**참고**: [가이드 - 컴포넌트 기초: 동적 컴포넌트](/guide/essentials/component-basics.html#dynamic-components)
97
101
98
102
## `<slot>`
99
103
100
-
Denotes slot content outlets in templates.
104
+
템플릿의 슬롯 콘텐츠를 내보낼 지점을 나타냅니다.
101
105
102
106
-**Props**
103
107
104
108
```ts
105
109
interfaceSlotProps {
106
110
/**
107
-
* Any props passed to <slot> to passed as arguments
108
-
* for scoped slots
111
+
* 범위가 지정된 슬롯의 인자로 전달하기 위해
112
+
* <slot>에 전달된 모든 props
109
113
*/
110
114
[key:string]:any
111
115
/**
112
-
* Reserved for specifying slot name.
116
+
* 슬롯 이름을 지정.
113
117
*/
114
118
name?:string
115
119
}
116
120
```
117
121
118
122
-**세부 사항**:
119
123
120
-
The `<slot>` element can use the `name` attribute to specify a slot name. When no `name` is specified, it will render the default slot. Additional attributes passed to the slot element will be passed as slot props to the scoped slot defined in the parent.
124
+
`<slot>` 엘리먼트는 `name` 속성을 사용하여 슬롯 이름을 지정할 수 있습니다.
125
+
`name`을 지정하지 않으면 기본 슬롯으로 렌더링됩니다.
126
+
슬롯 엘리먼트에 전달된 추가 속성은 부모 내부에서 범위가 정의된 슬롯에 슬롯 props로 전달됩니다.
121
127
122
-
The element itself will be replaced by its matched slot content.
128
+
엘리먼트는 일치하는 슬롯의 콘텐츠로 대체됩니다.
123
129
124
-
`<slot>`elements in Vue templates are compiled into JavaScript, so they are not to be confused with [native`<slot>`elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot).
0 commit comments