提交 3e4a73d5 编写于 作者: U ULIVZ

docs(cn): document global components

上级 d6d0874a
......@@ -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"/>
......
......@@ -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+"/>
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册