Skip to content

Commit 80dee91

Browse files
authored
Merge pull request #225 from niceplugin/tutorial/step-14
번역: tutorial/step-14
2 parents 4ac8c4a + 6deb7fd commit 80dee91

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

ko-KR/src/tutorial/src/step-14/App/composition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
ChildComp
77
},
88
setup() {
9-
const msg = ref('from parent')
9+
const msg = ref('Vue는 개발자에게 정말 유용하죠! 🎁')
1010

1111
return {
1212
msg

ko-KR/src/tutorial/src/step-14/App/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
},
77
data() {
88
return {
9-
msg: 'from parent'
9+
msg: 'Vue는 개발자에게 정말 유용하죠! 🎁'
1010
}
1111
}
1212
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<slot>Fallback content</slot>
1+
<slot>대체: 부모로부터 컨텐츠를 못 받았어요! 😢</slot>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<ChildComp>Message: {{ msg }}</ChildComp>
1+
<ChildComp>부모로부터: {{ msg }}</ChildComp>
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Slots
1+
# 슬롯
22

3-
In addition to passing data via props, the parent component can also pass down template fragments to the child via **slots**:
3+
부모 컴포넌트는 자식에게 props를 사용하여 데이터를 전달하는 것 외에도, **슬롯**을 사용하여 템플릿 조각을 전달할 수 있습니다:
44

55
<div class="sfc">
66

77
```vue-html
88
<ChildComp>
9-
This is some slot content!
9+
이것은 슬롯 콘텐츠입니다!
1010
</ChildComp>
1111
```
1212

@@ -15,35 +15,36 @@ In addition to passing data via props, the parent component can also pass down t
1515

1616
```vue-html
1717
<child-comp>
18-
This is some slot content!
18+
이것은 슬롯 콘텐츠입니다!
1919
</child-comp>
2020
```
2121

2222
</div>
2323

24-
In the child component, it can render the slot content from the parent using the `<slot>` element as outlet:
24+
자식 컴포넌트가 `<slot>` 엘리먼트를 "발산 수단(outlet: 가이드에서 '아울렛'으로 표기됨)"으로 사용하면, 부모에게 전달 받은 슬롯 콘텐츠를 렌더링할 수 있습니다:
2525

2626
<div class="sfc">
2727

2828
```vue-html
29-
<!-- in child template -->
29+
<!-- 자식 템플릿에서 -->
3030
<slot/>
3131
```
3232

3333
</div>
3434
<div class="html">
3535

3636
```vue-html
37-
<!-- in child template -->
37+
<!-- 자식 템플릿에서 -->
3838
<slot></slot>
3939
```
4040

4141
</div>
4242

43-
Content inside the `<slot>` outlet will be treated as "fallback" content: it will be displayed if the parent did not pass down any slot content:
43+
`<slot>` 아울렛 내부 콘텐츠는 "대체" 콘텐츠로 처리될 수 있는데, 부모가 슬롯 콘텐츠를 전달하지 않은 경우에 표시됩니다:
4444

4545
```vue-html
46-
<slot>Fallback content</slot>
46+
<slot>대체: 부모로부터 컨텐츠를 못 받았어요! 😢</slot>
4747
```
4848

49-
Currently we are not passing any slot content to `<ChildComp>`, so you should see the fallback content. Let's provide some slot content to the child while making use of the parent's `msg` state.
49+
현재 우리는 슬롯 콘텐츠를 `<ChildComp>`에 전달하지 않았으므로, 대체 콘텐츠가 표시되고 있습니다.
50+
부모의 `msg` 상태를 슬롯 콘텐츠로 하여 자식에게 전달해봅시다.

0 commit comments

Comments
 (0)