export default {
  computed: {
    formatterNum() {
      return val => (!val ? '0' : parseInt(val).toLocaleString());
    },
    formatterToFixed() {
      return val => (!val ? '0.00' : parseFloat(val).toFixed(2));
    },
    formatterRate() {
      return val => (!val ? '0.00%' : parseFloat(val).toFixed(2) + '%');
    },
    formatterNumAndFixed() {
      return val => parseFloat(val || 0).toLocaleString('zh', { minimumFractionDigits: 2 });
    },
    timeLimit() {
      // return this.$route.query.createTime > 1635350400000;
      return this.$route.query.createTime > 1635091200000;
    }
  }
};
