跳到主要内容

Drawer

Drawer.

Example

js

Page({
data: {
show: false,
},
setClose() {
this.setData({ show: false })
}
})

bxml

<drawer
maskClass="mask-class"
visible="{{show}}"
bindclose="setClose"
direction="bottom"
draggable="true"
>
<scroll-view scrollY>
<view>item1</view>
</scroll-view>
</drawer>

bxss

.mask-class {}

Props

NameTypeDescriptionDefault
directionstring"bottom"
visiblebooleanfalse
mask-closablebooleantrue
draggablebooleanfalse
container-classstring""
mask-classstring""
content-classstring""
use-dark-maskbooleanfalse
show-top-handlebooleanfalse
transition-durationnumber300

Events

NameDescription
bindopen
bindclose