Browse Source

Pull request #3775: BI-156033 fix: callback执行时拿到的配置还是初始化的,set无效了

Merge in VISUAL/fineui from ~OLIVER.CHEN/fineui:master to master

* commit 'b7f58f9963d07bb1055bd6b89c18f05e5e4ac1e8':
  BI-156033 fix: callback执行时拿到的配置还是初始化的,set无效了
master
Oliver.Chen-陈润桐 2 days ago
parent
commit
dac6341348
  1. 4
      packages/fineui/src/base/single/input/file.js

4
packages/fineui/src/base/single/input/file.js

@ -228,7 +228,7 @@ const sendFile = (toString => {
attachO.filename = handler.file.fileName; attachO.filename = handler.file.fileName;
if (handler.maxLength === 1) { if (handler.maxLength === 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
// handler.attach_array.push(attachO); // handler.attach_array.push(attachO);
} else { } else {
handler.attach_array[current] = attachO; handler.attach_array[current] = attachO;
} }
@ -585,8 +585,8 @@ export class File extends Widget {
} }
_events(wrap) { _events(wrap) {
const { maxLength, errorText } = this.options;
const callback = () => { const callback = () => {
const { maxLength, errorText } = this.options;
event.del(wrap.dom.input, "change", callback); event.del(wrap.dom.input, "change", callback);
const input = wrap.dom.input.cloneNode(true); const input = wrap.dom.input.cloneNode(true);
const files = F(wrap.dom.input); const files = F(wrap.dom.input);

Loading…
Cancel
Save