We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfaf6d2 commit 843fab7Copy full SHA for 843fab7
pages/API/show-loading/show-loading.vue
@@ -4,7 +4,9 @@
4
<view class="uni-padding-wrap">
5
<view class="uni-btn-v">
6
<button class="btn-load" type="primary" @click="showLoading">显示 loading 提示框</button>
7
+ <!-- #ifndef MP-ALIPAY -->
8
<button @click="hideLoading">隐藏 loading 提示框</button>
9
+ <!-- #endif -->
10
</view>
11
12
@@ -21,10 +23,22 @@
21
23
uni.showLoading({
22
24
title: 'loading'
25
});
26
+
27
+ // #ifdef MP-ALIPAY
28
+ this._showTimer && clearTimeout(this._showTimer);
29
+ this._showTimer = setTimeout(() => {
30
+ this.hideLoading();
31
+ }, 3000)
32
+ // #endif
33
},
34
hideLoading: function() {
35
uni.hideLoading();
36
}
37
+ },
38
+ onUnload() {
39
40
41
42
43
44
</script>
0 commit comments