Skip to content

Commit

Permalink
docs(cn): document global components
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jun 13, 2018
1 parent d6d0874 commit 3e4a73d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export default {

### OutboundLink <Badge text="stable"/>

It(<OutboundLink/>) is used to indicate that this is an external link, and VuePress has added this component to each external link.
It(<OutboundLink/>) is used to indicate that this is an external link. In VuePress this component have been followed by every external link.

### ClientOnly <Badge text="stable"/>

Expand Down
46 changes: 46 additions & 0 deletions docs/zh/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,49 @@ export default {
}
}
</script>

## 内置的组件

### OutboundLink <Badge text="stable"/>

(<OutboundLink/>) 用来表明当前是一个外部链接。在 VuePress 中这个组件会紧跟在每一个外部链接后面。

### ClientOnly <Badge text="stable"/>

参考 [浏览器的 API 访问限制](#浏览器的-api-访问限制)

### Content <Badge text="beta" type="warn"/>

- **Props**:

- `custom` - boolean

- **用法**


当前的 `.md` 文件渲染的内容,当你在使用 [自定义布局](../default-theme-config/README.md#特定页面的自定义布局) 时,它将非常有用。

``` vue
<Content/>
```

**参考:**

- [自定义主题 > 获取渲染内容](./custom-themes.md#获取渲染内容)


### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>

- **Props**:

- `text` - string
- `type` - string, 可选值: `"tip"|"warn"|"error"`,默认值是: `"tip"`
- `vertical` - string, 可选值: `"top"|"middle"`,默认值是: `"top"`

- **Usage**:

你可以在标题文本的末尾,使用这个组件来为某些 API 添加一些状态:

``` md
### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
```

0 comments on commit 3e4a73d

Please sign in to comment.