Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjl committed Dec 8, 2017
1 parent 2454603 commit a284c0f
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,33 @@ import {DrawerLayout} from 'vue-drawer-layout'
Vue.component(DrawerLayout.name, DrawerLayout)
```

```html
<vue-drawer-layout
ref="menu"
:width="width"
:action="sideMenuAction"
:enable="sideMenuEnable"
@slide-start="handleSlideStart"
@slide-move="handleSlideMove"
@slide-end="handleSlideEnd"
@mask-click="handleMaskClick">
<div class="menu-content" slot="drawer">
<!--drawer-content (左侧滑动内容区)-->
</div>
<div slot="content">
<!--main-content (主内容区)-->
</div>
</vue-drawer-layout>
```
## API

### props

| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|-----------|-----------|-----------|-------------|-------------|
|-----------|-----------|-----------|-------------|--------------|
| width | 抽屉宽度 | `Number` | `body宽度的80%` | |
| enable | 抽屉是否可用 | `Boolean` | - |
| action | 动作 | `Object` | - | `{visible: boolean}` |

### slots

Expand Down

0 comments on commit a284c0f

Please sign in to comment.