Skip to content

Commit 4869502

Browse files
committed
build: Travis CI automatic compilation
1 parent 8c2431f commit 4869502

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

dist/popup/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/popup/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<view wx:if="{{show}}" class="container-popup l-class" style="z-index:{{zIndex}};" catchtouchmove="doNothing">
2-
<view class="container-bg container-bg-{{status}} l-bg-class"></view>
2+
<view class='container-bg container-bg-{{animation ? status:""}} l-bg-class'></view>
33
<view class="popup-content {{ show ? contentAlign : ''}} popup-fade-{{contentAlign}}-active-{{animation ? status:''}} l-panel-class" catchtap="onPopupTap">
44
<view catchtap="doNothing">
55
<slot></slot>

examples/dist/popup/index.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,29 @@ Component({
8989
// 点击事件
9090
onPopupTap() {
9191
if (this.data.locked !== true) {
92+
this._hidePopup();
93+
}
94+
95+
eventUtil.emit(this, 'lintap');
96+
},
97+
98+
_hidePopup(){
99+
if(this.data.animation){
92100
this.setData({
93101
status: 'hide'
94102
});
103+
// 延迟 300ms 等动画结束再去掉节点
95104
setTimeout(() => {
96105
this.setData({
97106
show: false
98107
});
99108
}, 300);
109+
}else{
110+
this.setData({
111+
show: false,
112+
status: 'hide'
113+
});
100114
}
101-
102-
eventUtil.emit(this, 'lintap');
103115
},
104116

105117
// ================= 开放函数 ========================
@@ -127,14 +139,7 @@ Component({
127139
* 会忽略 locked 属性
128140
*/
129141
linHide() {
130-
this.setData({
131-
status: 'hide'
132-
});
133-
setTimeout(() => {
134-
this.setData({
135-
show: false
136-
});
137-
}, 300);
142+
this._hidePopup();
138143
}
139144
}
140145
});

examples/dist/popup/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<view wx:if="{{show}}" class='container-popup l-class'
22
style="z-index:{{zIndex}}; "
33
catchtouchmove="doNothing">
4-
<view class='container-bg container-bg-{{status}} l-bg-class'></view>
4+
<view class='container-bg container-bg-{{animation ? status:""}} l-bg-class'></view>
55
<view
66
class="popup-content {{ show ? contentAlign : ''}} popup-fade-{{contentAlign}}-active-{{animation ? status:''}} l-panel-class"
77
catchtap='onPopupTap'>

0 commit comments

Comments
 (0)