From 9875ce2507b5ef6ee844f78040c7166239d7578a Mon Sep 17 00:00:00 2001 From: candy <459808386@qq.com> Date: Wed, 26 Jun 2024 19:48:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bugfix:=20url=20=E4=BC=A0=E9=80=92=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=8E=A7=E5=88=B6=E5=99=A8=E6=97=A0=E6=B3=95=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E5=80=BC=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/pages/DashBoardPage/utils/widget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/pages/DashBoardPage/utils/widget.ts b/frontend/src/app/pages/DashBoardPage/utils/widget.ts index 4a46330ba..5539487f4 100644 --- a/frontend/src/app/pages/DashBoardPage/utils/widget.ts +++ b/frontend/src/app/pages/DashBoardPage/utils/widget.ts @@ -591,7 +591,7 @@ export const getWidgetMap = ( ) { content.config.controllerDate.startTime.exactValue = _value?.[0]; - content.config.controllerDate.endTime.exactValue = _value?.[0]; + content.config.controllerDate.endTime.exactValue = _value?.[1] ?? _value?.[0]; } break; @@ -600,7 +600,7 @@ export const getWidgetMap = ( ...(content.config.controllerDate as any), startTime: { relativeOrExact: TimeFilterValueCategory.Exact, - exactValue: formatTime(_value as any, TIME_FORMATTER), + exactValue: formatTime(_value?.[0] as any, TIME_FORMATTER), }, }; break; From e910efdab3710a3946ed880c244d8b9ca0d4ffbf Mon Sep 17 00:00:00 2001 From: Candy Date: Sat, 23 Nov 2024 18:32:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E4=B8=8D=E7=A8=B3=E5=AE=9A=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=BC=95=E5=8F=91=E7=9A=84=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/models/ChartSelectionManager.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/models/ChartSelectionManager.ts b/frontend/src/app/models/ChartSelectionManager.ts index 504d9673f..2bd34d692 100644 --- a/frontend/src/app/models/ChartSelectionManager.ts +++ b/frontend/src/app/models/ChartSelectionManager.ts @@ -27,6 +27,9 @@ export class ChartSelectionManager { private _selectedItems: Array = []; private _multipleSelect: boolean = false; private _clickCallbacks: Function[] = []; + private windowKeyEventHandlerRef: (this: Window, ev: KeyboardEvent) => any = this.windowKeyEventHandler.bind(this) + private zRenderMouseEventHandlerRef: (this: Window, ev: KeyboardEvent) => any = this.zRenderMouseEventHandler.bind(this) + constructor(events?: ChartMouseEvent[]) { this._clickCallbacks = @@ -46,24 +49,24 @@ export class ChartSelectionManager { } public attachWindowListeners(window: Window) { - window?.addEventListener('keydown', this.windowKeyEventHandler.bind(this)); - window?.addEventListener('keyup', this.windowKeyEventHandler.bind(this)); + window?.addEventListener('keydown', this.windowKeyEventHandlerRef); + window?.addEventListener('keyup', this.windowKeyEventHandlerRef); } public removeWindowListeners(window: Window) { window?.removeEventListener( 'keydown', - this.windowKeyEventHandler.bind(this), + this.windowKeyEventHandlerRef, ); - window?.removeEventListener('keyup', this.windowKeyEventHandler.bind(this)); + window?.removeEventListener('keyup', this.windowKeyEventHandlerRef); } public attachZRenderListeners(chart: EChartsType) { - chart?.getZr().on('click', this.zRenderMouseEventHandler.bind(this)); + chart?.getZr().on('click', this.zRenderMouseEventHandlerRef); } public removeZRenderListeners(chart: EChartsType) { - chart?.getZr().off('click', this.zRenderMouseEventHandler.bind(this)); + chart?.getZr().off('click', this.zRenderMouseEventHandlerRef); } public attachEChartsListeners(chart: EChartsType) {