Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

修正prompt弹窗对area参数无效的问题 #47

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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){
Expand Down