<template>
  <button :disabled="disabled"
          :class="['n-button','n-button-'+type,disabled?'btn-disabled':'',round?'n-button-radius':'']"
          @click="btnClick">
    <slot></slot>
  </button>
</template>

<script>
export default {
  name: 'bButton',
  props: {
    /**
     * 按钮类型
     * @param primary
     * @param success
     * @param warning
     * @param error
     */
    type: {
      type: String,
      default: () => ''
    },
    /**
     * 按钮的启用状态
     * @param disabled
     */
    disabled: {
      type: Boolean,
      default: () => false
    },
    /**
     * 按钮是否圆角
     * @param round
     */
    round: {
      type: Boolean,
      default: () => false
    }
  },
  methods: {
    btnClick () {
      this.$emit('click')
    }
  }
}
</script>
