Skip to content
On this page

抽屉

抽屉的使用方式与**模态框(DtModal)**相似。

基本使用

useDrawer API

属性说明类型默认值版本
t国际化备注string
visible弹框是否可见booleanfalse
closable点击空白区域是否可以关闭booleantrue
height高度number
minHeight最小高度number
width宽度number | string
draggable是否支持弹窗拖拽booleantrue
defaultFullscreen默认全屏booleanfalse
canFullscreen是否支持全屏booleantrue
title弹框标题string | ComputedRef<string> | ((data: Recordable) => String)
loading弹框是否显示加载booleantrue
loadingTip加载提示string加载中...
useWrapper是否使用modalWrapperbooleantrue
showOkBtn是否显示保存按钮booleantrue
showCancelBtn是否显示关闭按钮booleantrue
okText保存文字string'保存'
cancelText取消文字string'关闭'
footerfooter按钮ButtonProps[]
bodyStylebody样式CSSProperties
getContainer挂载位置
placement弹框位置'top' | 'right' | 'bottom' | 'left''right'
closeFunc按钮关闭前的钩子函数() => Promise<boolean>
afterClose弹框关闭后钩子函数() => void