From 868f5403588b055a2e948a4877a5af1b868a1598 Mon Sep 17 00:00:00 2001 From: 38elements <38elements@users.noreply.github.com> Date: Sat, 21 Jul 2018 01:51:30 +0900 Subject: [PATCH] docs: update docs/ja --- docs/ja/README.md | 2 ++ docs/ja/api/config.md | 4 +-- docs/ja/api/wrapper-array/README.md | 2 ++ docs/ja/api/wrapper-array/setChecked.md | 38 +++++++++++++++++++++++++ docs/ja/api/wrapper-array/setValue.md | 37 ++++++++++++++++++++++++ docs/ja/api/wrapper/README.md | 2 +- docs/ja/api/wrapper/setValue.md | 2 +- 7 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 docs/ja/api/wrapper-array/setChecked.md create mode 100644 docs/ja/api/wrapper-array/setValue.md diff --git a/docs/ja/README.md b/docs/ja/README.md index 7ab9618ee..3bb66dc57 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -65,9 +65,11 @@ * [is](api/wrapper-array/is.md) * [isEmpty](api/wrapper-array/isEmpty.md) * [isVueInstance](api/wrapper-array/isVueInstance.md) + * [setChecked](api/wrapper-array/setChecked.md) * [setData](api/wrapper-array/setData.md) * [setMethods](api/wrapper-array/setMethods.md) * [setProps](api/wrapper-array/setProps.md) + * [setValue](api/wrapper-array/setValue.md) * [trigger](api/wrapper-array/trigger.md) * [isVisible](api/wrapper-array/isVisible.md) * [コンポーネント](api/components/) diff --git a/docs/ja/api/config.md b/docs/ja/api/config.md index de6c1ffb9..56513e2f0 100644 --- a/docs/ja/api/config.md +++ b/docs/ja/api/config.md @@ -6,7 +6,7 @@ vue-test-utils にはオプションを定義するための `config` オプシ #### `stubs` -- 型: `Object` +- 型: `{ [name: string]: Component | boolean | string }` - デフォルト: `{ transition: TransitionStub, 'transition-group': TransitionGroupStub @@ -45,7 +45,7 @@ VueTestUtils.config.mocks['$store'] = { #### `methods` -- 型: `Object` +- 型: `{ [name: string]: Function }` - デフォルト: `{}` `config` オブジェクトを使用してデフォルトのメソッドを設定することができます。これは [VeeValidate](https://vee-validate.logaretm.com/) のようなコンポーネントにメソッドを注入するプラグインに役立ちます。`config` にセットした methods はマウンティングオプションに `methods` を渡すことで上書きすることができます。 diff --git a/docs/ja/api/wrapper-array/README.md b/docs/ja/api/wrapper-array/README.md index d59637498..6172c018e 100644 --- a/docs/ja/api/wrapper-array/README.md +++ b/docs/ja/api/wrapper-array/README.md @@ -21,7 +21,9 @@ !!!include(docs/ja/api/wrapper-array/is.md)!!! !!!include(docs/ja/api/wrapper-array/isEmpty.md)!!! !!!include(docs/ja/api/wrapper-array/isVueInstance.md)!!! +!!!include(docs/ja/api/wrapper-array/setChecked.md)!!! !!!include(docs/ja/api/wrapper-array/setData.md)!!! !!!include(docs/ja/api/wrapper-array/setMethods.md)!!! !!!include(docs/ja/api/wrapper-array/setProps.md)!!! +!!!include(docs/ja/api/wrapper-array/setValue.md)!!! !!!include(docs/ja/api/wrapper-array/trigger.md)!!! diff --git a/docs/ja/api/wrapper-array/setChecked.md b/docs/ja/api/wrapper-array/setChecked.md new file mode 100644 index 000000000..9a6a605c3 --- /dev/null +++ b/docs/ja/api/wrapper-array/setChecked.md @@ -0,0 +1,38 @@ +## setChecked(checked) + +このメソッドは以下のコードのエイリアスです。 + +```js +wrapperArray.wrappers.forEach(wrapper => wrapper.setChecked(checked)) +``` + +- **引数:** + - `{Boolean} checked (デフォルト: true)` + +- **例:** + +```js +import { mount } from '@vue/test-utils' + +const wrapper = mount({ + data () { + return { + t1: false, + t2: '' + } + }, + template: ` +