This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop-wechat/components/popup/index.js

37 lines
538 B
JavaScript
Raw Permalink Normal View History

2020-04-25 22:59:04 +08:00
'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() {
this.triggerEvent('click-overlay', {});
if (!this.data.closeOnClickOverlay) {
return;
}
this.triggerEvent('close', {});
}
}
});