Skip to content

Drawer 抽屉

从屏幕边缘滑出的浮层面板,支持四个方向,常用于表单操作、详情展示等场景。

基础用法

弹出方向

自定义底部

API

Props

属性类型默认值说明
openboolean是否显示(必填)
titlestring标题文字
placementDrawerPlacement'right'弹出方向:right | left | top | bottom
widthnumber | string360抽屉宽度(left/right 方向)
heightnumber | string320抽屉高度(top/bottom 方向)
closablebooleantrue是否显示关闭按钮,也控制点击遮罩/Esc 是否关闭
bodyStyleobject内容区自定义样式

Events

事件说明
@close关闭抽屉时触发(需更新 open

Slots

插槽说明
default抽屉内容区
title自定义标题(覆盖 title prop)
footer自定义底部,不传则显示「取消」「确定」默认按钮;传空则隐藏底部

AUI Vue Components — Built with Vue 3 & VitePress