mirror of https://github.com/layui/layer
修正 prompt 设置强行设置非input,value.length报错
修正 prompt 设置强行设置非input,value.length报错pull/54/head
parent
c66ad46cfa
commit
477a0add41
|
@ -972,7 +972,7 @@ layer.prompt = function(options, yes){
|
|||
var value = prompt.val();
|
||||
if(value === ''){
|
||||
prompt.focus();
|
||||
} else if(value.length > (options.maxlength||500)) {
|
||||
} else if(value&&value.length > (options.maxlength||500)) {
|
||||
layer.tips('最多输入'+ (options.maxlength || 500) +'个字数', prompt, {tips: 1});
|
||||
} else {
|
||||
yes && yes(value, index, prompt);
|
||||
|
|
Loading…
Reference in New Issue