提交 c1e6ba77 编写于 作者: U ULIVZ

docs: document global components

上级 d68199de
......@@ -268,7 +268,7 @@ module.exports = {
}
</style>
## Import Code Snippets <Badge text="Experimental" type="warn"/> <Badge text="0.10.1+" type="tip"/>
## Import Code Snippets <Badge text="beta" type="warn"/> <Badge text="0.10.1+" type="tip"/>
You can import code snippets from existing files via following syntax:
......
......@@ -175,3 +175,48 @@ export default {
}
}
</script>
## Built-In Components
### 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.
### ClientOnly <Badge text="stable"/>
See [Browser API Access Restrictions](#browser-api-access-restrictions).
### Content <Badge text="beta" type="warn"/>
- **Props**:
- `custom` - boolean
- **Usage**
The compiled content of the current `.md` file being rendered. This will be very useful when you use [Custom Layout](../default-theme-config/README.md#custom-layout-for-specific-pages).
``` vue
<Content/>
```
**Also see:**
- [Custom Themes > Content Outlet](./custom-themes.md#content-outlet)
### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
- **Props**:
- `text` - string
- `type` - string, optional value: `"tip"|"warn"|"error"`, defaults to `"tip"`.
- `vertical` - string, optional value: `"top"|"middle"`, defaults to `"top"`.
- **Usage**:
You can use this component at the end of header text to add some status for some API:
``` md
### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
```
......@@ -266,7 +266,7 @@ module.exports = {
}
</style>
## 导入代码段 <Badge text="Experimental" type="warn"/> <Badge text="0.10.1+" type="tip"/>
## 导入代码段 <Badge text="beta" type="warn"/> <Badge text="0.10.1+" type="tip"/>
你可以通过下述的语法导入已经存在的文件中的代码段:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册