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