Skip to content

ProDrawer 超级抽屉

基础用法

Attributes

属性名说明类型默认值
title顶部标题string''
fullscreen是否默认全屏booleanfalse
fullscreenIcon是否渲染全屏图标booleantrue
showFooter是否渲染底部booleantrue
footerAlign底部对齐方式string right
confirmLoading确认按钮 loadingbooleanfalse
confirmText确认按钮文字string确认
cancelText关闭按钮文字string关闭
...其他扩展属性,支持所有 ElDrawer Attributes......

函数式抽屉独有的属性

属性名说明类型默认值
render自定义内容渲染function
renderHeader自定义头部渲染function
renderFooterBefore自定义底部前渲染function
renderFooter自定义底部渲染function
renderFooterAfter自定义底部后渲染function
onConfirm确认按钮点击事件function
onCancel关闭按钮点击事件function
onFullscreen全屏切换事件function

RenderTypes 类型

渲染函数的返回值的类型

ts
/**
 * 渲染函数的返回值的类型
 */
export type RenderTypes = string | VNode | JSX.Element | Component;

DrawerRenderParams 类型

渲染函数的参数类型

ts
/**
 * Render 相关函数的参数
 */
export type DrawerRenderParams = {
  handleConfirm: () => void;
  handleCancel: () => void;
};

Events

名称说明类型
cancel取消事件function
confirm确认事件function
fullscreen全屏切换事件function

Slots

插槽名说明作用域插槽参数
header自定义头部object
header-title自定义头部标题
fullscreen-icon自定义全屏图标object
footer-before自定义底部前object
footer自定义底部object
footer-after自定义底部后object
...其他扩展属性,支持所有 ElDrawer Slots...

Exposes

名称说明类型
elDrawerInstanceElDrawer 实例object
handleConfirm确认事件处理function
handleCancel取消事件处理function
open打开抽屉function
close关闭抽屉function