Skip to content

FormDrawer 抽屉表单 ​

简介 ​

FormDrawer 是 ElDrawer 组件的高阶组件,拥有相同的接口,用于配合 Form 组件使用,Form 表单的按钮会移到 FormDrawer 的底部插槽位置。

代码演示 ​

基础演示 ​

API ​

FormDrawerProps ​

继承 element-plus 的 Drawer Attributes,并添加以下属性:

属性描述类型默认值
confirm-text确定按钮的文案string'确定'
cancel-text取消按钮的文案string'取消'
confirm-props确定按钮的属性ButtonProps-
cancel-props取消按钮的属性ButtonProps-
hide-confirm是否隐藏确定按钮booleanfalse
hide-cancel是否隐藏取消按钮booleanfalse

FormDrawerSlots ​

继承 element-plus 的 Drawer Slots,并添加以下插槽。

插槽描述属性
button自定义表单按钮{ submitting: boolean; confirm: () => any | Promise<any>; cancel: () => any;}

FormDrawerEmits ​

继承 element-plus 的 Drawer Events。

FormDrawerExpose ​

继承 element-plus 的 Drawer Exposes。

基于 MIT 许可发布