<template>
  <el-dialog v-dialogDrag ref="diaFrom" title="提示" :close-on-click-modal="false" :visible.sync="visible"
    width="35%" style="padding-top: 9%;" :show-close="false">
    <div class="diaBox">
      <div class="tip-box">
         <i class="el-icon-warning" style="font-size:24px;color: #E6A23C;"></i>
         图片<span style="color: red;padding: 0 5px;">{{fileForm.picName}}</span>有重复，请选择处理方式
      </div>
      <div class="btn-box">
        <el-button type="primary" size="mini" @click="submit(1)">
          覆盖
        </el-button>
        <el-button type="primary" size="mini" @click="submit(2)">
          追加
        </el-button>
      </div>
    </div>
  </el-dialog>
</template>
<script>
  export default {
    props: {
      visible: {
        type: Boolean,
        default: () => false,
      },
      fileForm: {
        type: Object,
        default: () => {},
      },
    },
    data() {
      return {
      }
    },
    methods: {
      submit(type){
        this.$emit("submit", type);
      }
    },
  }

</script>
<style lang="scss" scoped>
.diaBox{
  .tip-box{
    padding: 0 0 20px;
    display: flex;
    align-items: center;
    i{
      padding-right: 10px;
    }
  }
  .btn-box{
    text-align: center;
    margin-bottom: 20px;
    .el-button{
      margin: 0 15px;
    }
  }
}
</style>
