diff --git a/nezha-fronted/src/components/page/config/mibBrowser.vue b/nezha-fronted/src/components/page/config/mibBrowser.vue index e87f56782..b7d7634c5 100644 --- a/nezha-fronted/src/components/page/config/mibBrowser.vue +++ b/nezha-fronted/src/components/page/config/mibBrowser.vue @@ -135,8 +135,8 @@
SNMP MIBs - - {{$t("config.model.model") + " "}} + + {{$t("config.model.model") + " "}} {{item.name}} @@ -326,6 +326,19 @@ } }, methods: { + scrollbarHeightHandler() { + setTimeout(() => { + let top = ''; + document.querySelector("body>.el-dropdown-menu").addEventListener("ps-y-reach-end", () => { + let yDom = document.querySelector("body>.el-dropdown-menu>.ps__rail-y"); + if (top) { + yDom.style.top = top; + } else { + top = yDom.style.top; + } + }); + }, 100); + }, toFileTab() { this.$emit("toFileTab"); }, @@ -571,6 +584,7 @@ this.getWalkData(); this.getModelData(); this.getAssetData(); + } } diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index b1913528a..fcdad1568 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -13,7 +13,7 @@
- + {{showPanel.name}} @@ -356,7 +356,27 @@ this.$refs.addChartModal.show(true); this.$refs.addChartModal.createData(this.showPanel.id); //初始化创建图表需要的初始数据 }, - + scrollbarHeightHandler() { + console.info(1) + setTimeout(() => { + let top = ''; + let top2 = ''; + document.querySelector("body>.el-dropdown-menu").addEventListener("ps-y-reach-end", () => { + let yDom = document.querySelector("body>.el-dropdown-menu>.ps__rail-y"); + let yDom2 = document.querySelector("body>.el-dropdown-menu>.ps__rail-y>.ps__thumb-y"); + if (top) { + yDom.style.top = top; + } else { + top = yDom.style.top; + } + if (top2) { + yDom2.style.top = top2; + } else { + top2 = yDom2.style.top; + } + }); + }, 100); + }, // 编辑图表信息,打开编辑弹窗 editData(data) { this.$refs.addChartModal.setTitle(this.$t("dashboard.panel.editChartTitle"));