<template>
  <el-button type="warning" size="small" @click="btnClick()" v-if="type == 'save'">
    <img src="@/assets/set.png" alt="">
    保存
  </el-button>
  <el-button type="primary" size="small" @click="btnClick()" v-else-if="type == 'upload'">
    <img src="@/assets/upload2.png" alt="">
    上传
  </el-button>
  <el-button type="primary" size="small" @click="btnClick(1)" v-else-if="type == 'upload_image'">
    <img src="@/assets/upload2.png" alt="">
    上传图片
  </el-button>
  <el-button type="primary" size="small" @click="btnClick(2)" v-else-if="type == 'upload_video'">
    <img src="@/assets/upload2.png" alt="">
    上传视频
  </el-button>
  <el-button type="primary" size="small" @click="btnClick(3)" v-else-if="type == 'upload_fwb'">
    <img src="@/assets/upload2.png" alt="">
    上传图文
  </el-button>
</template>

<script>
export default {
  name: 'save',
  data() {
    return {
    };
  },
  props: {
    type: {
      default() {
        return 'save'
      }
    }
  },
  computed:{
  },
  watch:{
  },
  methods: {
    btnClick(type) {
      this.$emit('btnClick',type)
    }
  },
};
</script>

<style scoped>
*{
  box-sizing: border-box;
}
  /deep/span {
    display: flex;
    align-items: center;
  }
  img {
    padding-right: 5px;
  }
  
</style>
