From 3d5408b4d33dd80063781973a55d45e565c88ac7 Mon Sep 17 00:00:00 2001 From: zhaojinghao Date: Thu, 9 Mar 2017 12:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3IE=E4=BD=8E=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=AD=EF=BC=8Cprompt=E5=BC=B9=E7=AA=97=E5=AF=B9area?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE=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){