From 42d1e3f4380a18a0b6f2e1d5bc174889194ef514 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 21 Jan 2021 16:07:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=B7=A5=E4=BD=9C=E6=97=A5=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/dynamicdate/dynamicdate.card.js | 3 +++ src/widget/yearmonth/combo.yearmonth.js | 2 +- src/widget/yearmonth/trigger.yearmonth.js | 2 +- src/widget/yearmonthinterval/yearmonthinterval.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/widget/dynamicdate/dynamicdate.card.js b/src/widget/dynamicdate/dynamicdate.card.js index 18fad75cf..cacb66eb5 100644 --- a/src/widget/dynamicdate/dynamicdate.card.js +++ b/src/widget/dynamicdate/dynamicdate.card.js @@ -298,6 +298,9 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { case BI.DynamicDateCard.TYPE.DAY: valueMap.day = (value.offset === 0 ? -value.value : value.value); break; + case BI.DynamicDateCard.TYPE.WORK_DAY: + valueMap.workDay = (value.offset === 0 ? -value.value : value.value); + break; default: break; } diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js index cb8d48084..51d4f1c44 100644 --- a/src/widget/yearmonth/combo.yearmonth.js +++ b/src/widget/yearmonth/combo.yearmonth.js @@ -188,7 +188,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { return this.trigger.getKey(); }, - isValid: function () { + isStateValid: function () { return this.trigger.isValid(); } diff --git a/src/widget/yearmonth/trigger.yearmonth.js b/src/widget/yearmonth/trigger.yearmonth.js index e6c1f7630..5fc95abc1 100644 --- a/src/widget/yearmonth/trigger.yearmonth.js +++ b/src/widget/yearmonth/trigger.yearmonth.js @@ -259,7 +259,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, { return this.yearEditor.getValue() + "-" + this.monthEditor.getValue(); }, - isValid: function () { + isStateValid: function () { return this.yearEditor.isValid() && this.monthEditor.isValid(); } }); diff --git a/src/widget/yearmonthinterval/yearmonthinterval.js b/src/widget/yearmonthinterval/yearmonthinterval.js index 8b05ac479..108a3e1f1 100644 --- a/src/widget/yearmonthinterval/yearmonthinterval.js +++ b/src/widget/yearmonthinterval/yearmonthinterval.js @@ -100,7 +100,7 @@ BI.YearMonthInterval = BI.inherit(BI.Single, { combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () { BI.Bubbles.hide("error"); var smallDate = self.left.getKey(), bigDate = self.right.getKey(); - if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) { + if (self.left.isStateValid() && self.right.isStateValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) { self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")); self.element.addClass(self.constants.timeErrorCls); self.fireEvent(BI.YearMonthInterval.EVENT_ERROR); From 3df025f57121d5a53056b55937b47179698b3d1c Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 21 Jan 2021 18:43:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-72363=20=E8=A1=A5=E5=85=85=E5=A3=B0?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/base/single/button/node/textnode.ts | 15 +++++++++++++++ typescript/index.ts | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 typescript/base/single/button/node/textnode.ts diff --git a/typescript/base/single/button/node/textnode.ts b/typescript/base/single/button/node/textnode.ts new file mode 100644 index 000000000..fcf65378d --- /dev/null +++ b/typescript/base/single/button/node/textnode.ts @@ -0,0 +1,15 @@ +import { NodeButton } from "../button.node"; + +export declare class TextNode extends NodeButton { + setText(b: string): void; + + getText(): string; + + setValue(): void; + + getValue(): string; + + doRedMark(...args: any[]): void; + + unRedMark(...args: any[]): void; +} diff --git a/typescript/index.ts b/typescript/index.ts index 6d968018e..aaf71bff0 100644 --- a/typescript/index.ts +++ b/typescript/index.ts @@ -149,6 +149,7 @@ import { Controller } from "./core/controller/controller"; import { LayerController } from "./core/controller/controller.layer"; import { DateCalendarPopup } from "./widget/date/calendar/popup.calendar.date"; import { Tree, Node } from "./core/utils/tree"; +import { TextNode } from "./base/single/button/node/textnode"; export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { @@ -303,6 +304,7 @@ export interface BI extends _func, _i18n, _base, _inject, _var, _web, _utils { Msg: _msg; DynamicYearMonthPopup: typeof DynamicYearMonthPopup; DateCalendarPopup: typeof DateCalendarPopup; + TextNode: typeof TextNode; } export default { @@ -459,4 +461,5 @@ export { DateCalendarPopup, Tree, Node, + TextNode, };