vant-weapp/dist/popup/index.js
2018-05-29 22:29:16 +08:00

37 lines
554 B
JavaScript

'use strict';
Component({
properties: {
show: {
type: Boolean,
value: false
},
overlay: {
type: Boolean,
value: true
},
closeOnClickOverlay: {
type: Boolean,
value: true
},
// 弹出方向
type: {
type: String,
value: 'center'
}
},
methods: {
handleMaskClick: function handleMaskClick() {
this.triggerEvent('click-overlay', {});
if (!this.data.closeOnClickOverlay) {
return;
}
this.triggerEvent('close', {});
}
}
});