From c5dfe7b6bed1695c002db9b8b44391c6f6bcb093 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 23 Jun 2022 15:50:05 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1973=20fix=EF=BC=9A=E9=80=89=E6=8B=A9Metric?= =?UTF-8?q?=E6=97=B6=E5=87=BA=E7=8E=B0=E9=87=8D=E5=BD=B1=E7=8E=B0=E8=B1=A1?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/components/chart/chart.scss | 3 +-- .../css/components/page/dashboard/explore/promqlInput.scss | 1 + .../src/components/page/dashboard/explore/promqlInput.vue | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/chart/chart.scss b/nezha-fronted/src/assets/css/components/chart/chart.scss index 3bd277531..3aac0c05b 100644 --- a/nezha-fronted/src/assets/css/components/chart/chart.scss +++ b/nezha-fronted/src/assets/css/components/chart/chart.scss @@ -3,9 +3,8 @@ } .my-loading-parent--relative { position: relative; - display: inline-block; height: 100%; - width: 100%; + width: auto; } .panel-chart { border: 1px solid $--chart-box-border-color; diff --git a/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss b/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss index 053ac4e9d..b9b3e7815 100644 --- a/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss +++ b/nezha-fronted/src/assets/css/components/page/dashboard/explore/promqlInput.scss @@ -58,6 +58,7 @@ } .el-cascader-menu { width: 200px; + height: 100%; } .metric-btn:hover, .metric-btn:focus { background-image: linear-gradient(180deg, rgb(247, 248, 250) 0%, rgb(247, 248, 250) 100%); diff --git a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue index 488e5ba41..063361185 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/promqlInput.vue @@ -23,7 +23,6 @@ v-model="cascaderValue" v-clickoutside="closeDropdown" v-my-loading="tempBoxShowLoading" - :loading="loading" :options="metricOptions" v-if="type !== 'log'" :props="cascaderProps" @@ -925,7 +924,7 @@ export default { let childrenCopy = JSON.parse(JSON.stringify(children)) const findChild = this.metricOptions.find(item => item.label === data.parent) if (childrenCopy.length > 100) { - childrenCopy = childrenCopy.splice(findChild.children.length, findChild.children.length + 101) + childrenCopy = childrenCopy.splice(findChild.children.length, 100) findChild.children.splice(findChild.children.length - 1, 1) findChild.children.push(...childrenCopy) if (findChild.children.length < children.length - 1) {