From ad5e575b314942dda4805100fc2471d446d86081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9C=B0=E4=BA=9A=E5=B0=94-IT?= <136627746+Diyar-IT@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:16:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E5=8F=98=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/upload.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/upload.js b/src/modules/upload.js index f2514fdc..3bc77163 100644 --- a/src/modules/upload.js +++ b/src/modules/upload.js @@ -87,7 +87,7 @@ layui.define(['lay','layer'], function(exports){ }; // 初始渲染 - Class.prototype.render = function(options){ + Class.prototype.render = function(){ var that = this; var options = that.config; @@ -494,13 +494,13 @@ layui.define(['lay','layer'], function(exports){ }; //重置方法 - Class.prototype.reload = function(options){ + Class.prototype.reload = function(opts){ options = options || {}; delete options.elem; delete options.bindAction; var that = this; - var options = that.config = $.extend({}, that.config, upload.config, options); + var options = that.config = $.extend({}, that.config, upload.config, opts); var next = options.elem.next(); //更新文件域相关属性 From 504e44ab4964b23c22e4c6f11fceb40dfd1951c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Sun, 3 Sep 2023 12:42:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=20upload=20=E9=87=8D?= =?UTF-8?q?=E8=BD=BD=E5=A4=84=E4=BB=A3=E7=A0=81=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/upload.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/upload.js b/src/modules/upload.js index 3bc77163..41992d4c 100644 --- a/src/modules/upload.js +++ b/src/modules/upload.js @@ -493,17 +493,17 @@ layui.define(['lay','layer'], function(exports){ send(); }; - //重置方法 + // 重置方法 Class.prototype.reload = function(opts){ - options = options || {}; - delete options.elem; - delete options.bindAction; + opts = opts || {}; + delete opts.elem; + delete opts.bindAction; var that = this; var options = that.config = $.extend({}, that.config, upload.config, opts); var next = options.elem.next(); - //更新文件域相关属性 + // 更新文件域相关属性 next.attr({ name: options.name, accept: options.acceptMime,