Skip to content

docs(zh): updated #1093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/zh/api/wrapper-array/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ import Foo from './Foo.vue'

const wrapper = shallowMount(Foo)
const filteredDivArray = wrapper.findAll('div')
.filter(w => !w.classes('filtered'))
.filter(w => !w.hasClass('filtered'))
```
2 changes: 1 addition & 1 deletion docs/zh/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe('键盘事件测试', () => {
expect(wrapper.vm.quantity).toBe(0)
})

it('上按键将数量设置为 1', () => {
it('上按键将数量加 1', () => {
const wrapper = mount(QuantityComponent)
wrapper.trigger('keydown.up')
expect(wrapper.vm.quantity).toBe(1)
Expand Down
6 changes: 4 additions & 2 deletions docs/zh/guides/using-with-vuex.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ export default {
state.count++
}
}

```

```js
Expand Down Expand Up @@ -344,7 +343,8 @@ test('evenOrOdd returns odd if state.count is odd', () => {
我们来写一个测试吧。当我们创建一个 store 时,我们会使用 `localVue` 来避免污染 Vue 的基础构造函数。该测试会使用 `store-config.js` 导出的配置创建一个 store:

```js
// store-config.spec.js
// store-config.js

import mutations from './mutations'
import getters from './getters'

Expand All @@ -358,6 +358,8 @@ export default {
```

```js
// store-config.spec.js

import { createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import storeConfig from './store-config'
Expand Down