From 6d5d3a8dfe0955cd41eb1ae28f8cb488ff34745a Mon Sep 17 00:00:00 2001 From: preciouStar Date: Mon, 24 Aug 2020 17:22:58 +0900 Subject: [PATCH] Fix some typo in context.md (ko and en) (#538) * Fix Korean Typo in context.md * Fix '\$config' Typo to '$config' and 'Res' Typo to 'res' in context.md Co-authored-by: Debbie O'Brien --- content/en/api/context.md | 2 +- content/ko/api/context.md | 60 +++++++++++++++++++++++++++++---------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/content/en/api/context.md b/content/en/api/context.md index ef3f9d1fc6..32ee5dd5c2 100644 --- a/content/en/api/context.md +++ b/content/en/api/context.md @@ -117,7 +117,7 @@ These keys are available only on the server-side. Request from the Node.js server. If Nuxt is used as a middleware, the request object might be different depending on the framework you're using.
**Not available with [static target](/guides/features/deployment-targets#static-hosting)**. -### Res +### res `res` ([_http.Response_](https://nodejs.org/api/http.html#http_class_http_serverresponse)) diff --git a/content/ko/api/context.md b/content/ko/api/context.md index eb10796d32..f20eb17f69 100644 --- a/content/ko/api/context.md +++ b/content/ko/api/context.md @@ -40,43 +40,63 @@ function (context) { 아래의 키들은 클라이언트 사이드와 서버 사이드에서 사용 가능합니다. -### `app` (_NuxtAppOptions_) +### app + +`app` (_NuxtAppOptions_) 모든 플러그인이 포함된 루트 Vue 인스턴스 옵션입니다. 예를 들어 `i18n`을 사용할때 `context.app.i18n`을 통해 `$i18n`에 액세스할 수 있습니다. -### `store` ([_Vuex Store_](https://vuex.vuejs.org/api/#vuex-store-instance-properties)) +### store + +`store` ([_Vuex Store_](https://vuex.vuejs.org/api/#vuex-store-instance-properties)) Vuex Store 인스턴스 **[vuex store](/guide/vuex-store)가 세팅되었을 때 사용 가능합니다**. -### `route` ([_Vue Router Route_](https://router.vuejs.org/api/#the-route-object)) +### route + +`route` ([_Vue Router Route_](https://router.vuejs.org/api/#the-route-object)) Vue 라우터 라우트 인스턴스. -### `params` (_Object_) +### params + +`params` (_Object_) `route.params`의 알리아스. -### `query` (_Object_) +### query + +`query` (_Object_) `route.query`의 알리아스. -### `env` (_Object_) +### env + +`env` (_Object_) `nuxt.config.js`의 환경변수, [env api](/api/configuration-env)를 참조하세요. -### `isDev` (_Boolean_) +### isDev + +`isDev` (_Boolean_) dev 모드인지를 알 수 있는 Boolean 값. 프로덕션에서 어떤 데이터를 캐싱할 때 유용함. -### `isHMR` (_Boolean_) +### isHMR + +`isHMR` (_Boolean_) 메소드/미들웨어가 웹팩의 HMR에서 호출되었는지를 알 수 있는 Boolean 값 (_클라이언트 사이드의 dev 모드에서는 true_). -### `redirect` (_Function_) +### redirect + +`redirect` (_Function_) 다른 라우트로 유저를 리다이렉트하기 위해 사용. 상태 코드는 서버 사이드에서 쓰이며, 디폴트는 `302`입니다. `redirect([status,] path [, query])`. -### `error` (_Function_) +### error + +`error` (_Function_) `error(params)`를 에러 페이지를 보여주기 위해 사용. `params`은 `statusCode`와 `message` 프로퍼티를 가져야합니다. @@ -84,15 +104,21 @@ dev 모드인지를 알 수 있는 Boolean 값. 프로덕션에서 어떤 데이 아래의 키들은 서버 사이드에서 사용 가능합니다. -### `req` ([_http.Request_](https://nodejs.org/api/http.html#http_class_http_incomingmessage)) +### req + +`req` ([_http.Request_](https://nodejs.org/api/http.html#http_class_http_incomingmessage)) Node.js 서버의 리퀘스트. Nuxt가 미들웨어로 사용된다면, 리퀘스트 객체는 사용 중인프레임워크에 따라 달라질 수 있습니다.
**`nuxt generate`에서는 사용 불가능**. -### `res` ([_http.Response_](https://nodejs.org/api/http.html#http_class_http_serverresponse)) +### res + +`res` ([_http.Response_](https://nodejs.org/api/http.html#http_class_http_serverresponse)) Node.js 서버의 리스폰스. Nuxt가 미들웨어로 사용된다면, 리스폰스 객체는 사용 중인프레임워크에 따라 달라질 수 있습니다.
**`nuxt generate`에서는 사용 불가능**. -### `beforeNuxtRender(fn)` (_Function_) +### beforeNuxtRender + +`beforeNuxtRender(fn)` (_Function_) 클라이언트 사이드에서 렌더링되는 `__NUXT__` 변수를 업데이트하는 데에 이 메소드를사용하세요. `fn`은 (비동기일 수 있음) `{ Components, nuxtState }`와 호출됩니다. [예시](https://github.com/nuxt/nuxt.js/blob/cf6b0df45f678c5ac35535d49710c606ab34787d/test/fixtures/basic/pages/special-state.vue)를보세요. @@ -100,10 +126,14 @@ Node.js 서버의 리스폰스. Nuxt가 미들웨어로 사용된다면, 리스 아래의 키들은 클라이언트 사이드에서 사용 가능합니다. -### `from` ([_Vue Router Route_](https://router.vuejs.org/api/#the-route-object)) +### from + +`from` ([_Vue Router Route_](https://router.vuejs.org/api/#the-route-object)) 라우트 이동 출발지(from). -### `nuxtState` _(Object)_ +### nuxtState + +`nuxtState` _(Object)_ `beforeNuxtRender`를 사용하여 렌더링 전 클라이언트 측 Nuxt 상태를 가져오는 플러그인에 유용합니다 .**`universal` 모드에서만 사용 가능합니다**.