<template>
  <el-button
    :size="size"
    :type="type"
    :plain="plain"
    :round="round"
    :circle="circle"
    :loading="loading"
    :disabled="disabled"
    @click="onClick"
  >
    {{ text }}
  </el-button>
</template>

<script>
export default {
  name: "button",
  props: {
    /**
     * 按钮文字
     */
    text: {
      type: String,
      default: "按钮",
    },
    /**
     *  按钮大小
     * @type Enum
     * @options ["default","large","small"]
     */
    size: {
      type: String,
      default: "default",
    },
    /**
     * 类型
     * @type Enum
     * @options ["","primary","success","info","warning","danger"]
     */
    type: {
      type: String,
      default:"primary"
    },
    /**
     * 是否朴素按钮
     */
    plain: {
      type: Boolean,
      default:false
    },
    /**
     * 是否圆角按钮
     */
    round: {
      type: Boolean,
      default:true
    },
    /**
     * 是否圆形按钮
     */
    circle: {
      type: Boolean,
      default:false
    },
    /**
     * 是否加载中状态
     */
    loading: {
      type: Boolean,
      default:false
    },
    /**
     * 是否禁用
     */
    disabled: {
      type: Boolean,
      default: false
    },
  },
   methods: {
    onClick: function (e) {
      this.$emit("onClick", e);
    },
  },
};
</script>

<style>
</style>