mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
32 lines
551 B
JavaScript
32 lines
551 B
JavaScript
'use strict';
|
|
|
|
Component({
|
|
externalClasses: ['custom-class', 'overlay-class'],
|
|
|
|
properties: {
|
|
show: Boolean,
|
|
overlayStyle: String,
|
|
overlay: {
|
|
type: Boolean,
|
|
value: true
|
|
},
|
|
closeOnClickOverlay: {
|
|
type: Boolean,
|
|
value: true
|
|
},
|
|
position: {
|
|
type: String,
|
|
value: 'center'
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
onClickOverlay: function onClickOverlay() {
|
|
this.triggerEvent('click-overlay');
|
|
|
|
if (this.data.closeOnClickOverlay) {
|
|
this.triggerEvent('close');
|
|
}
|
|
}
|
|
}
|
|
}); |