vant-weapp/dist/popup/index.js
2018-08-07 15:10:21 +08:00

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');
}
}
}
});