fix: wx.showModal的title不能为undefined,否则不会弹窗

This commit is contained in:
ivinwu
2023-03-08 19:49:48 +08:00
parent cf371aa755
commit 280b04f196
4 changed files with 9 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{ {
"name": "we-request", "name": "we-request",
"version": "1.6.5", "version": "1.6.6",
"description": "本工具通过拓展小程序的wx.request让开发者通过简单的配置实现自动管理登录态等功能", "description": "本工具通过拓展小程序的wx.request让开发者通过简单的配置实现自动管理登录态等功能",
"keywords": [ "keywords": [
"登录态", "登录态",

View File

@@ -52,7 +52,7 @@ function doError(title: string, content: string, retry?: () => any) {
// 是否显示重试按钮 // 是否显示重试按钮
const showErrorRetryBtn = config.errorRetryBtn && typeof retry === "function"; const showErrorRetryBtn = config.errorRetryBtn && typeof retry === "function";
wx.showModal(Object.assign({ wx.showModal(Object.assign({
title, title: title || "",
content: content || "网络或服务异常,请稍后重试", content: content || "网络或服务异常,请稍后重试",
}, !showErrorRetryBtn ? { }, !showErrorRetryBtn ? {
showCancel: false showCancel: false