<template>
  <div class='adminbank-tableheadr-box'>
    <h2>  
      <i class='anticon icon-barschart'></i>
      {{title || '#'}}
      <span :class='Data_class' v-if='refresh' @click='click_refresh'></span>
    </h2>
    <p v-if='des'>{{des}}</p>
    <div class='func'>
      <div class='btn'>
        <ButtonHUI :title='button.title' type='primary' :url='button.url'/>
      </div>
    </div>
  </div>
</template>

<script>
  import './style.less';
  
  export default {
    name: 'TableHeader',
    data () {
      return {
        Data_class: {
          'anticon': true,
          'icon-reload1': true,
          'refresh': true,
          'active': false,
        }
      }
    },
    props: ['title', 'des', 'refresh', 'url', 'button', 'callback'],
    computed: {
    },
    created () {
    },
    methods: {
      click_refresh () {
        this.Data_class.active = true;
        this.callback && this.callback(() => {
          this.Data_class.active = false;            
        });
      }
    }
  }
</script>