<template>
  <div class="operate">

    <template v-if="operateList.length < 4">
      <a-button
        v-for="item in operateList"
        :key="item.type"
        type="primary"
        size="small"
        style="margin-right: 10px"
        :class="`btn-${item.type}`"
        :disabled="item.disabled"
        @click="munuClick(item.type)"
        >{{ item.label }}
      </a-button>
    </template>
   

  </div>
</template>

<script>
export default {
  name: 'OperateCom',
  components: {  },
  props: {
    operateList: {
      type: Array,
      default: () => {
        return []
      }
    },
    record: {
      type: Object,
      default:()=>{}
    },
    flag: {
      type: String,
      default:''
    }
  },

  data() {
    return {}
  },
  watch: {
    operateList: {
      handler(n, o) {},
      deep: true,
      immediate: true
    }
  },
  mounted() {},
  methods: {
    munuClick(type) {
      this.$emit('operateForm', type, { ...this.record })
    }
  }
}
</script>

<style lang="scss" scoped>



</style>
