Browse Source

Merge pull request #295846 in DEC/fineui from feature/x to bugfix/11.0

* commit '6a15a837344856a56526022fb218cf3888d4344c':
  report-136587 feat: 日期区间组件增加格式options
  BI-158367 fix: 调整下SingleSelectSearchLoader里,SingleSelectRadioItem的文本间距
  BI-155367 fix: 兜底处理一下,避免执行事件回调的时候同步移除回调,导致后续遍历执行报错
  BI-148470 refactor: 增加popup
  BI-157020 fix: 深色模式下clear的按钮带有背景色
master
superman 2 weeks ago
parent
commit
03be191bf0
  1. 1
      packages/demo/src/demo/widget/yearmonthinterval/demo.year_month_interval.js
  2. 6
      packages/fineui/src/core/controller/controller.broadcast.js
  3. 4
      packages/fineui/src/less/base/single/button/button.less
  4. 2
      packages/fineui/src/widget/multilayerdownlist/combo.downlist.js
  5. 10
      packages/fineui/src/widget/singleselect/search/singleselect.search.loader.js
  6. 2
      packages/fineui/src/widget/timeinterval/dateinterval.js
  7. 2
      packages/fineui/src/widget/timeinterval/timeinterval.js

1
packages/demo/src/demo/widget/yearmonthinterval/demo.year_month_interval.js

@ -20,6 +20,7 @@ export class YearMonthIntervalDemo extends Widget {
ref(_ref) { ref(_ref) {
self.interval = _ref; self.interval = _ref;
}, },
format: "%Y/%X",
value: { value: {
start: { start: {
type: 2, type: 2,

6
packages/fineui/src/core/controller/controller.broadcast.js

@ -16,13 +16,13 @@ export class BroadcastController extends Controller {
this._broadcasts[name] = []; this._broadcasts[name] = [];
} }
this._broadcasts[name].push(fn); this._broadcasts[name].push(fn);
return () => this.remove(name, fn); return () => this.remove(name, fn);
} }
send(name) { send(name) {
const args = [].slice.call(arguments, 1); const args = [].slice.call(arguments, 1);
each(this._broadcasts[name], (i, fn) => fn(...args)); each(this._broadcasts[name]?.slice?.(), (i, fn) => fn(...args));
} }
remove(name, fn) { remove(name, fn) {
@ -34,7 +34,7 @@ export class BroadcastController extends Controller {
} else { } else {
delete this._broadcasts[name]; delete this._broadcasts[name];
} }
return this; return this;
} }
} }

4
packages/fineui/src/less/base/single/button/button.less

@ -580,6 +580,10 @@ body .bi-button, #body .bi-button {
.bi-button { .bi-button {
background-color: @color-bi-background-button-theme-dark; background-color: @color-bi-background-button-theme-dark;
&.clear {
background-color: transparent;
}
&.button-ignore { &.button-ignore {
background-color: @color-bi-background-ignore-button-theme-dark; background-color: @color-bi-background-ignore-button-theme-dark;

2
packages/fineui/src/widget/multilayerdownlist/combo.downlist.js

@ -23,6 +23,7 @@ export class MultiLayerDownListCombo extends Widget {
container: null, container: null,
stopPropagation: false, stopPropagation: false,
el: {}, el: {},
popup: {},
}); });
} }
@ -65,6 +66,7 @@ export class MultiLayerDownListCombo extends Widget {
el: this.popupview, el: this.popupview,
stopPropagation: o.stopPropagation, stopPropagation: o.stopPropagation,
maxHeight: 1000, maxHeight: 1000,
...o.popup,
}, },
}); });

10
packages/fineui/src/widget/singleselect/search/singleselect.search.loader.js

@ -12,7 +12,7 @@ import {
isArray, isArray,
isKey, isKey,
Func, Func,
SIZE_CONSANTS SIZE_CONSANTS,
} from "@/core"; } from "@/core";
import { ButtonGroup, Loader } from "@/base"; import { ButtonGroup, Loader } from "@/base";
import { SingleSelectList } from "../singleselect.list"; import { SingleSelectList } from "../singleselect.list";
@ -71,7 +71,7 @@ export class SingleSelectSearchLoader extends Widget {
layouts: [ layouts: [
{ {
type: VerticalLayout.xtype, type: VerticalLayout.xtype,
} },
], ],
}, },
}, },
@ -122,11 +122,11 @@ export class SingleSelectSearchLoader extends Widget {
height: SIZE_CONSANTS.LIST_ITEM_HEIGHT, height: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: false, selected: false,
iconWrapperWidth: 26, iconWrapperWidth: 26,
hgap: o.allowNoSelect ? 10 : 0, textHgap: o.allowNoSelect ? 10 : 0,
title: item.title || item.text, title: item.title || item.text,
}, },
item item,
) ),
); );
} }

2
packages/fineui/src/widget/timeinterval/dateinterval.js

@ -41,6 +41,7 @@ export class DateInterval extends Single {
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
height: 24, height: 24,
format: "",
supportDynamic: true, supportDynamic: true,
simple: false, simple: false,
}); });
@ -96,6 +97,7 @@ export class DateInterval extends Single {
maxDate: o.maxDate, maxDate: o.maxDate,
simple: o.simple, simple: o.simple,
behaviors: o.behaviors, behaviors: o.behaviors,
format: o.format,
watermark, watermark,
value: v, value: v,
height: o.height, height: o.height,

2
packages/fineui/src/widget/timeinterval/timeinterval.js

@ -40,6 +40,7 @@ export class TimeInterval extends Single {
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
height: 24, height: 24,
format: "",
supportDynamic: true, supportDynamic: true,
}); });
} }
@ -94,6 +95,7 @@ export class TimeInterval extends Single {
supportDynamic: o.supportDynamic, supportDynamic: o.supportDynamic,
minDate: o.minDate, minDate: o.minDate,
maxDate: o.maxDate, maxDate: o.maxDate,
format: o.format,
behaviors: o.behaviors, behaviors: o.behaviors,
watermark, watermark,
value: v, value: v,

Loading…
Cancel
Save