diff --git a/nezha-fronted/src/assets/css/components/common/searchInput.scss b/nezha-fronted/src/assets/css/components/common/searchInput.scss index f8ae74d46..16dabf438 100644 --- a/nezha-fronted/src/assets/css/components/common/searchInput.scss +++ b/nezha-fronted/src/assets/css/components/common/searchInput.scss @@ -345,3 +345,7 @@ li { list-style: none; } + +.input-center-box .el-scrollbar__wrap{ + margin-right: 0 !important; +} \ No newline at end of file diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index 68284d328..26a901903 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -419,7 +419,9 @@ export default { select_list: { // 监听下拉列表 handler (newData, oldData) { - this.$refs.searchScrollbar.update() + this.$nextTick(() => { + this.$refs.searchScrollbar.update() + }) if (newData.length == 0) { this.change_sreach_show = true this.clearSearchShow = false @@ -593,9 +595,9 @@ export default { setTimeout(function () { _this.getHeight() }) - /* this.$nextTick(() => { - this.$refs.searchScrollbar.update(); - }); */ + this.$nextTick(() => { + this.$refs.searchScrollbar.update() + }) }, // 一层下拉点击 tr_selectTypeInfo (val) { @@ -1065,6 +1067,10 @@ export default { this.input_list = true this.restructure_historyDate() + this.$nextTick(() => { + this.$refs.searchScrollbar.update() + }) + this.$emit('search', objectInfo) }, // 清空历史记录 @@ -1290,9 +1296,6 @@ export default { JSON.parse(JSON.stringify(this.searchMsg.searchLabelList)).forEach(val => { this.searchLabelList.push(val) }) - this.$nextTick(() => { - this.$refs.searchScrollbar.update() - }) this.select() }, // 修改已有参数 diff --git a/nezha-fronted/src/components/page/tool/ping.vue b/nezha-fronted/src/components/page/tool/ping.vue index 0cac8f410..83bb017ee 100644 --- a/nezha-fronted/src/components/page/tool/ping.vue +++ b/nezha-fronted/src/components/page/tool/ping.vue @@ -392,6 +392,9 @@ export default { await this.clearTask() } next() + }, + beforeDestroy () { + this.clearTask() } } diff --git a/nezha-fronted/src/components/page/tool/trace.vue b/nezha-fronted/src/components/page/tool/trace.vue index 3b91ed5aa..20b8462e1 100644 --- a/nezha-fronted/src/components/page/tool/trace.vue +++ b/nezha-fronted/src/components/page/tool/trace.vue @@ -383,6 +383,9 @@ export default { await this.clearTask() } next() + }, + beforeDestroy () { + this.clearTask() } }