whychdw
2019-09-05 a021b459247a5cf825c2a132f3da1e5d31e8037c
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();