Skip to content

Commit 89a5d5f

Browse files
kazuponktsn
authored andcommitted
update ja docs (#945)
* add core concepts docs NOTE: pick up from 5257afe * add missing typings docs NOTE: pick up from 7ad573b * translation missing typings * update state docs NOTE: pick up from 80b856a * update core concepts docs * tweak translation for ja * fix nuance
1 parent c79cc87 commit 89a5d5f

File tree

5 files changed

+43
-2
lines changed

5 files changed

+43
-2
lines changed

docs/ja/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- [インストール](installation.md)
1010
- [Vuex とは何か?](intro.md)
1111
- [Vuex 入門](getting-started.md)
12-
- コアコンセプト
12+
- [コアコンセプト](core-concepts.md)
1313
- [ステート](state.md)
1414
- [ゲッター](getters.md)
1515
- [ミューテーション](mutations.md)

docs/ja/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,7 @@ const store = new Vuex.Store({ ...options })
193193
ミューテーションをコミットするコンポーネントの methods オプションを作成します。[詳細](mutations.md#commiting-mutations-in-components)
194194

195195
1引数は、オプションで名前空間文字列にすることができます。[詳細](modules.md#binding-helpers-with-namespace)
196+
197+
- **`createNamespacedHelpers(namespace: string): Object`**
198+
199+
名前空間付けられたコンポーネントバインディングのヘルパーを作成します。返されるオブジェクトは指定された名前空間にバインドされた `mapState``mapGetters``mapActions` そして `mapMutations` が含まれます。[詳細はこちら](modules.md#binding-helpers-with-namespace)

docs/ja/core-concepts.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# コアコンセプト
2+
3+
この章では、Vuex のコアコンセプトについて、以下を学習します。
4+
- [ステート](state.md)
5+
- [ゲッター](getters.md)
6+
- [ミューテーション](mutations.md)
7+
- [アクション](actions.md)
8+
- [モジュール](modules.md)
9+
10+
これらのコンセプトを深く理解することは、Vuex を使用するにあたって不可欠です。
11+
12+
それでは、始めましょう!

docs/ja/modules.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,31 @@ methods: {
206206
}
207207
```
208208

209+
さらに、`createNamespacedHelpers` を使用することによって名前空間付けされたヘルパーを作成できます。指定された名前空間の値にバインドされた新しいコンポーネントバインディングヘルパーを持つオブジェクトを返します:
210+
211+
``` js
212+
import { createNamespacedHelpers } from 'vuex'
213+
214+
const { mapState, mapActions } = createNamespacedHelpers('some/nested/module')
215+
216+
export default {
217+
computed: {
218+
// `some/nested/module` を調べます
219+
...mapState({
220+
a: state => state.a,
221+
b: state => state.b
222+
})
223+
},
224+
methods: {
225+
// `some/nested/module` を調べます
226+
...mapActions([
227+
'foo',
228+
'bar'
229+
])
230+
}
231+
}
232+
```
233+
209234
#### プラグイン開発者向けの注意事項
210235

211236
モジュールを提供する[プラグイン](plugins.md)を作成し、ユーザーがそれらを Vuex ストアに追加できるようにすると、モジュールの予測できない名前空間が気になるかもしれません。あなたのモジュールは、プラグインユーザーが名前空間付きモジュールの元にモジュールを追加すると、その名前空間に属するようになります。この状況に適応するには、プラグインオプションを使用して名前空間の値を受け取る必要があります。

docs/ja/state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const Counter = {
5757

5858
### `mapState`  ヘルパー
5959

60-
コンポーネントが複数のストアのステートプロパティやゲッターを必要としているとき、これらすべてにおいて、算出プロパティを宣言することは繰り返しで冗長です。これに対処するため、算出ゲッター関数を生成し、いくつかのキーストロークを節約するのに役立つ `mapState` ヘルパーを使うことができます:
60+
コンポーネントが複数のストアのステートプロパティやゲッターを必要としているとき、これらすべてにおいて、算出プロパティを宣言することは繰り返しで冗長です。これに対処するため、算出ゲッター関数を生成し、いくつかのキーストロークを省くのに役立つ `mapState` ヘルパーを使うことができます:
6161

6262
```js
6363
// 完全ビルドでは、ヘルパーは Vuex.mapState として公開されています

0 commit comments

Comments
 (0)