Browse Source

Pull request #3675: BI-125208 feat: 组件日期类型的过滤算子优化

Merge in VISUAL/fineui from ~JIMMY.CHAI/fineui:master to master

* commit 'd453ab34e46babd4f596b7c8dc02491c0fdc8aeb':
  BI-125208 feat: 组件日期类型的过滤算子优化
research/test
parent
commit
bcfdb98828
  1. 1
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js
  2. 1
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.popup.js
  3. 9
      packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  4. 4
      packages/fineui/src/widget/numbereditor/number.editor.js
  5. 1
      packages/fineui/src/widget/timeinterval/timeinterval.js
  6. 2
      packages/fineui/src/widget/yearinterval/yearinterval.js
  7. 2
      packages/fineui/src/widget/yearquarterinterval/yearquarterinterval.js

1
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -207,6 +207,7 @@ export class DynamicDateTimeCombo extends Single {
popup: {
el: {
type: DynamicDateTimePopup.xtype,
timeSelectTypes: opts.timeSelectTypes,
width: opts.isNeedAdjustWidth ? opts.width : undefined,
supportDynamic: opts.supportDynamic,
behaviors: opts.behaviors,

1
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.popup.js

@ -204,6 +204,7 @@ export class DynamicDateTimePopup extends Widget {
{
el: {
type: DynamicDateTimeSelect.xtype,
timeSelectTypes: o.timeSelectTypes,
cls: "bi-split-top",
ref: _ref => {
this.timeSelect = _ref;

9
packages/fineui/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -29,11 +29,12 @@ export class DynamicDateTimeSelect extends Widget {
return {
baseCls: "bi-date-time-select",
editorHeight: SIZE_CONSANTS.LIST_ITEM_HEIGHT,
timeSelectTypes: [DynamicDateTimeSelect.HOUR, DynamicDateTimeSelect.MINUTE, DynamicDateTimeSelect.SECOND],
};
}
render() {
const { editorHeight } = this.options;
const { editorHeight, timeSelectTypes } = this.options;
return {
type: CenterAdaptLayout.xtype,
@ -44,6 +45,8 @@ export class DynamicDateTimeSelect extends Widget {
{
el: {
type: NumberEditor.xtype,
disabled: !timeSelectTypes.includes(DynamicDateTimeSelect.HOUR),
warningTitle: i18nText("BI-Basic_Do_Not_Support_Modification"),
ref: _ref => {
this.hour = _ref;
},
@ -89,6 +92,8 @@ export class DynamicDateTimeSelect extends Widget {
},
{
type: NumberEditor.xtype,
disabled: !timeSelectTypes.includes(DynamicDateTimeSelect.MINUTE),
warningTitle: i18nText("BI-Basic_Do_Not_Support_Modification"),
ref: _ref => {
this.minute = _ref;
},
@ -133,6 +138,8 @@ export class DynamicDateTimeSelect extends Widget {
},
{
type: NumberEditor.xtype,
disabled: !timeSelectTypes.includes(DynamicDateTimeSelect.SECOND),
warningTitle: i18nText("BI-Basic_Do_Not_Support_Modification"),
ref: _ref => {
this.second = _ref;
},

4
packages/fineui/src/widget/numbereditor/number.editor.js

@ -1,6 +1,5 @@
import {
shortcut,
Widget,
extend,
emptyFn,
createWidget,
@ -18,9 +17,10 @@ import {
import { SignEditor } from "@/case";
import { TextEditor } from "../editor";
import { IconButton } from "@/base";
import { Single } from "../../base/single";
@shortcut()
export class NumberEditor extends Widget {
export class NumberEditor extends Single {
static xtype = "bi.number_editor";
static EVENT_CONFIRM = "EVENT_CONFIRM";

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

@ -76,6 +76,7 @@ export class TimeInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicDateTimeCombo.xtype,
timeSelectTypes: o.timeSelectTypes,
simple: o.simple,
supportDynamic: o.supportDynamic,
minDate: o.minDate,

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

@ -28,6 +28,7 @@ export class YearInterval extends Single {
minDate: "1900-01-01",
maxDate: "2099-12-31",
supportDynamic: true,
simple: false,
};
static EVENT_VALID = "EVENT_VALID";
@ -71,6 +72,7 @@ export class YearInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicYearCombo.xtype,
simple: o.simple,
supportDynamic: o.supportDynamic,
minDate: o.minDate,
maxDate: o.maxDate,

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

@ -28,6 +28,7 @@ export class YearQuarterInterval extends Single {
minDate: "1900-01-01",
maxDate: "2099-12-31",
supportDynamic: true,
simple: false,
};
static EVENT_VALID = "EVENT_VALID";
@ -71,6 +72,7 @@ export class YearQuarterInterval extends Single {
const o = this.options;
const combo = createWidget({
type: DynamicYearQuarterCombo.xtype,
simple: o.simple,
supportDynamic: o.supportDynamic,
minDate: o.minDate,
maxDate: o.maxDate,

Loading…
Cancel
Save