From 8c8f8950f8ae87fcbc1da0da6ff84ee9f68740cd Mon Sep 17 00:00:00 2001 From: shijian <2954700422@qq.com> Date: Fri, 15 Dec 2023 09:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3game.promises.prompt=E7=9A=84?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/game/game.js b/game/game.js index f8228c102..bcc80ba4b 100644 --- a/game/game.js +++ b/game/game.js @@ -36218,8 +36218,9 @@ new Promise(resolve=>{ * 注: 由于参数列表是随意的,在这里我准备限制一下这个函数的参数顺序 * * @type {{ - * (title: string, forced?: boolean): Promise; - * (alertOption: 'alert', title: string, forced?: boolean): Promise; + * (title: string): Promise; + * (title: string, forced: true): Promise; + * (alertOption: 'alert', title: string): Promise; * }} * * @param { string } title 设置prompt标题与input内容 @@ -36241,7 +36242,7 @@ new Promise(resolve=>{ title=alertOption; game.prompt(title,forced,resolve); }else{ - game.prompt(alertOption,title,forced,resolve); + game.prompt(title,alertOption,resolve); } }); }, @@ -36257,7 +36258,7 @@ new Promise(resolve=>{ */ alert(title){ return new Promise((resolve,reject)=>{ - game.prompt('alert',title,resolve); + game.prompt(title,'alert',resolve); }); }, // 读写函数promises化(不用考虑其对应函数是否存在)