# uni-drawer
## Instructions
组件名:uni-drawer
代码块: uDrawer
点击下载&安装
### Syntax
- 使用 ``(或 ``,当需要包裹子节点时)。
- 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。
#### Properties
| 属性名 | 类型 | 默认值 | 说明 |
| --- | --- | --- | --- |
| mask | Boolean | true | 是否显示遮罩 |
| maskClick | Boolean | true | 点击遮罩是否可以关闭抽屉 |
| mode | String | left | Drawer滑出位置,可选值:left(从左侧滑出), right(从右侧滑出) |
| width | Number | 220 | Drawer 宽度,仅vue页面设置生效 |
#### Events
| 事件名 | 说明 | 返回值 |
| --- | --- | --- |
| @change | 抽屉状态发生变化触发事件 | true:抽屉已经打开;false:抽屉已经关闭; |
#### Platform Compatibility
See official docs for platform support table: `https://uniapp.dcloud.net.cn/component/uniui/uni-drawer.html`
### Examples
### Example (Example 1)
```vue
可滚动内容 {{ item }}
```
### Example (Example 2)
```html
可滚动内容 {{ item }}
```
### Example (Example 3)
```vue
这是抽屉式导航组件使用示例,可以指定菜单左侧或者右侧弹出(仅初始化生效),组件内部可以放置任何内容。点击页面按钮即可显示导航菜单。
右侧遮罩只能通过按钮关闭,不能通过点击遮罩关闭
可滚动内容 {{item}}
```
### Example (Example 4)
```html
这是抽屉式导航组件使用示例,可以指定菜单左侧或者右侧弹出(仅初始化生效),组件内部可以放置任何内容。点击页面按钮即可显示导航菜单。
右侧遮罩只能通过按钮关闭,不能通过点击遮罩关闭
可滚动内容 {{item}}
```
### Example (Example 5)
```html
```
### Example (Example 6)
```html
```
Reference:
- [Official Documentation](https://uniapp.dcloud.net.cn/component/uniui/uni-drawer.html)
- [Plugin Marketplace](https://ext.dcloud.net.cn/plugin?name=drawer)
- [Local Example](examples/uni-ui/uni-drawer.vue)