From 1cc43473cdf4bb6852be07f36be96348f0034dda Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 8 Sep 2020 19:02:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 还有缺陷,待修复 --- .../src/components/common/js/tools.js | 1 + .../src/components/common/searchInput.vue | 26 ++++++++++++------- .../src/components/page/alert/config.vue | 2 +- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/common/js/tools.js b/nezha-fronted/src/components/common/js/tools.js index 2f5bf3bef..bce07a743 100644 --- a/nezha-fronted/src/components/common/js/tools.js +++ b/nezha-fronted/src/components/common/js/tools.js @@ -292,6 +292,7 @@ export const bottomBoxWindow = { }, showSubListWatch(vm, n) { vm.bottomBox.inTransform = n; + console.info(vm.bottomBox.inTransform) if (!n) { vm.mainTableHeight = vm.$tableHeight.normal; //重置table的高度 vm.tools.toTopBtnTop = vm.$tableHeight.toTopBtnTop; diff --git a/nezha-fronted/src/components/common/searchInput.vue b/nezha-fronted/src/components/common/searchInput.vue index a58f1e384..0a2ef079e 100644 --- a/nezha-fronted/src/components/common/searchInput.vue +++ b/nezha-fronted/src/components/common/searchInput.vue @@ -170,7 +170,7 @@ name: "index", data() { return { - selectDom: {top: '', tempTop: ''}, // 选择弹框的位置 + selectDom: {top: '', tempTop: '', show: true}, // 选择弹框的位置 clearSearchShow: false, select_conditionsName:'', selectInfoList: searchSelectInfo, @@ -265,12 +265,12 @@ listsV.forEach((item, index) => { item.style.display = "none"; }); - if (n) { + /*if (n) { this.selectDom.tempTop = this.selectDom.top; this.selectDom.top = '36px'; } else { this.selectDom.top = this.selectDom.tempTop; - } + }*/ setTimeout(() => { listsK.forEach((item, index) => { item.style.display = ""; @@ -1179,12 +1179,14 @@ getSelectPosition(e) { let inputListDom = this.getDomFromParents(e.target, 'input-center-box', 0); if (inputListDom) { - if (this.inTransform) { - this.selectDom.top = "36px"; - } else { - let position = inputListDom.getBoundingClientRect(); - this.selectDom.top = position.top+36+'px'; - } + this.$nextTick(() => { + if (this.inTransform) { + //this.selectDom.top = "36px"; + } else { + let position = inputListDom.getBoundingClientRect(); + this.selectDom.top = position.top+36+'px'; + } + }); } }, /*递归向上获取指定class的dom*/ @@ -1221,6 +1223,10 @@ }) }, + close_search(e) { + this.selectDom.show = false; + + } }, mounted() { /*this.defaultItem ? this.select_list.push({name:this.defaultItem,label:this.defaultItem}) : ''; @@ -1525,7 +1531,7 @@ box-shadow: 0 2px 4px rgba(0,0,0,0.1); overflow-y: auto; z-index: 9999; - right: 139px; + /*right: 139px;*/ } .select_info_list ul li{ padding: 5px 10px; diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue index 0659ef029..d13b32580 100644 --- a/nezha-fronted/src/components/page/alert/config.vue +++ b/nezha-fronted/src/components/page/alert/config.vue @@ -10,7 +10,7 @@