guy 2 years ago
parent
commit
47bb9e5d6c
  1. 12
      bi.lessconfig.json
  2. 2
      package.json
  3. 3
      src/base/single/editor/editor.multifile.js
  4. 13
      src/base/single/input/file.js
  5. 2
      src/widget/multiselect/multiselect.combo.js
  6. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  7. 2
      src/widget/multiselect/multiselect.insert.combo.js
  8. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  9. 2
      src/widget/multiselectlist/multiselectlist.insert.js
  10. 4
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  11. 2
      src/widget/multiselectlist/multiselectlist.js

12
bi.lessconfig.json

@ -22,6 +22,9 @@
"@color-bi-border-radio": "rgba(9, 30, 64, 0.37)",
"@color-bi-border-disabled-radio": "rgba(9, 30, 64, 0.19)",
"@color-bi-background-active-radio-content": "#2C60DB",
"@color-bi-border-checkbox-theme-dark": "rgba(255, 255, 255, 0.37)",
"@color-bi-border-hover-active-radio-theme-dark": "#3869DC",
"@color-bi-background-active-radio-content-theme-dark": "#3869DC",
"@color-bi-background-disabled-active-radio-content": "#FFFFFF",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#FFFFFF",
@ -39,7 +42,10 @@
"@color-bi-color-toast-text": "#000A19",
"@color-bi-text-header-background": "rgba(9, 30, 64, 0.9)",
"@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)",
"@font-down-triangle": "e70b",
"@font-date": "e733",
"@font-trigger-triangle": "e924"
}
"@font-trigger-triangle": "e924",
"@font-solid-bottom": "e905",
"@font-solid-right": "e906",
"@font-dot": "e762",
"@font-down-triangle": "e70b"
}

2
package.json

@ -1,6 +1,6 @@
{
"name": "fineui",
"version": "2.0.20220921232331",
"version": "2.0.20220923174504",
"description": "fineui",
"main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts",

3
src/base/single/editor/editor.multifile.js

@ -43,14 +43,12 @@ BI.MultifileEditor = BI.inherit(BI.Widget, {
});
this.file.on(BI.File.EVENT_ERROR, function () {
self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments);
self._reset();
});
this.file.on(BI.File.EVENT_PROGRESS, function () {
self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments);
});
this.file.on(BI.File.EVENT_UPLOADED, function () {
self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments);
self._reset();
});
BI.createWidget({
@ -95,6 +93,7 @@ BI.MultifileEditor = BI.inherit(BI.Widget, {
},
upload: function () {
this._reset();
this.file.upload();
},

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

@ -56,7 +56,7 @@
del: document.removeEventListener ?
function (node, name, callback) {
node.removeEventListener(name, callback, false);
return this;
} :
function (node, name, callback) {
@ -113,8 +113,8 @@
if (isFunction(handler.onerror)) {
handler.onerror();
}
return;
return;
}
for (var xhr = new XMLHttpRequest,
upload = xhr.upload || {
@ -245,7 +245,7 @@
form.append("FileData", handler.file);
xhr.send(form);
}
return handler;
};
} else {
@ -298,7 +298,7 @@
handler.onload(rpe, { responseText: responseText });
}
}
try { // IE < 8 does not accept enctype attribute ...
var form = document.createElement("<form enctype=\"multipart/form-data\"></form>"),
iframe = handler.iframe || (handler.iframe = document.createElement("<iframe id=\"" + target + "\" name=\"" + target + "\" src=\"" + url + "\"></iframe>"));
@ -353,7 +353,7 @@
};
}
xhr = null;
return sendFile;
}(Object.prototype.toString));
@ -705,7 +705,6 @@
reset: function () {
if (this.wrap) {
this.wrap.files = [];
this.wrap.attach_array = [];
this.wrap.attach_names = [];
this.wrap.attachNum = 0;

2
src/widget/multiselect/multiselect.combo.js

@ -35,7 +35,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};
this.storeValue = o.value || {};
this.storeValue = BI.deepClone(o.value) || {};
this._assertValue(this.storeValue);

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -34,7 +34,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
};
this.storeValue = {
type: BI.Selection.Multi,
value: o.value || []
value: BI.deepClone(o.value) || []
};
// 标记正在请求数据
this.requesting = false;

2
src/widget/multiselect/multiselect.insert.combo.js

@ -33,7 +33,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.trigger.getSearcher().setState(self.storeValue);
self.numberCounter.setButtonChecked(self.storeValue);
};
this.storeValue = o.value || {};
this.storeValue = BI.deepClone(o.value) || {};
// 标记正在请求数据
this.requesting = false;

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -34,7 +34,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
};
this.storeValue = {
type: BI.Selection.Multi,
value: o.value || []
value: BI.deepClone(o.value) || []
};
// 标记正在请求数据
this.requesting = false;

2
src/widget/multiselectlist/multiselectlist.insert.js

@ -15,7 +15,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
BI.MultiSelectInsertList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = this._assertValue(o.value || {});
this.storeValue = this._assertValue(BI.deepClone(o.value) || {});
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));

4
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -16,7 +16,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
var self = this, o = this.options;
this.storeValue = {
type: BI.Selection.Multi,
value: o.value || []
value: BI.deepClone(o.value) || []
};
var assertShowValue = function () {
@ -363,4 +363,4 @@ BI.extend(BI.MultiSelectInsertNoBarList, {
});
BI.MultiSelectInsertNoBarList.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_insert_no_bar_list", BI.MultiSelectInsertNoBarList);
BI.shortcut("bi.multi_select_insert_no_bar_list", BI.MultiSelectInsertNoBarList);

2
src/widget/multiselectlist/multiselectlist.js

@ -15,7 +15,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
BI.MultiSelectList.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.storeValue = this._assertValue(o.value || {});
this.storeValue = this._assertValue(BI.deepClone(o.value) || {});
var assertShowValue = function () {
BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));

Loading…
Cancel
Save