Browse Source

Merge pull request #252596 in DEC/fineui from master to feature/x

* commit 'bcfdb988289405ac5b26cb66db908d576a173280':
  BI-125208 feat: 组件日期类型的过滤算子优化
master
superman 1 year ago
parent
commit
7efdb5314c
  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