chore: update

This commit is contained in:
贤心 2021-05-18 03:58:53 +08:00
parent fc09eef635
commit 823a622c77
3 changed files with 7 additions and 3 deletions

2
dist/layui.js vendored

File diff suppressed because one or more lines are too long

View File

@ -118,6 +118,10 @@ layui.use(['upload', 'element'], function(){
obj.preview(function(index, file, result){ obj.preview(function(index, file, result){
$('#demo1').attr('src', result); //图片链接base64 $('#demo1').attr('src', result); //图片链接base64
}); });
return;
layer.msg('不允许上传')
return false;
} }
,done: function(res){ ,done: function(res){

View File

@ -342,8 +342,8 @@ layui.define('layer' , function(exports){
} }
} }
//上传前的回调 //上传前的回调 - 如果回调函数明确返回false则停止上传(#pulls55)
options.before && options.before(args); if(options.before && (options.before(args) === false)) return;
//IE兼容处理 //IE兼容处理
if(device.ie){ if(device.ie){