跳到主要内容

eo-drawer

<eo-drawer>
Alias: <containers.general-drawer>

通用抽屉容器构件。

Playground

Examples​

Placement​

Playground

Width​

Playground

Height​

Playground

Closable​

Playground

Mask​

Playground

MaskClosable​

Playground

Slots​

Playground

Open Event & Close Event​

Playground

Nested​

Playground

Properties​

NameDescriptionTypeDefaultRequired
customTitle

标题

string
subTitle

副标题

string
width

宽度(placement为left,right时生效)

number | string
height

高度(placement为top,bottom时生效)

number | string
closable

是否显示右上角的关闭按钮

boolean
mask

是否展示遮罩层

boolean true
maskClosable

点击遮罩层是否关闭抽屉

boolean
visible

抽屉是否显示

boolean
footerSlot

是否存在底层插槽

boolean
placement

抽屉方向

Placement
scrollToTopWhenOpen

打开抽屉时内容区是否自动滚动到顶部

注意:仅初始设置有效。

boolean true
maskStyle

自定义遮罩层的样式

{}
keyboard

是否支持键盘 esc 关闭

boolean
themeVariant

主题变体

"default" | "elevo"
stackable

是否可堆叠,开启后每次打开抽屉会将新的抽屉置于上层(zIndex ++)

注意:仅初始设置有效。

boolean
textContent

文本内容

string

Slots​

NameDescription
(default)

抽屉内容插槽

headerLeft

头部左上角(标题右侧)

extra

头部右上角(关闭按钮左侧)

footer

抽屉底部插槽

Events​

NameDescriptionEvent Detail
open

抽屉开启事件

void
close

抽屉关闭事件

void

Methods​

NameDescriptionParamsReturns
open

抽屉开启方法

close

抽屉关闭方法

Type references​

Placement​

"left" | "right" | "top" | "bottom"