提交 3808eef0 编写于 作者: W wanganxp 提交者: DCloud-yyl

完善措辞

(cherry picked from commit a140182e)
上级 afa0f1d4
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
<view class="uni-padding-wrap"> <view class="uni-padding-wrap">
<view class="uni-btn-v"> <view class="uni-btn-v">
<button class="uni-btn-v" type="primary" @click="showLoading">显示 loading 提示框</button> <button class="uni-btn-v" type="primary" @click="showLoading">显示 loading 提示框</button>
<!-- #ifndef MP-ALIPAY -->
<button class="uni-btn-v" @click="hideLoading">隐藏 loading 提示框</button> <button class="uni-btn-v" @click="hideLoading">隐藏 loading 提示框</button>
<!-- #endif --> <text>为方便演示,loading弹出3秒后自动关闭</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -86,28 +85,13 @@ ...@@ -86,28 +85,13 @@
mask: this.maskSelect mask: this.maskSelect
}); });
} }
// #ifdef MP-ALIPAY
this._showTimer && clearTimeout(this._showTimer);
this._showTimer = setTimeout(() => {
this.hideLoading();
}, 3000)
// #endif
// #ifdef APP-PLUS
setTimeout(function () { setTimeout(function () {
this.hideLoading(); this.hideLoading();
}, 3000); }, 3000);
// #endif
}, },
hideLoading: function () { hideLoading: function () {
uni.hideLoading(); uni.hideLoading();
} }
} }
// #ifdef MP-ALIPAY
,
onUnload() {
// 页面卸载的时候,手动关闭loading
this._showTimer && clearTimeout(this._showTimer);
}
// #endif
} }
</script> </script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册