Merge branch 'layui:main' into main

pull/1138/head
sunxiaobin89 2 years ago committed by GitHub
commit 43d9799ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1202,7 +1202,7 @@ var cache = layer.cache||{}, skin = function(type){
//仿系统prompt
layer.prompt = function(options, yes){
var style = '';
var style = '', placeholder = '';
options = options || {};
if(typeof options === 'function') yes = options;
@ -1212,8 +1212,11 @@ layer.prompt = function(options, yes){
style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
delete options.area;
}
var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'></textarea>' : function(){
return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input">';
if (options.placeholder) {
placeholder = ' placeholder="' + options.placeholder + '"';
}
var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style + placeholder + '></textarea>' : function () {
return '<input type="' + (options.formType == 1 ? 'password' : 'text') + '" class="layui-layer-input"' + placeholder + '>';
}();
var success = options.success;

Loading…
Cancel
Save