From 3d5408b4d33dd80063781973a55d45e565c88ac7 Mon Sep 17 00:00:00 2001 From: zhaojinghao Date: Thu, 9 Mar 2017 12:37:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3IE=E4=BD=8E=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=AD=EF=BC=8Cprompt=E5=BC=B9=E7=AA=97=E5=AF=B9are?= =?UTF-8?q?a=E5=8F=82=E6=95=B0=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layer.js b/src/layer.js index b4f6f4d..dfc3910 100644 --- a/src/layer.js +++ b/src/layer.js @@ -944,8 +944,9 @@ layer.prompt = function(options, yes){ if(typeof options === 'function') yes = options; + var area = 'auto'; if(options.area){ - var area = options.area; + area = options.area; style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"'; delete options.area; } @@ -960,6 +961,7 @@ layer.prompt = function(options, yes){ type: 1 ,btn: ['确定','取消'] ,content: content + ,area:area ,skin: 'layui-layer-prompt' + skin('prompt') ,maxWidth: win.width() ,success: function(layero){ From 828adf7f0bd9276a33682ba9dd6820e8ff62d658 Mon Sep 17 00:00:00 2001 From: zhaojinghao Date: Thu, 9 Mar 2017 12:51:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3prompt=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E5=AF=B9area=E5=8F=82=E6=95=B0=E6=97=A0=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer.js b/src/layer.js index dfc3910..d453253 100644 --- a/src/layer.js +++ b/src/layer.js @@ -944,7 +944,7 @@ layer.prompt = function(options, yes){ if(typeof options === 'function') yes = options; - var area = 'auto'; + var area = 'auto'; if(options.area){ area = options.area; style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';