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: { popup: {
el: { el: {
type: DynamicDateTimePopup.xtype, type: DynamicDateTimePopup.xtype,
timeSelectTypes: opts.timeSelectTypes,
width: opts.isNeedAdjustWidth ? opts.width : undefined, width: opts.isNeedAdjustWidth ? opts.width : undefined,
supportDynamic: opts.supportDynamic, supportDynamic: opts.supportDynamic,
behaviors: opts.behaviors, behaviors: opts.behaviors,

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

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

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

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

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

@ -1,6 +1,5 @@
import { import {
shortcut, shortcut,
Widget,
extend, extend,
emptyFn, emptyFn,
createWidget, createWidget,
@ -18,9 +17,10 @@ import {
import { SignEditor } from "@/case"; import { SignEditor } from "@/case";
import { TextEditor } from "../editor"; import { TextEditor } from "../editor";
import { IconButton } from "@/base"; import { IconButton } from "@/base";
import { Single } from "../../base/single";
@shortcut() @shortcut()
export class NumberEditor extends Widget { export class NumberEditor extends Single {
static xtype = "bi.number_editor"; static xtype = "bi.number_editor";
static EVENT_CONFIRM = "EVENT_CONFIRM"; 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 o = this.options;
const combo = createWidget({ const combo = createWidget({
type: DynamicDateTimeCombo.xtype, type: DynamicDateTimeCombo.xtype,
timeSelectTypes: o.timeSelectTypes,
simple: o.simple, simple: o.simple,
supportDynamic: o.supportDynamic, supportDynamic: o.supportDynamic,
minDate: o.minDate, minDate: o.minDate,

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

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

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

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

Loading…
Cancel
Save