Browse Source

Pull request #2113: BI-92633 fix: 上传文件会停顿1s

Merge in VISUAL/fineui from ~ZHENFEI.LI/fineui:master to master

* commit '00d5a8f7e31b13e48e832830a1dc5874e01c6f11':
  BI-92633 fix: 上传文件会停顿1s
es6
Zhenfei.Li 3 years ago
parent
commit
6cd4ac6c2a
  1. 5
      src/base/single/input/file.js

5
src/base/single/input/file.js

@ -520,7 +520,8 @@
setTimeout(function () {
self_.clean(); // remove files from list
self_.hide(); // hide progress bars and enable input file
// enable again the submit button/element
}, 100);
if (200 > xhr.status || xhr.status > 399) {
BI.Msg.toast(BI.i18nText("BI-Upload_File_Error"), { level: "error" });
self.fireEvent(BI.File.EVENT_ERROR);
@ -534,8 +535,6 @@
}
});
!error && self.fireEvent(BI.File.EVENT_UPLOADED);
// enable again the submit button/element
}, 1000);
};
_wrap.url = o.url;
_wrap.fileType = o.accept; // 文件类型限制

Loading…
Cancel
Save