Skip to content

Commit

Permalink
Update ko (#72)
Browse files Browse the repository at this point in the history
* docs: typo (vuejs#2043)

* docs: update links to the core Vue docs (vuejs#2055)

* docs: add a guide to the RouterView slot (vuejs#2049)

* docs: use vue-html for template examples (vuejs#2056)

* chore: update sponsors
  • Loading branch information
niceplugin authored Dec 3, 2023
1 parent 01e2050 commit 6041da2
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 68 deletions.
4 changes: 4 additions & 0 deletions docs/.vitepress/config/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export const koConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
text: '์ปดํฌ์ง€์…˜ API',
link: '/guide/advanced/composition-api.html',
},
{
text: 'RouterView ์Šฌ๋กฏ',
link: '/guide/advanced/router-view-slot.html',
},
{
text: 'ํŠธ๋žœ์ง€์…˜',
link: '/guide/advanced/transitions.html',
Expand Down
24 changes: 15 additions & 9 deletions docs/.vitepress/theme/components/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"gold": [],
"silver": [
{
"href": "https://www.vuemastery.com/",
"alt": "VueMastery",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/vuemastery-light.svg",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/vuemastery-dark.png"
"href": "https://www.vuemastery.com/",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/vuemastery-dark.png",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/vuemastery-light.svg"
},
{
"alt": "Prefect",
"href": "https://www.prefect.io/",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/prefectlogo-dark.svg",
"alt": "Prefect"
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/prefectlogo-light.svg"
}
],
"bronze": [
Expand All @@ -29,10 +29,16 @@
"imgSrcLight": "https://avatars.githubusercontent.com/u/4183726?u=6b50a8ea16de29d2982f43c5640b1db9299ebcd1&v=4"
},
{
"href": "https://nuxtlabs.com",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/nuxt-light.svg",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/nuxt-dark.svg",
"alt": "Nuxt Labs"
"alt": "Storyblok",
"href": "https://storyblok.com",
"imgSrcDark": "https://posva-sponsors.pages.dev/logos/storyblok.png",
"imgSrcLight": "https://posva-sponsors.pages.dev/logos/storyblok.png"
},
{
"alt": "Nuxt UI Pro Templates",
"href": "https://ui.nuxt.com/pro",
"imgSrcDark": "https://avatars.githubusercontent.com/u/81570812?v=4",
"imgSrcLight": "https://avatars.githubusercontent.com/u/81570812?v=4"
}
]
}
2 changes: 1 addition & 1 deletion docs/guide/advanced/composition-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ href="https://vueschool.io/lessons/router-and-the-composition-api"
title="Learn how to use Vue Router with the composition API"
/>

Vue 3์—์„œ๋Š” `setup`๊ณผ [์ปดํฌ์ง€์…˜ API](https://vuejs.kr/guide/introduction.html#composition-api)๊ฐ€ ๋„์ž…๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ปดํฌ๋„ŒํŠธ ๋‚ด๋ถ€์˜ ํƒ์ƒ‰ ๊ฐ€๋“œ์™€ `this`์—์„œ ๋ผ์šฐํ„ฐ์— ์ ‘๊ทผํ•˜๋Š” ๊ธฐ์กด ๋ฐฉ์‹์„ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ์ƒˆ๋กœ์šด ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Vue 3์—์„œ๋Š” `setup`๊ณผ [์ปดํฌ์ง€์…˜ API](https://vuejs.kr/guide/extras/composition-api-faq.html)๊ฐ€ ๋„์ž…๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ปดํฌ๋„ŒํŠธ ๋‚ด๋ถ€์˜ ํƒ์ƒ‰ ๊ฐ€๋“œ์™€ `this`์—์„œ ๋ผ์šฐํ„ฐ์— ์ ‘๊ทผํ•˜๋Š” ๊ธฐ์กด ๋ฐฉ์‹์„ ๋Œ€์ฒดํ•  ์ˆ˜ ์žˆ๋Š” ๋ช‡ ๊ฐ€์ง€ ์ƒˆ๋กœ์šด ํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

## `setup` ๋‚ด๋ถ€์—์„œ ๋ผ์šฐํ„ฐ ๋ฐ ํ˜„์žฌ ๊ฒฝ๋กœ์— ์ ‘๊ทผํ•˜๊ธฐ %{#accessing-the-router-and-current-route-inside-setup}%

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/advanced/navigation-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ beforeRouteLeave (to, from) {

### ์ปดํฌ์ง€์…˜ API ์‚ฌ์šฉ %{#using-the-composition-api}%

[์ปดํฌ์ง€์…˜ API ๋ฐ `setup` ํ•จ์ˆ˜](https://vuejs.kr/api/composition-api-setup.html#setup)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒฝ์šฐ, `onBeforeRouteUpdate` ๋ฐ `onBeforeRouteLeave` ๊ฐ€๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฐธ๊ณ : [๊ฐ€์ด๋“œ - ์ปดํฌ์ง€์…˜ API](composition-api.md#navigation-guards)
[์ปดํฌ์ง€์…˜ API ๋ฐ `setup` ํ•จ์ˆ˜](https://vuejs.kr/api/composition-api-setup.html)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒฝ์šฐ, `onBeforeRouteUpdate` ๋ฐ `onBeforeRouteLeave` ๊ฐ€๋“œ๋ฅผ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ฐธ๊ณ : [๊ฐ€์ด๋“œ - ์ปดํฌ์ง€์…˜ API](composition-api.md#navigation-guards)

## ์ „์ฒด์ ์ธ ํƒ์ƒ‰ ํ๋ฆ„ %{#the-full-navigation-resolution-flow}%

Expand Down
73 changes: 73 additions & 0 deletions docs/guide/advanced/router-view-slot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# RouterView ์Šฌ๋กฏ %{#RouterView-slot}%

RouterView ์ปดํฌ๋„ŒํŠธ๋Š” ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋ Œ๋”๋งํ•˜๋Š” ๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ์Šฌ๋กฏ์„ ๋…ธ์ถœํ•ฉ๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<component :is="Component" />
</router-view>
```

์œ„์˜ ์ฝ”๋“œ๋Š” ์Šฌ๋กฏ ์—†์ด `<router-view />`๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ๊ณผ ๋™์ผํ•˜์ง€๋งŒ, ์Šฌ๋กฏ์€ ๋‹ค๋ฅธ ๊ธฐ๋Šฅ๊ณผ ํ•จ๊ป˜ ์ž‘์—…ํ•  ๋•Œ ์ถ”๊ฐ€์ ์ธ ์œ ์—ฐ์„ฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

## KeepAlive ๋ฐ Transition %{#KeepAlive-Transition}%

[KeepAlive](https://vuejs.kr/guide/built-ins/keep-alive.html) ์ปดํฌ๋„ŒํŠธ์™€ ์ž‘์—…ํ•  ๋•Œ ์ผ๋ฐ˜์ ์œผ๋กœ ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์œ ์ง€ํ•˜๋ ค๊ณ  ํ•  ๊ฒƒ์ด์ง€๋งŒ RouterView ์ž์ฒด๋ฅผ ์œ ์ง€ํ•˜๋ ค๊ณ  ํ•˜์ง€๋Š” ์•Š์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด KeepAlive๋ฅผ ์Šฌ๋กฏ ๋‚ด์— ๋„ฃ์œผ๋ฉด ์ด๋ฅผ ๋‹ฌ์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<keep-alive>
<component :is="Component" />
</keep-alive>
</router-view>
```

๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์Šฌ๋กฏ์„ ์‚ฌ์šฉํ•˜๋ฉด ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ ๊ฐ„์— ์ „ํ™˜์„ ์œ„ํ•ด [Transition](https://vuejs.kr/guide/built-ins/transition.html) ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<transition>
<component :is="Component" />
</transition>
</router-view>
```

๋˜ํ•œ Transition ๋‚ด์—์„œ KeepAlive๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<transition>
<keep-alive>
<component :is="Component" />
</keep-alive>
</transition>
</router-view>
```

Transition ์ปดํฌ๋„ŒํŠธ์™€ ํ•จ๊ป˜ RouterView๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ž์„ธํ•œ ์ •๋ณด๋Š” [Transitions](./transitions) ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

## Props ๋ฐ ์Šฌ๋กฏ ์ „๋‹ฌ %{#Passing-props-and-slots}%

์Šฌ๋กฏ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ์— props ๋˜๋Š” ์Šฌ๋กฏ์„ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<component :is="Component" some-prop="a value">
<p>Some slotted content</p>
</component>
</router-view>
```

์‹ค์ œ๋กœ ์ด๊ฒƒ์€ **๋ชจ๋“  ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ๋™์ผํ•œ props์™€ ์Šฌ๋กฏ์„ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์•„๋‹ˆ๋ผ๋ฉด ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์ง€ ์•Š์€ ๊ฒƒ์ด ๋Œ€๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.** ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ props๋ฅผ ์ „๋‹ฌํ•˜๋Š” ๋ฐฉ๋ฒ•์€ [๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ์— Props ์ „๋‹ฌ](../essentials/passing-props)๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

## ํ…œํ”Œ๋ฆฟ ์ฐธ์กฐ %{#Template-refs}%

์Šฌ๋กฏ์„ ์‚ฌ์šฉํ•˜๋ฉด ํ…œํ”Œ๋ฆฟ ์ฐธ์กฐ๋ฅผ ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ์— ์ง์ ‘ ๋„ฃ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```vue-html
<router-view v-slot="{ Component }">
<component :is="Component" ref="mainContent" />
</router-view>
```

๋งŒ์•ฝ ref๋ฅผ `<router-view>`์— ๋„ฃ๋Š”๋‹ค๋ฉด ref๋Š” ๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ ๋Œ€์‹  RouterView ์ธ์Šคํ„ด์Šค๋กœ ์ฑ„์›Œ์งˆ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
18 changes: 9 additions & 9 deletions docs/guide/advanced/transitions.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ํŠธ๋žœ์ง€์…˜ %{#transitions}%
# ํŠธ๋žœ์ง€์…˜ %{#Transitions}%

<VueSchoolLink
href="https://vueschool.io/lessons/route-transitions"
title="Learn about route transitions"
/>

๊ฒฝ๋กœ ์ปดํฌ๋„ŒํŠธ์—์„œ ํŠธ๋žœ์ง€์…˜์„ ์‚ฌ์šฉํ•˜๊ณ  ํƒ์ƒ‰์— ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ ์šฉํ•˜๋ ค๋ฉด, v-slot API๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:
๋ผ์šฐํŠธ ์ปดํฌ๋„ŒํŠธ์— ํŠธ๋žœ์ง€์…˜์„ ์‚ฌ์šฉํ•˜๊ณ  ํƒ์ƒ‰์— ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ ์šฉํ•˜๋ ค๋ฉด, [`<RouterView>` ์Šฌ๋กฏ](./router-view-slot)์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

```html
```vue-html
<router-view v-slot="{ Component }">
<transition name="fade">
<component :is="Component" />
Expand All @@ -17,7 +17,7 @@ title="Learn about route transitions"

๋ชจ๋“  ํŠธ๋žœ์ง€์…˜ API ์ž‘๋™์€ [์ด๊ณณ](https://vuejs.kr/guide/built-ins/transition.html)์—์„œ ์„ค๋ช…ํ•˜๋Š” ๊ฒƒ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

## ๋ผ์šฐํŠธ ๋ณ„ ํŠธ๋žœ์ง€์…˜ %{#per-route-transition}%
## ๋ผ์šฐํŠธ ๋ณ„ ํŠธ๋žœ์ง€์…˜ %{#Per-Route-Transition}%

์œ„ ์˜ˆ์ œ๋Š” ๋ชจ๋“  ๊ฒฝ๋กœ์— ๋™์ผํ•œ ํŠธ๋žœ์ง€์…˜์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค. ๊ฐ ๊ฒฝ๋กœ์˜ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ์„œ๋กœ ๋‹ค๋ฅธ ํŠธ๋žœ์ง€์…˜์„ ๊ฐ–๋„๋ก ํ•˜๋ ค๋ฉด, [๋ฉ”ํƒ€ ํ•„๋“œ](meta.md)์™€ `<transition>`์˜ `name`์„ ๋™์ ์œผ๋กœ ์กฐํ•ฉํ•ด ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค:

Expand All @@ -36,7 +36,7 @@ const routes = [
]
```

```html
```vue-html
<router-view v-slot="{ Component, route }">
<!-- ์ปค์Šคํ…€ ํŠธ๋žœ์ง€์…˜ ๋˜๋Š” `fade`๋ฅผ ์‚ฌ์šฉ -->
<transition :name="route.meta.transition || 'fade'">
Expand All @@ -45,11 +45,11 @@ const routes = [
</router-view>
```

## ๊ฒฝ๋กœ ๊ธฐ๋ฐ˜ ๋™์  ํŠธ๋žœ์ง€์…˜ %{#route-based-dynamic-transition}%
## ๊ฒฝ๋กœ ๊ธฐ๋ฐ˜ ๋™์  ํŠธ๋žœ์ง€์…˜ %{#Route-Based-Dynamic-Transition}%

๋Œ€์ƒ ๊ฒฝ๋กœ์™€ ํ˜„์žฌ ๊ฒฝ๋กœ ๊ฐ„์˜ ๊ด€๊ณ„๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ, ์‚ฌ์šฉํ•  ํŠธ๋žœ์ง€์…˜์„ ๋™์ ์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์ „ ์˜ˆ์ œ ์ฝ”๋“œ์™€ ๋งค์šฐ ์œ ์‚ฌํ•ฉ๋‹ˆ๋‹ค:

```html
```vue-html
<!-- ๋™์ ์ธ ํŠธ๋žœ์ง€์…˜์˜ name ์‚ฌ์šฉ -->
<router-view v-slot="{ Component, route }">
<transition :name="route.meta.transition">
Expand All @@ -68,11 +68,11 @@ router.afterEach((to, from) => {
})
```

## ์žฌ์‚ฌ์šฉ๋œ ๋ทฐ์—์„œ ๊ฐ•์ œ๋กœ ํŠธ๋žœ์ง€์…˜ %{#forcing-a-transition-between-reused-views}%
## ์žฌ์‚ฌ์šฉ๋œ ๋ทฐ์—์„œ ๊ฐ•์ œ๋กœ ํŠธ๋žœ์ง€์…˜ %{#Forcing-a-transition-between-reused-views}%

Vue๋Š” ๋™์ผํ•œ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์ž๋™์œผ๋กœ ์žฌ์‚ฌ์šฉํ•˜์—ฌ ํŠธ๋žœ์ง€์…˜์ด ์ž‘๋™ํ•˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹คํ–‰ํžˆ๋„ [`key`](https://vuejs.kr/api/built-in-special-attributes.html#key) ์†์„ฑ์„ ์ถ”๊ฐ€ํ•ด ๊ฐ•์ œ๋กœ ํŠธ๋žœ์ง€์…˜์„ ํŠธ๋ฆฌ๊ฑฐ ํ•˜๋Š” ๊ฒƒ์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ๊ฒฝ๋กœ๋ฅผ ์œ ์ง€ํ•˜๋ฉด์„œ ํŒŒ๋ผ๋ฏธํ„ฐ ๋ณ€๊ฒฝ์— ์˜ํ•œ ํŠธ๋žœ์ง€์…˜์„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

```vue
```vue-html
<router-view v-slot="{ Component, route }">
<transition name="fade">
<component :is="Component" :key="route.path" />
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/essentials/named-routes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ์ด๋ฆ„์ด ์žˆ๋Š” ๊ฒฝ๋กœ %{#named-routes}%
# ์ด๋ฆ„์ด ์žˆ๋Š” ๊ฒฝ๋กœ %{#Named-Routes}%

<VueSchoolLink
href="https://vueschool.io/lessons/named-routes"
Expand All @@ -24,7 +24,7 @@ const routes = [

`<router-link>` ์ปดํฌ๋„ŒํŠธ์˜ `to`์— ๊ฐ์ฒด๋ฅผ ์ „๋‹ฌํ•ด ์ด๋ฆ„์ด ์žˆ๋Š” ๊ฒฝ๋กœ์— ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

```html
```vue-html
<router-link :to="{ name: 'user', params: { username: 'erina' }}">
์œ ์ € ๋งํฌ!
</router-link>
Expand Down
8 changes: 4 additions & 4 deletions docs/guide/essentials/named-views.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#named-views}%
# ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#Named-Views}%

<VueSchoolLink
href="https://vueschool.io/lessons/vue-router-4-named-views"
Expand All @@ -7,7 +7,7 @@ title="Learn how to use named views"

๋•Œ๋กœ๋Š” ์—ฌ๋Ÿฌ ๋ทฐ(view)๋ฅผ ์ค‘์ฒฉํ•˜์ง€ ์•Š๊ณ , ๋™์‹œ์— ํ‘œ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค(์˜ˆ: ์‚ฌ์ด๋“œ๋ฐ”์™€ ๋ฉ”์ธ ๋ทฐ๊ฐ€ ์žˆ๋Š” ๋ ˆ์ด์•„์›ƒ). ์ด๋Ÿด ๋•Œ๋Š” ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค. "๊ฒฐ๊ณผ๋ฅผ ๋…ธ์ถœํ•  ์ˆ˜๋‹จ"(์ดํ•˜ ์•„์šธ๋ ›)์œผ๋กœ ํ•˜๋‚˜์˜ ๋ทฐ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค, ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์•„์šธ๋ › ๋ทฐ ๊ฐ๊ฐ์— ์ด๋ฆ„์„ ์ง€์ •ํ•ด ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด๋ฆ„์ด ์ง€์ •๋˜์ง€ ์•Š์€ `<router-view>`๋Š” ๊ธฐ๋ณธ ๊ฐ’์œผ๋กœ `default`๋ผ๋Š” ์ด๋ฆ„์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

```html
```vue-html
<router-view class="view left-sidebar" name="LeftSidebar"></router-view>
<router-view class="view main-content"></router-view>
<router-view class="view right-sidebar" name="RightSidebar"></router-view>
Expand Down Expand Up @@ -37,7 +37,7 @@ const router = createRouter({

์ฐธ๊ณ : [์˜ˆ์ œ](https://codesandbox.io/s/named-views-vue-router-4-examples-rd20l)

## ์ค‘์ฒฉ๋œ ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#nested-named-views}%
## ์ค‘์ฒฉ๋œ ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#Nested-Named-Views}%

์ค‘์ฒฉ๋œ ๋ทฐ์™€ ๋ช…๋ช…๋œ ๋ทฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณต์žกํ•œ ๋ ˆ์ด์•„์›ƒ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๋•Œ ์ค‘์ฒฉ๋œ `router-view`์— ์ด๋ฆ„๋„ ์ง€์ •ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์œ ์ € ์„ธํŒ… ํŒจ๋„์„ ์˜ˆ๋กœ ๋“ค์–ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค:

Expand All @@ -61,7 +61,7 @@ const router = createRouter({

์œ„ ๋ ˆ์ด์•„์›ƒ์˜ `<UserSettings />` ์ปดํฌ๋„ŒํŠธ ํ…œํ”Œ๋ฆฟ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:

```html
```vue-html
<!-- UserSettings.vue -->
<div>
<h1>์‚ฌ์šฉ์ž ์„ค์ •</h1>
Expand Down
16 changes: 8 additions & 8 deletions docs/guide/essentials/passing-props.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ๊ฒฝ๋กœ ์ปดํฌ๋„ŒํŠธ์— props ์ „๋‹ฌํ•˜๊ธฐ %{#passing-props-to-route-components}%
# ๊ฒฝ๋กœ ์ปดํฌ๋„ŒํŠธ์— props ์ „๋‹ฌํ•˜๊ธฐ %{#Passing-Props-to-Route-Components}%

<VueSchoolLink
href="https://vueschool.io/lessons/route-props"
Expand Down Expand Up @@ -29,11 +29,11 @@ const routes = [{ path: '/user/:id', component: User, props: true }]

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด ์–ด๋””์—์„œ๋‚˜ ์ปดํฌ๋„ŒํŠธ๋ฅผ ๋” ์‰ฝ๊ฒŒ ์žฌ์‚ฌ์šฉํ•˜๊ณ  ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

## ๋ถˆ๋ฆฌ์–ธ ๋ชจ๋“œ %{#boolean-mode}%
## ๋ถˆ๋ฆฌ์–ธ ๋ชจ๋“œ %{#Boolean-mode}%

๊ฒฝ๋กœ์˜ `props`๊ฐ€ `true`๋กœ ์„ค์ •๋˜๋ฉด, `route.params`๊ฐ€ ์ปดํฌ๋„ŒํŠธ์˜ props๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค.

## ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#named-views}%
## ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ %{#Named-views}%

์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ๊ฐ€ ์žˆ๋Š” ๊ฒฝ๋กœ์˜ ๊ฒฝ์šฐ, ์ด๋ฆ„์ด ์žˆ๋Š” ๋ทฐ ๊ฐ๊ฐ์— `props` ์˜ต์…˜์„ ์ •์˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค:

Expand All @@ -47,7 +47,7 @@ const routes = [
]
```

## ๊ฐ์ฒด ๋ชจ๋“œ %{#object-mode}%
## ๊ฐ์ฒด ๋ชจ๋“œ %{#Object-mode}%

`props`๊ฐ€ ๊ฐ์ฒด์ธ ๊ฒฝ์šฐ, ์ด๋Š” ๊ทธ๋Œ€๋กœ ์ปดํฌ๋„ŒํŠธ์˜ props๋กœ ์„ค์ •๋ฉ๋‹ˆ๋‹ค. Props๊ฐ€ ์ •์ ์ผ ๋•Œ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.

Expand All @@ -61,7 +61,7 @@ const routes = [
]
```

## ํ•จ์ˆ˜ ๋ชจ๋“œ %{#function-mode}%
## ํ•จ์ˆ˜ ๋ชจ๋“œ %{#Function-mode}%

Props๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๋‹ค๋ฅธ ์œ ํ˜•์œผ๋กœ ์บ์ŠคํŒ…ํ•˜๊ณ , ์ •์  ๊ฐ’์„ ๊ฒฝ๋กœ ๊ธฐ๋ฐ˜์˜ ๊ฐ’๊ณผ ๊ฒฐํ•ฉํ•˜๋Š” ๋“ฑ์˜ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Expand All @@ -79,17 +79,17 @@ const routes = [

๊ฒฝ๋กœ๊ฐ€ ๋ณ€๊ฒฝ๋  ๋•Œ๋งŒ `props`๋ฅผ ์ •์˜ํ•˜๋Š” ํ•จ์ˆ˜๊ฐ€ ํ‰๊ฐ€๋˜๋ฏ€๋กœ, ์ƒํƒœ๊ฐ€ ๋ณ€๊ฒฝ๋  ๋•Œ๋„ ๋ฐ˜์‘ํ•˜๋Š” `props`๋ฅผ ์ „๋‹ฌํ•˜๋ ค๋ฉด, ํ•จ์ˆ˜ ๋‚ด๋ถ€์— ์ƒํƒœ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹ , ๋ž˜ํผ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•ด ๊ณ„์‚ฐ๋œ ์†์„ฑ(`computed`)์„ `props`๋กœ ์ „๋‹ฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

## RouterView์—์„œ ์ง์ ‘ %{#via-routerview}%
## RouterView์—์„œ ์ง์ ‘ %{#Via-RouterView}%

`<RouterView>`๋ฅผ ํ†ตํ•ด ์ง์ ‘ props๋ฅผ ์ „๋‹ฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค:
๋˜ํ•œ [`<RouterView>` ์Šฌ๋กฏ](../advanced/router-view-slot)์„ ํ†ตํ•ด ์–ด๋–ค props๋„ ์ „๋‹ฌํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

```vue-html
<RouterView v-slot="{ Component }">
<component
:is="Component"
view-prop="value"
/>
</RouterView
</RouterView>
```

::: ๊ฒฝ๊ณ 
Expand Down
Loading

0 comments on commit 6041da2

Please sign in to comment.