添加自定义类型

This commit is contained in:
wenc000 2020-12-07 17:04:47 +08:00
parent 1d58308d4f
commit 48dd9bfc7a

View File

@ -241,6 +241,7 @@ layui.define(function(exports) {
file: function (opt) {
var self = this;
var fileType = opt.type;
var customType = opt.customType;
var url = 'route/file/uploadfile/v2/';
if (fileType == 'image') {
url += '2';
@ -251,6 +252,9 @@ layui.define(function(exports) {
} else {
url += '1';
}
if(customType) {
url += '?customType='+ customType;
}
if (typeof (opt.maxFileCount) != 'undefined' && opt.maxFileCount != '') {
self.maxFileCount = opt.maxFileCount;
} else {