Skip to content

Commit 95bf886

Browse files
authored
Merge pull request #263 from niceplugin/api/built-in-special-elements
문서 번역: api/built-in-special-elements.md
2 parents 84f6929 + 6535dbf commit 95bf886

File tree

1 file changed

+31
-25
lines changed

1 file changed

+31
-25
lines changed

ko-KR/src/api/built-in-special-elements.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff 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+
따라서 템플릿에서 일반적으로 소문자로 작성됩니다.
89
:::
910

1011
## `<component>`
1112

12-
A "meta component" for rendering dynamic components or elements.
13+
동적 컴포넌트 또는 엘리먼트를 렌더링하기 위한 "메타 컴포넌트"입니다.
1314

1415
- **Props**
1516

@@ -21,15 +22,15 @@ A "meta component" for rendering dynamic components or elements.
2122

2223
- **세부 사항**:
2324

24-
The actual component to render is determined by the `is` prop.
25+
`is`라는 prop의 값으로 랜더링할 실제 컴포넌트가 결정됩니다:
2526

26-
- When `is` is a string, it could be either an HTML tag name or a component's registered name.
27+
- 문자열인 경우, HTML 태그 이름 또는 컴포넌트로 등록된 이름일 수 있음.
2728

28-
- Alternatively, `is` can also be directly bound to the definition of a component.
29+
- 컴포넌트의 정의에 직접 바인딩될 수도 있음.
2930

3031
- **예제**:
3132

32-
Rendering components by registered name (Options API):
33+
등록된 이름으로 컴포넌트 렌더링(옵션 API):
3334

3435
```vue
3536
<script>
@@ -51,7 +52,7 @@ A "meta component" for rendering dynamic components or elements.
5152
</template>
5253
```
5354

54-
Rendering components by definition (Composition API with `<script setup>`):
55+
정의에 따른 컴포넌트 렌더링(`<script setup>`이 있는 컴포지션 API):
5556

5657
```vue
5758
<script setup>
@@ -64,13 +65,15 @@ A "meta component" for rendering dynamic components or elements.
6465
</template>
6566
```
6667

67-
Rendering HTML elements:
68+
HTML 엘리먼트 렌더링:
6869

6970
```vue-html
7071
<component :is="href ? 'a' : 'span'"></component>
7172
```
7273

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+
예를 들어:
7477

7578
```vue
7679
<script>
@@ -91,36 +94,39 @@ A "meta component" for rendering dynamic components or elements.
9194
</template>
9295
```
9396

94-
Registration is not required if you pass the component itself to `is` rather than its name, e.g. in `<script setup>`.
97+
이름이 아닌 컴포넌트 자체를 `is`에 전달하는 경우,
98+
등록이 필요하지 않습니다(예를 들어 `<script setup>`에서).
9599

96-
- **참고**: [Dynamic Components](/guide/essentials/component-basics.html#dynamic-components)
100+
- **참고**: [가이드 - 컴포넌트 기초: 동적 컴포넌트](/guide/essentials/component-basics.html#dynamic-components)
97101

98102
## `<slot>`
99103

100-
Denotes slot content outlets in templates.
104+
템플릿의 슬롯 콘텐츠를 내보낼 지점을 나타냅니다.
101105

102106
- **Props**
103107

104108
```ts
105109
interface SlotProps {
106110
/**
107-
* Any props passed to <slot> to passed as arguments
108-
* for scoped slots
111+
* 범위가 지정된 슬롯의 인자로 전달하기 위해
112+
* <slot>에 전달된 모든 props
109113
*/
110114
[key: string]: any
111115
/**
112-
* Reserved for specifying slot name.
116+
* 슬롯 이름을 지정.
113117
*/
114118
name?: string
115119
}
116120
```
117121

118122
- **세부 사항**:
119123

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로 전달됩니다.
121127

122-
The element itself will be replaced by its matched slot content.
128+
엘리먼트는 일치하는 슬롯의 콘텐츠로 대체됩니다.
123129

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).
130+
Vue 템플릿의 `<slot>` 엘리먼트는 JavaScript로 컴파일되므로 [네이티브 `<slot>` 엘리먼트](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot)와 혼동하면 안됩니다.
125131

126-
- **참고**: [Component - Slots](/guide/components/slots.html)
132+
- **참고**: [가이드 - 슬롯](/guide/components/slots.html)

0 commit comments

Comments
 (0)