From 5f3169a889c45655d644c67c408389202ad9390d Mon Sep 17 00:00:00 2001 From: zhangyu Date: Fri, 24 Jun 2022 18:29:27 +0800 Subject: [PATCH 1/4] =?UTF-8?q?NEZ-1952=20fix=EF=BC=9A=E5=9C=A8Group?= =?UTF-8?q?=E5=86=85=E6=B7=BB=E5=8A=A0=E5=9B=BE=E8=A1=A8=E5=90=8E=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=8B=96=E4=BD=8F=EF=BC=8C=E5=9B=BE=E8=A1=A8=E8=83=BD?= =?UTF-8?q?=E8=B6=85=E5=87=BA=E4=BB=A5=E5=88=9B=E5=BB=BA=E7=9A=84Group?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chart/grid/utils.js | 7 +++++-- nezha-fronted/src/components/chart/chartList.vue | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/grid/utils.js b/nezha-fronted/src/components/chart/chart/grid/utils.js index 2fa6c35df..732292e8e 100644 --- a/nezha-fronted/src/components/chart/chart/grid/utils.js +++ b/nezha-fronted/src/components/chart/chart/grid/utils.js @@ -291,8 +291,11 @@ export function moveElementAwayFromCollision (layout, collidesWith, itemToMove, // Previously this was optimized to move below the collision directly, but this can cause problems // with cascading moves, as an item may actually leapflog a collision and cause a reversal in order. - - return moveElement(layout, itemToMove, undefined, itemToMove.y + 0.15, preventCollision) + let addY = 0.15 + if (itemToMove.groupId) { + addY = 1 + } + return moveElement(layout, itemToMove, undefined, itemToMove.y + addY, preventCollision) } /** diff --git a/nezha-fronted/src/components/chart/chartList.vue b/nezha-fronted/src/components/chart/chartList.vue index 16735171d..7bb7097dd 100644 --- a/nezha-fronted/src/components/chart/chartList.vue +++ b/nezha-fronted/src/components/chart/chartList.vue @@ -479,6 +479,9 @@ export default { // } catch (e) { // console.info(e) // } + if (item.y < 0) { + item.y = 0 + } height = (item.type === 'group' && item.param.collapse) ? this.headerH : item.height // param.showHeader = true if (param.valueMapping) { From fb44c6b61a71830572f03b4e2a84f01394dececc Mon Sep 17 00:00:00 2001 From: likexuan Date: Mon, 27 Jun 2022 09:46:52 +0800 Subject: [PATCH 2/4] =?UTF-8?q?NEZ-1980=20perf=20:=20api=20keys=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/config/system/apiKeyTable.vue | 29 ++++++++++++------- .../page/config/system/selfApiKeyTable.vue | 7 +++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue index 24bb7cc6c..8ba749f07 100644 --- a/nezha-fronted/src/components/page/config/system/apiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/apiKeyTable.vue @@ -39,7 +39,7 @@ - @@ -172,7 +172,8 @@ export default { disabledDate (time) { return time.getTime() < Date.now() - 24 * 60 * 60 * 1000 } - } + }, + reg: new RegExp("(?<=.{8}).", 'g') } }, methods: { diff --git a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue index 66bce389b..c41b1c2cc 100644 --- a/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue +++ b/nezha-fronted/src/components/page/config/system/selfApiKeyTable.vue @@ -41,7 +41,7 @@ @@ -126,7 +126,8 @@ export default { minWidth: 100, show: true } - ] + ], + reg: new RegExp("(?<=.{8}).", 'g') } }, methods: {