export const mixin = {
    methods: {
        //得到根标签的值
        getFontSize(myheight) {
            let num = getComputedStyle(window.document.documentElement)[
                "font-size"
            ]; //得到html中fontSize的值
            let size = num.substring(0, num.length - 2); //去除px
            return (myheight / 80) * size;
        },
        /* 设置初始视窗高度*/
        onLoadHeight() {
            this.$nextTick(() => {
                let currentSize = this.getFontSize(468)
                this.tableheight = document.body.clientHeight - currentSize
            })
        },
        /* 设置窗口变化高度*/
        changeWindow() {
            window.onresize = () => {
                return (() => {
                    let currentSize = this.getFontSize(468)
                    this.tableheight = document.body.clientHeight - currentSize
                })()
            }
        },
    },
}