From a021b459247a5cf825c2a132f3da1e5d31e8037c Mon Sep 17 00:00:00 2001 From: whychdw <49690745@qq.com> Date: 星期四, 05 九月 2019 11:53:12 +0800 Subject: [PATCH] 修改内容 --- src/pages/battery/batteryInfo.js | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/pages/battery/batteryInfo.js b/src/pages/battery/batteryInfo.js index 861a2df..f2b3ae4 100644 --- a/src/pages/battery/batteryInfo.js +++ b/src/pages/battery/batteryInfo.js @@ -26,6 +26,9 @@ var vm = this.vm = new Vue({ el: bs.$el[0], data: { + block: { + tabMain: 0, + }, params: params, title: '鏈煡', timer: { @@ -422,6 +425,18 @@ // 鍏抽棴椤甸潰鐨勮鏃跺櫒 this.timer.rtState.stop(); this.timer.rtData.stop(); + }, + setBlock: function() { + this.block.tabMain = this.$refs.tabMain.offsetHeight; + }, + getTabHt: function(unit) { + var result = 0; + if(unit) { + result = this.block.tabMain - 5+unit; + }else { + result = this.block.tabMain - 10; + } + return result; } }, computed: { @@ -458,6 +473,10 @@ }); this.startSearch(); + setTimeout(function() { + // 璁剧疆妯″潡鐨勯珮搴� + self.setBlock(); + }, 10); }, beforeDestroy() { this.stopTimers(); -- Gitblit v1.9.1