# 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 ``` ### Example (Example 2) ```html ``` ### Example (Example 3) ```vue ``` ### Example (Example 4) ```html ``` ### 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)