diff --git a/packages/fineui/src/core/utils/dom.js b/packages/fineui/src/core/utils/dom.js
index 52af3c798..552a60d44 100644
--- a/packages/fineui/src/core/utils/dom.js
+++ b/packages/fineui/src/core/utils/dom.js
@@ -1,9 +1,10 @@
/**
* 对DOM操作的通用函数
*/
-import { Widget } from "../4.widget"
+import { Widget } from "../4.widget";
import { each, isEmpty, isNull, isNotNull } from "../2.base";
import $ from "jquery";
+import { isIE } from "./../platform";
export function ready(fn) {
Widget._renderEngine.createElement(document).ready(fn);
@@ -65,10 +66,10 @@ export function preloadImages(srcArray, onload) {
each(srcArray, (i, src) => {
images[i] = new Image();
images[i].src = src;
- images[i].onload = function () {
+ images[i].onload = function() {
complete();
};
- images[i].onerror = function () {
+ images[i].onerror = function() {
complete();
};
});
@@ -104,7 +105,7 @@ export function getTextSizeHeight(text, fontSize = 12) {
let _scrollWidth = null;
export function getScrollWidth(css) {
- if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) {
+ if (isNull(_scrollWidth) || isNotNull(css) || _scrollWidth === 0) {
const ul = Widget._renderEngine.createElement("
").width(50).height(50)
.css({
position: "absolute",
@@ -751,7 +752,7 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
* 获取position:fixed相对定位的元素
*/
export function getPositionRelativeContainingBlock(element) {
- if (["html", "body", "#document"].indexOf((element.nodeName || "").toLowerCase()) >= 0) {
+ if (isIE() || ["html", "body", "#document"].indexOf((element.nodeName || "").toLowerCase()) >= 0) {
// $FlowFixMe[incompatible-return]: assume body is always available
return element.ownerDocument.body;
}
diff --git a/packages/fineui/src/widget/multiselect/multiselect.loader.js b/packages/fineui/src/widget/multiselect/multiselect.loader.js
index f0546622f..ab234b3f9 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.loader.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.loader.js
@@ -76,12 +76,12 @@ export class MultiSelectLoader extends Widget {
itemsCreator(op, callback) {
const startValue = self._startValue;
self.storeValue &&
- (op = extend(op || {}, {
- selectedValues:
- isKey(startValue) && self.storeValue.type === Selection.Multi
- ? self.storeValue.value.concat(startValue)
- : self.storeValue.value,
- }));
+ (op = extend(op || {}, {
+ selectedValues:
+ isKey(startValue) && self.storeValue.type === Selection.Multi
+ ? self.storeValue.value.concat(startValue)
+ : self.storeValue.value,
+ }));
opts.itemsCreator(op, ob => {
hasNext = ob.hasNext;
let firstItems = [];
@@ -110,9 +110,9 @@ export class MultiSelectLoader extends Widget {
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || "");
if (op.times === 1 && self.storeValue) {
isKey(startValue) &&
- (self.storeValue.type === Selection.All
- ? remove(self.storeValue.value, startValue)
- : pushDistinct(self.storeValue.value, startValue));
+ (self.storeValue.type === Selection.All
+ ? remove(self.storeValue.value, startValue)
+ : pushDistinct(self.storeValue.value, startValue));
self.setValue(self.storeValue);
}
op.times === 1 && self._scrollToTop();
@@ -124,6 +124,7 @@ export class MultiSelectLoader extends Widget {
value: this.storeValue,
});
+
createWidget(
extend(
{
@@ -144,10 +145,10 @@ export class MultiSelectLoader extends Widget {
)
)
);
- this.button_group.on(Controller.EVENT_CHANGE, function () {
+ this.button_group.on(Controller.EVENT_CHANGE, function() {
self.fireEvent(Controller.EVENT_CHANGE, arguments);
});
- this.button_group.on(SelectList.EVENT_CHANGE, function () {
+ this.button_group.on(SelectList.EVENT_CHANGE, function() {
self.fireEvent(MultiSelectLoader.EVENT_CHANGE, arguments);
});
}
diff --git a/packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js b/packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js
index b278b42d9..825a7f6ac 100644
--- a/packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js
+++ b/packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js
@@ -30,7 +30,7 @@ export class MultiSelectNoBarLoader extends Widget {
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
- baseCls: "bi-multi-select-loader",
+ baseCls: "bi-multi-select-loader-no-bar",
logic: {
dynamic: true,
},
@@ -84,12 +84,12 @@ export class MultiSelectNoBarLoader extends Widget {
itemsCreator(op, callback) {
const startValue = self._startValue;
self.storeValue &&
- (op = extend(op || {}, {
- selectedValues:
- isKey(startValue) && self.storeValue.type === Selection.Multi
- ? self.storeValue.value.concat(startValue)
- : self.storeValue.value,
- }));
+ (op = extend(op || {}, {
+ selectedValues:
+ isKey(startValue) && self.storeValue.type === Selection.Multi
+ ? self.storeValue.value.concat(startValue)
+ : self.storeValue.value,
+ }));
opts.itemsCreator(op, ob => {
hasNext = ob.hasNext;
let firstItems = [];
@@ -118,9 +118,9 @@ export class MultiSelectNoBarLoader extends Widget {
callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || "");
if (op.times === 1 && self.storeValue) {
isKey(startValue) &&
- (self.storeValue.type === Selection.All
- ? remove(self.storeValue.value, startValue)
- : pushDistinct(self.storeValue.value, startValue));
+ (self.storeValue.type === Selection.All
+ ? remove(self.storeValue.value, startValue)
+ : pushDistinct(self.storeValue.value, startValue));
self.setValue(self.storeValue);
}
op.times === 1 && self._scrollToTop();
@@ -144,10 +144,10 @@ export class MultiSelectNoBarLoader extends Widget {
items: LogicFactory.createLogicItemsByDirection(Direction.Top, this.button_group),
}))));
- this.button_group.on(Controller.EVENT_CHANGE, function () {
+ this.button_group.on(Controller.EVENT_CHANGE, function() {
self.fireEvent(Controller.EVENT_CHANGE, arguments);
});
- this.button_group.on(SelectList.EVENT_CHANGE, function () {
+ this.button_group.on(SelectList.EVENT_CHANGE, function() {
self.fireEvent(MultiSelectNoBarLoader.EVENT_CHANGE, arguments);
});
}
@@ -215,5 +215,6 @@ export class MultiSelectNoBarLoader extends Widget {
this.button_group.element.css({ "max-height": toPix(h) });
}
- resetWidth() {}
+ resetWidth() {
+ }
}
diff --git a/packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js b/packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js
index 42b9c12a3..965208bac 100644
--- a/packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js
+++ b/packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js
@@ -28,7 +28,7 @@ export class SearchMultiSelectLoader extends Widget {
_defaultConfig() {
return extend(super._defaultConfig(...arguments), {
- baseCls: "bi-multi-select-loader",
+ baseCls: "bi-search-multi-select-loader",
logic: {
dynamic: true,
},
@@ -89,12 +89,12 @@ export class SearchMultiSelectLoader extends Widget {
itemsCreator: (op, callback) => {
const startValue = this._startValue;
this.storeValue &&
- (op = extend(op || {}, {
- selectedValues:
- isKey(startValue) && this.storeValue.type === Selection.Multi
- ? this.storeValue.value.concat(startValue)
- : this.storeValue.value,
- }));
+ (op = extend(op || {}, {
+ selectedValues:
+ isKey(startValue) && this.storeValue.type === Selection.Multi
+ ? this.storeValue.value.concat(startValue)
+ : this.storeValue.value,
+ }));
opts.itemsCreator(op, ob => {
hasNext = ob.hasNext;
let firstItems = [];
@@ -124,9 +124,9 @@ export class SearchMultiSelectLoader extends Widget {
callback(firstItems.concat(this._createItems(ob.items)), ob.keyword || "");
if (op.times === 1 && this.storeValue) {
isKey(startValue) &&
- (this.storeValue.type === Selection.All
- ? remove(this.storeValue.value, startValue)
- : pushDistinct(this.storeValue.value, startValue));
+ (this.storeValue.type === Selection.All
+ ? remove(this.storeValue.value, startValue)
+ : pushDistinct(this.storeValue.value, startValue));
this.setValue(this.storeValue);
}
op.times === 1 && this._scrollToTop();