From a80448501665d89dc6590552fbcbc2f7de1163e7 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 21:58:05 +0900 Subject: [PATCH 1/6] fix: remove devtools from config https://github.com/vuejs/docs-next/commit/39b7bb06288e2f0f29def2a8b8cc0e48ffc2e48c#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b --- src/api/application-config.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/api/application-config.md b/src/api/application-config.md index 24fe9cea..60bf757a 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -8,20 +8,6 @@ const app = Vue.createApp({}) app.config = {...} ``` -## devtools - -- **型:** `boolean` - -- **デフォルト:** `true` (プロダクションビルドでは `false`) - -- **使用方法:** - -```js -app.config.devtools = true -``` - -[vue-devtools](https://github.com/vuejs/vue-devtools) による検査を許可するかどうかを設定します。このオプションのデフォルト値は、development ビルドでは `true` に、プロダクションビルドでは `false` となります。true にすることで、プロダクションビルドで検査を有効にできます。 - ## errorHandler - **型:** `Function` From 1aa6f48a32f4ef78101e164e4632d023473f4d96 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 21:59:02 +0900 Subject: [PATCH 2/6] Update application-config.md https://github.com/vuejs/docs-next/commit/1e772b3379b65cd132ac13bf86e1a769780b53cd#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b --- src/api/application-config.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/application-config.md b/src/api/application-config.md index 60bf757a..778e520a 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -6,6 +6,8 @@ const app = Vue.createApp({}) app.config = {...} + +app.mount(...); ``` ## errorHandler From 76d197df0dabc2cc72cd2bf1fd61fe160a5ca200 Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 22:00:24 +0900 Subject: [PATCH 3/6] feat: add note on isCustomElement in runtime-only builds https://github.com/vuejs/docs-next/commit/4b551fb6fee1d5fbbff2b0d24eff335b94ab967a#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b --- src/api/application-config.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/application-config.md b/src/api/application-config.md index 778e520a..78408892 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -94,6 +94,10 @@ Vue の外部にて定義された(Web Components API を利用した場合な > この関数では、全てのネイティブの HTML ならびに SVG のタグをマッチさせる必要はありません。Vue のパーサが自動的にこのチェックを行います。 +::: tip Important +This config option is only respected when using the runtime compiler. If you are using the runtime-only build, `isCustomElement` must be passed to `@vue/compiler-dom` in the build setup instead - for example, via the [`compilerOptions` option in vue-loader](https://vue-loader.vuejs.org/options.html#compileroptions). +::: + ## optionMergeStrategies - **型:** `{ [key: string]: Function }` From 4d94ce978447eb0f409e4239f117299dd7cf5e1b Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 22:02:02 +0900 Subject: [PATCH 4/6] fix: reword the introduction and example for application config https://github.com/vuejs/docs-next/commit/ec0816eb7cb5a7dcd4aaa507e78e53a91933e4df#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b --- src/api/application-config.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/application-config.md b/src/api/application-config.md index 78408892..000a1ac2 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -1,15 +1,15 @@ # アプリケーション構成 -`config` は、 Vue アプリケーションのグローバル設定を含むオブジェクトです。アプリケーションをマウントする前に、以下のプロパティを変更できます: +Every Vue application exposes a `config` object that contains the configuration settings for that application: ```js const app = Vue.createApp({}) -app.config = {...} - -app.mount(...); +console.log(app.config) ``` +You can modify its properties, listed below, before mounting your application. + ## errorHandler - **型:** `Function` From 7e643ffe6a18f34b2c2be332aa61e5036c6ac54d Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 22:04:46 +0900 Subject: [PATCH 5/6] docs: reduce the reliance on the global Vue in API Reference examples https://github.com/vuejs/docs-next/commit/35f5b524de556d68b03d16e3de756726b178e3aa#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b --- src/api/application-config.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/application-config.md b/src/api/application-config.md index 000a1ac2..3b5cad76 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -3,7 +3,7 @@ Every Vue application exposes a `config` object that contains the configuration settings for that application: ```js -const app = Vue.createApp({}) +const app = createApp({}) console.log(app.config) ``` @@ -73,7 +73,7 @@ app.component('child-component', { Vue.prototype.$http = () => {} // After -const app = Vue.createApp({}) +const app = createApp({}) app.config.globalProperties.$http = () => {} ``` @@ -107,7 +107,7 @@ This config option is only respected when using the runtime compiler. If you are - **使用方法:** ```js -const app = Vue.createApp({ +const app = createApp({ mounted() { console.log(this.$options.hello) } From a3fa21fc4c92ad2116b2e565036dfcd0a68b2d7a Mon Sep 17 00:00:00 2001 From: Naoki Endoh Date: Thu, 27 May 2021 22:30:11 +0900 Subject: [PATCH 6/6] docs: translate api reference > application config --- src/api/application-config.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/application-config.md b/src/api/application-config.md index 3b5cad76..ef9ad8ac 100644 --- a/src/api/application-config.md +++ b/src/api/application-config.md @@ -1,6 +1,6 @@ # アプリケーション構成 -Every Vue application exposes a `config` object that contains the configuration settings for that application: +すべての Vue アプリケーションは、そのアプリケーションの構成設定を含む `config` オブジェクトを公開します: ```js const app = createApp({}) @@ -8,7 +8,7 @@ const app = createApp({}) console.log(app.config) ``` -You can modify its properties, listed below, before mounting your application. +アプリケーションをマウントする前に、以下に列挙したプロパティを変更することができます。 ## errorHandler @@ -66,7 +66,7 @@ app.component('child-component', { アプリケーション内のあらゆるコンポーネントのインスタンスからアクセスできるグローバルなプロパティを追加します。名称が競合した場合、コンポーネントのプロパティが優先されます。 -これは、 Vue 2.x における Vue.prototype` 拡張を置き換えることができます: +これは、 Vue 2.x における `Vue.prototype` 拡張を置き換えることができます: ```js // Before @@ -95,7 +95,7 @@ Vue の外部にて定義された(Web Components API を利用した場合な > この関数では、全てのネイティブの HTML ならびに SVG のタグをマッチさせる必要はありません。Vue のパーサが自動的にこのチェックを行います。 ::: tip Important -This config option is only respected when using the runtime compiler. If you are using the runtime-only build, `isCustomElement` must be passed to `@vue/compiler-dom` in the build setup instead - for example, via the [`compilerOptions` option in vue-loader](https://vue-loader.vuejs.org/options.html#compileroptions). +この設定オプションは、ランタイムコンパイラを使うときにのみ尊重されます。ランタイム限定ビルドを使う場合、 `isCustomElement` は代わりにビルドの設定で `@vue/compiler-dom` に渡す必要があります。例えば、 [vue-loader の `compilerOptions` オプション](https://vue-loader.vuejs.org/options.html#compileroptions) を経由して渡します。 ::: ## optionMergeStrategies @@ -126,9 +126,9 @@ app.mixin({ カスタムオプションのマージ戦略を定義します。 -マージ戦略は、親インスタンスと子インスタンスで定義されたオプションの値をそれぞれ第一引数と第二引数として受け取ります。アプリケーションコンテキストのインスタンスは、第三引数として渡されます。 +マージ戦略は、親インスタンスと子インスタンスで定義されたオプションの値をそれぞれ第 1 引数と第 2 引数として受け取ります。アプリケーションコンテキストのインスタンスは、第 3 引数として渡されます。 -- **こちらも:** [Custom Option Merging Strategies](../guide/mixins.html#custom-option-merge-strategies) +- **参照:** [Custom Option Merging Strategies](../guide/mixins.html#custom-option-merge-strategies) ## performance