Skip to content

Commit 2ca2611

Browse files
committed
docs: update <Content> component
1 parent 4776010 commit 2ca2611

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

packages/docs/docs/guide/using-vue.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -203,23 +203,26 @@ It(<OutboundLink/>) is used to indicate that this is an external link. In VuePre
203203

204204
See [Browser API Access Restrictions](#browser-api-access-restrictions).
205205

206-
### Content <Badge text="beta" type="warn"/>
206+
### Content <Badge text="1.0.0+"/>
207207

208208
- **Props**:
209209

210-
- `custom` - boolean
210+
- `pageKey` - string, [page](./global-computed.md#page)'s hash key, defaults to current page's key.
211+
- `slotKey` - string, key of [markdown slot](./markdown-slot.md). defaults to [default slot](./markdown-slot.md#default-slot-content).
211212

212213
- **Usage**
213214

214-
The compiled content of the current `.md` file being rendered. This will be very useful when you use [Custom Layout](../theme/default-theme-config.md#custom-layout-for-specific-pages).
215+
Specify a specific slot for a specific page (.md) for rendering. This will be very useful when you use [Custom Layout](../theme/default-theme-config.md#custom-layout-for-specific-pages) or [Writing a theme](../theme/writing-a-theme.md)
215216

216217
``` vue
217218
<Content/>
218219
```
219220

220221
**Also see:**
221222

222-
- [Custom Themes > Content Outlet](../theme/writing-a-theme.md#content-outlet)
223+
- [Global Computed > $page](./global-computed.md#page)
224+
- [Markdown Slot](./markdown-slot.md)
225+
- [Writing a theme > Content Outlet](../theme/writing-a-theme.md#content-outlet)
223226

224227

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

packages/docs/docs/zh/guide/using-vue.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -203,24 +203,27 @@ export default {
203203

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

206-
### Content <Badge text="beta" type="warn"/>
206+
### Content <Badge text="1.0.0+"/>
207207

208208
- **Props**:
209209

210-
- `custom` - boolean
210+
- `pageKey` - string, 要渲染的 [page](./global-computed.md#page) 的 hash key, 默认值是当前页面的 key.
211+
- `slotKey` - string, 页面的 [markdown slot](./markdown-slot.md) 的 key. 默认值是 [default slot](./markdown-slot.md#default-slot-content).
211212

212-
- **用法**
213+
- **Usage**
213214

214-
215-
当前的 `.md` 文件渲染的内容,当你在使用 [自定义布局](../theme/default-theme-config.md#特定页面的自定义布局) 时,它将非常有用。
215+
指定一个指定页面的特定 slot 用于渲染,当你使用 [自定义布局](../theme/default-theme-config.md#特定页面的自定义布局) 或者自定义主题时,这将非常有用。
216+
216217

217218
``` vue
218219
<Content/>
219220
```
220221

221222
**参考:**
222223

223-
- [自定义主题 > 获取渲染内容](../theme/writing-a-theme.md#获取渲染内容)
224+
- [全局计算属性 > $page](./global-computed.md#page)
225+
- [Markdown 插槽](./markdown-slot.md)
226+
- [开发主题 > 获取渲染内容](../theme/writing-a-theme.md#获取渲染内容)
224227

225228

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

0 commit comments

Comments
 (0)