From f51a40595204355160510f5c3668fde3df8e5149 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Fri, 1 Jun 2018 15:32:19 +0800 Subject: [PATCH 1/2] docs: keep update --- docs/api/mount.md | 2 +- docs/api/wrapper/find.md | 4 +--- docs/api/wrapper/findAll.md | 2 -- docs/ja/api/wrapper/find.md | 4 +--- docs/ja/api/wrapper/findAll.md | 2 -- docs/zh/README.md | 10 +++++----- docs/zh/api/mount.md | 4 ++-- docs/zh/api/options.md | 12 ++---------- docs/zh/api/render.md | 2 +- docs/zh/api/shallowMount.md | 2 +- docs/zh/api/wrapper-array/README.md | 8 ++++---- docs/zh/api/wrapper/find.md | 4 +--- docs/zh/api/wrapper/findAll.md | 4 +--- docs/zh/guides/using-with-vuex.md | 26 ++++++++++++++++---------- 14 files changed, 36 insertions(+), 50 deletions(-) diff --git a/docs/api/mount.md b/docs/api/mount.md index 3609c7c23..0bcd6a59f 100644 --- a/docs/api/mount.md +++ b/docs/api/mount.md @@ -126,4 +126,4 @@ describe('Foo', () => { }) ``` -- **See also:** [Wrapper](wrapper/README.md) +- **See also:** [Wrapper](wrapper/) diff --git a/docs/api/wrapper/find.md b/docs/api/wrapper/find.md index 1b7f0665f..f2734ebf7 100644 --- a/docs/api/wrapper/find.md +++ b/docs/api/wrapper/find.md @@ -1,6 +1,6 @@ ## find(selector) -Returns [`Wrapper`](../wrapper/) of first DOM node or Vue component matching selector. +Returns `Wrapper` of first DOM node or Vue component matching selector. Use any valid [selector](../selectors.md). @@ -30,5 +30,3 @@ expect(barByName.is(Bar)).toBe(true) const fooRef = wrapper.find({ ref: 'foo' }) expect(fooRef.is(Foo)).toBe(true) ``` - -- **See also:** [Wrapper](../wrapper/) diff --git a/docs/api/wrapper/findAll.md b/docs/api/wrapper/findAll.md index d62af580c..8720d84ee 100644 --- a/docs/api/wrapper/findAll.md +++ b/docs/api/wrapper/findAll.md @@ -22,5 +22,3 @@ expect(div.is('div')).toBe(true) const bar = wrapper.findAll(Bar).at(0) expect(bar.is(Bar)).toBe(true) ``` - -- **See also:** [Wrapper](../wrapper/) diff --git a/docs/ja/api/wrapper/find.md b/docs/ja/api/wrapper/find.md index e817d52a5..ceec5d336 100644 --- a/docs/ja/api/wrapper/find.md +++ b/docs/ja/api/wrapper/find.md @@ -1,6 +1,6 @@ ## find(selector) -最初の DOM ノードの [Wrapper](../wrapper/)、またはセレクタで一致した Vue コンポーネントを返します。 +最初の DOM ノードの Wrapper、またはセレクタで一致した Vue コンポーネントを返します。 有効な[セレクタ](../selectors.md)を使用してください。 @@ -30,5 +30,3 @@ expect(barByName.is(Bar)).toBe(true) const fooRef = wrapper.find({ ref: 'foo' }) expect(fooRef.is(Foo)).toBe(true) ``` - -- **参照:** [Wrapper](../wrapper/) diff --git a/docs/ja/api/wrapper/findAll.md b/docs/ja/api/wrapper/findAll.md index 6c824840e..fe22c46e3 100644 --- a/docs/ja/api/wrapper/findAll.md +++ b/docs/ja/api/wrapper/findAll.md @@ -22,5 +22,3 @@ expect(div.is('div')).toBe(true) const bar = wrapper.findAll(Bar).at(0) expect(bar.is(Bar)).toBe(true) ``` - -- **参照:** [Wrapper](../wrapper/) diff --git a/docs/zh/README.md b/docs/zh/README.md index 4b54df15c..073315c79 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -2,7 +2,7 @@ Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。 -* [教程](guides/README.md) +* [教程](guides/) * [起步](guides/getting-started.md) * [常用技巧](guides/common-tips.md) * [鼠标、键盘以及其它 DOM 事件](guides/dom-events.md) @@ -13,7 +13,7 @@ Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。 * [测试异步行为](guides/testing-async-components.md) * [配合 Vue Router 使用](guides/using-with-vue-router.md) * [配合 Vuex 实用](guides/using-with-vuex.md) -* [API](api/README.md) +* [API](api/) * [mount](api/mount.md) * [shallowMount](api/shallowMount.md) * [render](api/render.md) @@ -31,7 +31,7 @@ Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。 - [provide](api/options.md#provide) - [sync](api/options.md#sync) - [其它选项](api/options.md#other-options) - * [Wrapper](api/wrapper/README.md) + * [Wrapper](api/wrapper/) * [attributes](api/wrapper/attributes.md) * [classes](api/wrapper/classes.md) * [contains](api/wrapper/contains.md) @@ -53,7 +53,7 @@ Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。 * [text](api/wrapper/text.md) * [trigger](api/wrapper/trigger.md) * [isVisible](api/wrapper/isVisible.md) - * [WrapperArray](api/wrapper-array/README.md) + * [WrapperArray](api/wrapper-array/) * [at](api/wrapper-array/at.md) * [contains](api/wrapper-array/contains.md) * [exists](api/wrapper/exists.md) @@ -67,7 +67,7 @@ Vue Test Utils 是 Vue.js 官方的单元测试实用工具库。 * [setProps](api/wrapper-array/setProps.md) * [trigger](api/wrapper-array/trigger.md) * [isVisible](api/wrapper-array/isVisible.md) - * [组件](api/components/README.md) + * [组件](api/components/) * [TransitionStub](api/components/TransitionStub.md) * [TransitionGroupStub](api/components/TransitionGroupStub.md) * [RouterLinkStub](api/components/RouterLinkStub.md) diff --git a/docs/zh/api/mount.md b/docs/zh/api/mount.md index 946bda67e..a09ba0391 100644 --- a/docs/zh/api/mount.md +++ b/docs/zh/api/mount.md @@ -13,7 +13,7 @@ - **用法:** -创建一个包含被挂载和渲染的 Vue 组件的 [`Wrapper`](wrapper/README.md)。 +创建一个包含被挂载和渲染的 Vue 组件的 [`Wrapper`](wrapper/)。 **Without options:** @@ -126,4 +126,4 @@ describe('Foo', () => { }) ``` -- **延伸阅读:**[`Wrapper`](wrapper/README.md) +- **延伸阅读:**[`Wrapper`](wrapper/) diff --git a/docs/zh/api/options.md b/docs/zh/api/options.md index a188102a2..32fadbcc0 100644 --- a/docs/zh/api/options.md +++ b/docs/zh/api/options.md @@ -59,14 +59,6 @@ const wrapper = shallowMount(Component, { expect(wrapper.find('div')).toBe(true) ``` -### 传递文本 - -你可以传递文本到 `slots`。 -这里有一处限制。 - -我们不支持 PhantomJS。 -你可以使用 [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer) 作为替代品。 - ## scopedSlots - 类型:`{ [name: string]: string }` @@ -80,7 +72,7 @@ There are three limitations. * 你不能在 `scopedSlots` 选项中将 `