Browse Source

Merge pull request #91 from zjpzjp/patch-1

加入文件 的 accpet 支持,用于点击上传按钮后 打开系统文件框时, 默认的文件筛选
pull/100/merge
贤心 7 years ago committed by GitHub
parent
commit
477ab39ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/lay/modules/upload.js

2
src/lay/modules/upload.js

@ -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(''))

Loading…
Cancel
Save