import bus from "@/config/event-bus";
import { HIDDEN_PAGINATION_HEIGHT } from "@/config/mcConf";
export default {
  data () {
    return {
      paginationHidden: false
    };
  },
  created () {
    // 高度低于临界点收起分页
    bus.$vm.$on(bus.$sel.window_resize, () => {
      this.paginationHidden =
        document.documentElement.clientHeight <= HIDDEN_PAGINATION_HEIGHT;
    });
    // vue 支持 vue-hooks
    this.$on("hook:destroyed", () => {
      bus.$vm.$off(bus.$sel.window_resize);
    });
  }
};
