Browse Source

Pull request #3566: Es6

Merge in VISUAL/fineui from ~DAILER/fineui:es6 to es6

* commit '63a74370a9318da047c6bb0216f9aa67dcf59922': (67 commits)
  update  base-cls
  BI-127107 fix: 【来源PT项目】bi6.0.7,ie11浏览器过滤组件无法使用
  auto upgrade version to 2.0.20230519095630
  BI-126486 fix: 分组表滚动条拖不动【样板客户】
  auto upgrade version to 2.0.20230518101454
  JSY-29426 fix:绑定空值时与刷新后展示不同
  auto upgrade version to 2.0.20230515174710
  BI-126352 fix: 仪表板预览空白
  auto upgrade version to 2.0.20230510152618
  BI-126227 feat: 图标更新
  BI-126227 feat: 图标更新
  auto upgrade version to 2.0.20230508171534
  auto upgrade version to 2.0.20230508162556
  REPORT-80311 fix: 给一下默认值
  auto upgrade version to 2.0.20230508154454
  BI-126057: 图标更新
  REPORT-80311 fix: 给一下默认值
  auto upgrade version to 2.0.20230508111614
  BI-124556 fix: 图标更新
  auto upgrade version to 2.0.20230504111630
  ...
es6
Dailer-刘荣歆 2 years ago
parent
commit
4befbfb5f2
  1. 9
      packages/fineui/src/core/utils/dom.js
  2. 5
      packages/fineui/src/widget/multiselect/multiselect.loader.js
  3. 9
      packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js
  4. 2
      packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js

9
packages/fineui/src/core/utils/dom.js

@ -1,9 +1,10 @@
/** /**
* 对DOM操作的通用函数 * 对DOM操作的通用函数
*/ */
import { Widget } from "../4.widget" import { Widget } from "../4.widget";
import { each, isEmpty, isNull, isNotNull } from "../2.base"; import { each, isEmpty, isNull, isNotNull } from "../2.base";
import $ from "jquery"; import $ from "jquery";
import { isIE } from "./../platform";
export function ready(fn) { export function ready(fn) {
Widget._renderEngine.createElement(document).ready(fn); Widget._renderEngine.createElement(document).ready(fn);
@ -65,10 +66,10 @@ export function preloadImages(srcArray, onload) {
each(srcArray, (i, src) => { each(srcArray, (i, src) => {
images[i] = new Image(); images[i] = new Image();
images[i].src = src; images[i].src = src;
images[i].onload = function () { images[i].onload = function() {
complete(); complete();
}; };
images[i].onerror = function () { images[i].onerror = function() {
complete(); complete();
}; };
}); });
@ -751,7 +752,7 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
* 获取position:fixed相对定位的元素 * 获取position:fixed相对定位的元素
*/ */
export function getPositionRelativeContainingBlock(element) { 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 // $FlowFixMe[incompatible-return]: assume body is always available
return element.ownerDocument.body; return element.ownerDocument.body;
} }

5
packages/fineui/src/widget/multiselect/multiselect.loader.js

@ -124,6 +124,7 @@ export class MultiSelectLoader extends Widget {
value: this.storeValue, value: this.storeValue,
}); });
createWidget( createWidget(
extend( 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); 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); self.fireEvent(MultiSelectLoader.EVENT_CHANGE, arguments);
}); });
} }

9
packages/fineui/src/widget/multiselect/multiselect.loader.nobar.js

@ -30,7 +30,7 @@ export class MultiSelectNoBarLoader extends Widget {
_defaultConfig() { _defaultConfig() {
return extend(super._defaultConfig(...arguments), { return extend(super._defaultConfig(...arguments), {
baseCls: "bi-multi-select-loader", baseCls: "bi-multi-select-loader-no-bar",
logic: { logic: {
dynamic: true, dynamic: true,
}, },
@ -144,10 +144,10 @@ export class MultiSelectNoBarLoader extends Widget {
items: LogicFactory.createLogicItemsByDirection(Direction.Top, this.button_group), 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); 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); self.fireEvent(MultiSelectNoBarLoader.EVENT_CHANGE, arguments);
}); });
} }
@ -215,5 +215,6 @@ export class MultiSelectNoBarLoader extends Widget {
this.button_group.element.css({ "max-height": toPix(h) }); this.button_group.element.css({ "max-height": toPix(h) });
} }
resetWidth() {} resetWidth() {
}
} }

2
packages/fineui/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js

@ -28,7 +28,7 @@ export class SearchMultiSelectLoader extends Widget {
_defaultConfig() { _defaultConfig() {
return extend(super._defaultConfig(...arguments), { return extend(super._defaultConfig(...arguments), {
baseCls: "bi-multi-select-loader", baseCls: "bi-search-multi-select-loader",
logic: { logic: {
dynamic: true, dynamic: true,
}, },

Loading…
Cancel
Save