Skip to content

Commit

Permalink
Fix typo (PanJiaChen#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
李晋泽 authored Jun 14, 2020
1 parent 4d84605 commit 0aaf8d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/zh/guide/essentials/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ import moment from 'moment'
Object.defineProperty(Vue.prototype, '$moment', { value: moment })
```

由于所有的组件都会从 Vue 的原型对象上继承它们的方法, 因此在所有组件/实例中都可以通过 this.$moment: 的方式访问 Moment 而不需要定义全局变量或者手动的引入.
由于所有的组件都会从 Vue 的原型对象上继承它们的方法, 因此在所有组件/实例中都可以通过 this.$moment. 的方式访问 Moment 而不需要定义全局变量或者手动的引入:

**MyNewComponent.vue**

```js
export default {
created() {
console.log('The time is '.this.$moment().format('HH:mm'))
console.log('The time is ', this.$moment().format('HH:mm'))
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/essentials/mock-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function fetchComments(id) {

声明完接口之后,我们需要找到对应的 mock 文件夹[mock/article.js](https://github.com/PanJiaChen/vue-element-admin/blob/master/mock/article.js),在下面创建一个能拦截路由的 mock 接口

**请注意,mock 拦截是基于路由来做的,请确 mock 数据一定能匹配你的 api 保路由,支持正则**
**请注意,mock 拦截是基于路由来做的,请确保 mock 数据一定能匹配你的 api 路由,支持正则**

```js
// fetchComments 的 mock
Expand Down

0 comments on commit 0aaf8d9

Please sign in to comment.