Merge pull request #91 from zjpzjp/patch-1

加入文件 的 accpet 支持,用于点击上传按钮后 打开系统文件框时, 默认的文件筛选
This commit is contained in:
贤心 2018-04-03 02:53:42 +08:00 committed by GitHub
commit 477ab39ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,7 @@ layui.define('layer' , function(exports){
var that = this
,options = that.config
,elemFile = that.elemFile = $([
'<input class="'+ ELEM_FILE +'" type="file" name="'+ options.field +'"'
'<input class="'+ ELEM_FILE +'" type="file" accept="'+ options.domAccept +'" name="'+ options.field +'"'
,(options.multiple ? ' multiple' : '')
,'>'
].join(''))