
// 充值服务费
export const $serviceType = {
  computed: {
    // 服务费单位
    serviceUnit() {
      return (type) => {
        return type === '2' ? '元' : '%';
      }
    }
  }
}

// 提现服务费
export const $withdrawServiceType = {
  computed: {
    // 提现服务费单位
    withdrawServiceUnit() {
      return (type) => {
        return type === '2' ? '元' : '%';
      }
    }
  }
}


/**
 * 显隐列
 **/
export const $showColumns = {
  data() {
    return {
      columns: []
    }
  },
  computed: {
    showColumns() {
      if (this.columns == null) {
        return [];
      }
      return this.columns.filter(item => item.visible);
    },
    isShow() {
      return (key) => {
        if (this.columns == null) {
          return false;
        }
        let column = this.columns.find(item => item.key === key);
        return column != null && column.visible;
      }
    }
  },
}
