whychdw
2019-09-05 a021b459247a5cf825c2a132f3da1e5d31e8037c
dist/pages/battery/batteryInfo.js
@@ -28,6 +28,9 @@
        var vm = this.vm = new Vue({
            el: bs.$el[0],
            data: {
                block: {
                    tabMain: 0
                },
                params: params,
                title: '未知',
                timer: {
@@ -398,6 +401,18 @@
                    // 关闭页面的计时器
                    this.timer.rtState.stop();
                    this.timer.rtData.stop();
                },
                setBlock: function setBlock() {
                    this.block.tabMain = this.$refs.tabMain.offsetHeight;
                },
                getTabHt: function getTabHt(unit) {
                    var result = 0;
                    if (unit) {
                        result = this.block.tabMain - 5 + unit;
                    } else {
                        result = this.block.tabMain - 10;
                    }
                    return result;
                }
            },
            computed: {
@@ -434,6 +449,10 @@
                });
                this.startSearch();
                setTimeout(function () {
                    // 设置模块的高度
                    self.setBlock();
                }, 10);
            },
            beforeDestroy: function beforeDestroy() {
                this.stopTimers();