Skip to content

Commit ac024b0

Browse files
committed
문서 번역: api/options-misc.md
미삭제 원문 삭제: options-composition.md
1 parent 4d3af3f commit ac024b0

File tree

2 files changed

+60
-44
lines changed

2 files changed

+60
-44
lines changed

ko-KR/src/api/options-composition.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,6 @@
248248

249249
B 컴포넌트 확장에 A 컴포넌트를 사용하면, A 컴포넌트의 옵션을 상속받을 수 있습니다.
250250

251-
From an implementation perspective, `extends` is almost identical to `mixins`. The component specified by `extends` will be treated as though it were the first mixin.
252-
253-
However, `extends` and `mixins` express different intents. The `mixins` option is primarily used to compose chunks of functionality, whereas `extends` is primarily concerned with inheritance.
254-
255-
As with `mixins`, any options will be merged using the relevant merge strategy.
256-
257251
구현의 관점에서 `extens``mixins`와 거의 동일합니다.
258252
`extens`로 지정된 컴포넌트는 첫 번째 믹스인인 것처럼 처리됩니다.
259253

ko-KR/src/api/options-misc.md

Lines changed: 60 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
:::warning 현재 이 문서는 번역 작업이 진행중입니다
2-
:::
1+
<script setup>
2+
import CustomPreferenceSwitch from './CustomPreferenceSwitch.vue'
3+
</script>
34

4-
5-
6-
# Options: Misc
5+
# 옵션: 기타 {#options-misc}
76

87
## name
98

10-
Explicitly declare a display name for the component.
9+
표시될 컴포넌트 이름을 명시적으로 선언합니다.
1110

1211
- **타입**:
1312

@@ -19,47 +18,74 @@ Explicitly declare a display name for the component.
1918

2019
- **세부 사항**:
2120

22-
The name of a component is used for the following:
21+
컴포넌트의 이름은 다음에 사용됩니다:
2322

24-
- Recursive self-reference in the component's own template
25-
- Display in Vue DevTools' component inspection tree
26-
- Display in warning component traces
23+
- 컴포넌트 자체 템플릿의 재귀적 참조
24+
- Vue DevTools의 컴포넌트 검사 트리에 표시
25+
- 컴포넌트 경고 추적에 표시
2726

28-
When you use Single-File Components, the component already infers its own name from the filename. For example, a file named `MyComponent.vue` will have the inferred display name "MyComponent".
27+
싱글 파일 컴포넌트를 사용할 때,
28+
컴포넌트는 파일 이름으로 고유한 이름을 유추합니다.
29+
예를 들어,
30+
`MyComponent.vue`라는 파일에서 유추된 이름 "MyComponent"입니다.
2931

30-
Another case is that when a component is registered globally with [`app.component`](/api/application.html#app-component), the global ID is automatically set as its name.
32+
또는 컴포넌트를 [`app.component`](/api/application.html#app-component)를 사용하여 전역으로 등록하면,
33+
전역 ID가 자동으로 이름으로 설정되는 경우 입니다.
3134

32-
The `name` option allows you to override the inferred name, or to explicitly provide a name when no name can be inferred (e.g. when not using build tools, or an inlined non-SFC component).
35+
`name` 옵션을 사용하면,
36+
유추된 이름을 재정의하거나 이름을 유추할 수 없는 경우(예: 빌드 도구를 사용하지 않거나 인라인된 SFC가 아닌 컴포넌트를 사용하는 경우),
37+
이름을 명시적으로 제공할 수 있습니다.
3338

34-
There is one case where `name` is explicitly necessary: when matching against cacheable components in [`<KeepAlive>`](/guide/built-ins/keep-alive.html) via its `include / exclude` props.
39+
`name`이 명시적으로 필요한 경우는 단 하나로,
40+
[`<KeepAlive>`](/guide/built-ins/keep-alive.html)`include / exclude` props를 통해 캐시 가능한 컴포넌트를 정의하는 경우입니다.
3541

3642
## inheritAttrs
3743

3844
- **타입**:
3945

4046
```ts
4147
interface ComponentOptions {
42-
inheritAttrs?: boolean // default: true
48+
inheritAttrs?: boolean // 기본 값: true
4349
}
4450
```
4551

4652
- **세부 사항**:
4753

48-
By default, parent scope attribute bindings that are not recognized as props will "fallthrough". This means that when we have a single-root component, these bindings will be applied to the root element of the child component as normal HTML attributes. When authoring a component that wraps a target element or another component, this may not always be the desired behavior. By setting `inheritAttrs` to `false`, this default behavior can be disabled. The attributes are available via the `$attrs` instance property and can be explicitly bound to a non-root element using `v-bind`.
54+
기본적으로 props로 인식되지 않는 부모 범위(scope)의 속성 바인딩은 "폴스루(fallthrough)"됩니다.
55+
즉, 싱글 루트 컴포넌트가 있는 경우,
56+
이러한 바인딩이 일반 HTML 속성으로 자식 컴포넌트의 루트 엘리먼트에 적용됩니다.
57+
대상이 되는 엘리먼트 또는 다른 컴포넌트를 래핑하는 컴포넌트를 작성할 때,
58+
이러한 동작을 원치 않을 수 있습니다.
59+
`inheritAttrs``false`로 설정하면,
60+
이 기본 동작을 비활성화할 수 있습니다.
61+
속성은 `$attrs` 인스턴스 속성을 통해 사용할 수 있으며,
62+
`v-bind`를 사용하여 루트가 아닌 요소에 명시적으로 바인딩할 수 있습니다.
4963

5064
- **예제**:
5165

52-
<div class="options-api">
66+
<div class="composition-api">
67+
68+
`<script setup>`을 사용하는 컴포넌트에서 이 옵션을 선언해야 할 경우,
69+
별도의 `<script>` 블록이 필요합니다:
70+
71+
</div>
72+
73+
<CustomPreferenceSwitch />
74+
75+
<div class="composition-api">
5376

5477
```vue
5578
<script>
5679
export default {
57-
inheritAttrs: false,
58-
props: ['label', 'value'],
59-
emits: ['input']
80+
inheritAttrs: false
6081
}
6182
</script>
6283
84+
<script setup>
85+
defineProps(['label', 'value'])
86+
defineEmits(['input'])
87+
</script>
88+
6389
<template>
6490
<label>
6591
{{ label }}
@@ -73,22 +99,17 @@ Explicitly declare a display name for the component.
7399
```
74100

75101
</div>
76-
<div class="composition-api">
77-
78-
When declaring this option in a component that uses `<script setup>`, a separate `<script>` block is necessary:
102+
<div class="options-api">
79103

80104
```vue
81105
<script>
82106
export default {
83-
inheritAttrs: false
107+
inheritAttrs: false,
108+
props: ['label', 'value'],
109+
emits: ['input']
84110
}
85111
</script>
86112
87-
<script setup>
88-
defineProps(['label', 'value'])
89-
defineEmits(['input'])
90-
</script>
91-
92113
<template>
93114
<label>
94115
{{ label }}
@@ -103,11 +124,11 @@ Explicitly declare a display name for the component.
103124

104125
</div>
105126

106-
- **참고**: [Fallthrough Attributes](/guide/components/attrs.html)
127+
- **참고**: [가이드 - 폴스루 속성](/guide/components/attrs.html)
107128

108129
## components
109130

110-
An object that registers components to be made available to the component instance.
131+
컴포넌트 인스턴스에서 다른 컴포넌트를 사용할 수 있도록 등록하는 객체입니다.
111132

112133
- **타입**:
113134

@@ -125,19 +146,19 @@ An object that registers components to be made available to the component instan
125146

126147
export default {
127148
components: {
128-
// shorthand
149+
// 단축 표기 (객체 리터럴 문법)
129150
Foo,
130-
// register under a different name
151+
// 다른 이름으로 등록
131152
RenamedBar: Bar
132153
}
133154
}
134155
```
135156

136-
- **참고**: [Component Registration](/guide/components/registration.html)
157+
- **참고**: [가이드 - 컴포넌트 등록](/guide/components/registration.html)
137158

138159
## directives
139160

140-
An object that registers directives to be made available to the component instance.
161+
컴포넌트 인스턴스에서 사용할 수 있도록 커스텀 디렉티브를 등록하는 객체입니다.
141162

142163
- **타입**:
143164

@@ -152,7 +173,7 @@ An object that registers directives to be made available to the component instan
152173
```js
153174
export default {
154175
directives: {
155-
// enables v-focus in template
176+
// 템플릿에서 v-focus 사용 가능
156177
focus: {
157178
mounted(el) {
158179
el.focus()
@@ -166,6 +187,7 @@ An object that registers directives to be made available to the component instan
166187
<input v-focus>
167188
```
168189

169-
A hash of directives to be made available to the component instance.
190+
번잡해질 수 있는 기능을 정의한 디렉티브로,
191+
간단하게 컴포넌트 인스턴스에서 사용할 수 있습니다.
170192

171-
- **참고**: [Custom Directives](/guide/reusability/custom-directives.html)
193+
- **참고**: [가이드 - 커스텀 디렉티브](/guide/reusability/custom-directives.html)

0 commit comments

Comments
 (0)