diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index 4ce404603..1ad8cac86 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -60,13 +60,15 @@
-
-
-
{{item.host}}
- -
{{item.sn}}
-
-
+ +
+
+
{{item.host}}
+ +
{{item.sn}}
+
+
+
@@ -96,6 +98,7 @@ :data="endpointList" ref="endpointTable" style="width: 100%;border-radius: 4px;" + v-scrollBar:el-table height="calc(100% - 36px)" :row-class-name="setRowIndex" empty-text=" "> @@ -393,6 +396,7 @@ break; } } + this.$refs.assetScrollbar.update(); }, /*获取project列表*/ @@ -483,6 +487,7 @@ this.endpointTouch = true; this.endpointForm.projectId = this.currentProject.id; this.endpointForm.moduleId = this.currentModuleCopy.id; + this.$refs.assetScrollbar.update(); }, //将param转为json字符串格式 diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 5fccffb80..66ba498fc 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -53,6 +53,7 @@ height="calc(100% - 160px)" style="width: 100%;" :data="tableData" + v-scrollBar:el-table border tooltip-effect="light" > diff --git a/nezha-fronted/src/components/page/dashboard/chartBox.vue b/nezha-fronted/src/components/page/dashboard/chartBox.vue index bfc76a747..a695d7834 100644 --- a/nezha-fronted/src/components/page/dashboard/chartBox.vue +++ b/nezha-fronted/src/components/page/dashboard/chartBox.vue @@ -368,10 +368,12 @@ /*关闭弹框*/ esc() { - this.rightBox.show = false; - //this.editParamBox.show = false; - this.$refs.chartForm.resetFields();//清空表单 - this.chart.id='';//不清除,再次打开创建图表,会显示删除按钮 + if (this.rightBox.show) { + this.rightBox.show = false; + //this.editParamBox.show = false; + this.$refs.chartForm.resetFields();//清空表单 + this.chart.id='';//不清除,再次打开创建图表,会显示删除按钮 + } }, /*metric部分相关方法--begin*/ diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue index 9609b9262..1b0f15d87 100644 --- a/nezha-fronted/src/components/page/project/project.vue +++ b/nezha-fronted/src/components/page/project/project.vue @@ -167,7 +167,7 @@ -
+
diff --git a/nezha-fronted/src/main.js b/nezha-fronted/src/main.js index fae77e270..aecd213db 100644 --- a/nezha-fronted/src/main.js +++ b/nezha-fronted/src/main.js @@ -80,6 +80,7 @@ const el_scrollBar = el => { }; Vue.directive("scrollBar", { inserted(el, binding, vnode) { + console.info(1) const { arg } = binding; if (arg === "el-table") { el = el.querySelector(".el-table__body-wrapper"); @@ -95,8 +96,6 @@ Vue.directive("scrollBar", { el.classList.add("ps") ); }); - } else if (arg === 'metric-set') { - } const rules = ["fixed", "absolute", "relative"]; if (!rules.includes(window.getComputedStyle(el, null).position)) { @@ -110,9 +109,11 @@ Vue.directive("scrollBar", { el_scrollBar(el); }, componentUpdated(el, binding, vnode, oldVnode) { + console.info(2) const { arg } = binding; if (arg === "el-table") { el = el.querySelector(".el-table__body-wrapper"); + el.classList.add("ps"); !el && console.warn("未发现className为el-table__body-wrapper的dom"); } try {