<script>
import { Button } from 'element-ui';
export default {
    name: 'WsButton',
    extends: Button,
    props: {
        size: {
            default: 'small'
        },
    },
    mounted(){
      if(this.type == 'export'){
        if(localStorage.getItem("ws-pf_vesselBankFlag") === 'V'){
          document.getElementsByClassName('el-button--export')[0].style.display = 'none';
        }
      }
    },
    created(){
        this.$on('click', ()=>{
            // 处理返回类型按钮
            if(this.type == 'back'){
                this.$router && this.$router.go(-1);
            }
        });
    }
}
</script>

<style lang="scss" scoped>
  .el-button--medium.is-round {
    padding: 0px 20px;
    height: 32px;
    line-height: 30px;
    font-size: 12px;
    border-radius: 4px;
  }
  .el-button--small{
    border-radius: 4px;
    font-size:14px;
  }
</style>
