Skip to content

Commit

Permalink
docs: update <Content> component
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Jan 29, 2019
1 parent 4776010 commit 2ca2611
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
11 changes: 7 additions & 4 deletions packages/docs/docs/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,26 @@ It(<OutboundLink/>) is used to indicate that this is an external link. In VuePre

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

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

- **Props**:

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

- **Usage**

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).
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)

``` vue
<Content/>
```

**Also see:**

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


### Badge <Badge text="beta" type="warn"/> <Badge text="0.10.1+"/>
Expand Down
15 changes: 9 additions & 6 deletions packages/docs/docs/zh/guide/using-vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,24 +203,27 @@ export default {

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

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

- **Props**:

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

- **用法**
- **Usage**


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

``` vue
<Content/>
```

**参考:**

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


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

0 comments on commit 2ca2611

Please sign in to comment.