Yao fbbf539662
[breaking change] Dialog Popup 重构 (#69)
* 重新更改 popup

* 更丰富的popup 功能

* 文档补充

* rebuild dialog

* dialog 文档补充

* 增加 icon 文档
2017-12-03 17:40:42 +08:00

41 lines
652 B
JavaScript

Page({
data: {
showPopup: false,
showLeftPopup: false,
showRightPopup: false,
showTopPopup: false,
showBottomPopup: false
},
togglePopup() {
this.setData({
showPopup: !this.data.showPopup
});
},
toggleLeftPopup() {
this.setData({
showLeftPopup: !this.data.showLeftPopup
});
},
toggleRightPopup() {
this.setData({
showRightPopup: !this.data.showRightPopup
});
},
toggleBottomPopup() {
this.setData({
showBottomPopup: !this.data.showBottomPopup
});
},
toggleTopPopup() {
this.setData({
showTopPopup: !this.data.showTopPopup
});
}
});