Skip to content

Commit c1e6ba7

Browse files
committed
docs: document global components
1 parent d68199d commit c1e6ba7

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

docs/guide/markdown.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ module.exports = {
268268
}
269269
</style>
270270

271-
## Import Code Snippets <Badge text="Experimental" type="warn"/> <Badge text="0.10.1+" type="tip"/>
271+
## Import Code Snippets <Badge text="beta" type="warn"/> <Badge text="0.10.1+" type="tip"/>
272272

273273
You can import code snippets from existing files via following syntax:
274274

docs/guide/using-vue.md

+45
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,48 @@ export default {
175175
}
176176
}
177177
</script>
178+
179+
## Built-In Components
180+
181+
### OutboundLink <Badge text="stable"/>
182+
183+
It(<OutboundLink/>) is used to indicate that this is an external link, and VuePress has added this component to each external link.
184+
185+
### ClientOnly <Badge text="stable"/>
186+
187+
See [Browser API Access Restrictions](#browser-api-access-restrictions).
188+
189+
### Content <Badge text="beta" type="warn"/>
190+
191+
- **Props**:
192+
193+
- `custom` - boolean
194+
195+
- **Usage**
196+
197+
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).
198+
199+
``` vue
200+
<Content/>
201+
```
202+
203+
**Also see:**
204+
205+
- [Custom Themes > Content Outlet](./custom-themes.md#content-outlet)
206+
207+
208+
### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
209+
210+
- **Props**:
211+
212+
- `text` - string
213+
- `type` - string, optional value: `"tip"|"warn"|"error"`, defaults to `"tip"`.
214+
- `vertical` - string, optional value: `"top"|"middle"`, defaults to `"top"`.
215+
216+
- **Usage**:
217+
218+
You can use this component at the end of header text to add some status for some API:
219+
220+
``` md
221+
### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
222+
```

docs/zh/guide/markdown.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ module.exports = {
266266
}
267267
</style>
268268

269-
## 导入代码段 <Badge text="Experimental" type="warn"/> <Badge text="0.10.1+" type="tip"/>
269+
## 导入代码段 <Badge text="beta" type="warn"/> <Badge text="0.10.1+" type="tip"/>
270270

271271
你可以通过下述的语法导入已经存在的文件中的代码段:
272272

0 commit comments

Comments
 (0)