export default {
  name: 'my-file',
  render(h) {
    const data = this.obj
    const Attrs = {
      required: data.required,
    }
    return (
      <el-form-item label={this.obj.fieldNm} required={this.obj.required == 1}
                    style="width:100%;margin-bottom:10px!important">
        <el-upload
          class="upload-demo"
          multiple
          attrs={Attrs}
        >
          <i class="el-icon-folder-opened" style='font-size: 18px;position: absolute;right: 20px;top: 10px;'></i>
        </el-upload>
      </el-form-item>
    );
  },
  data() {
    return {
      date: ''
    }
  },
  methods: {
    handleExceed(files, fileList) {
      this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`)
    }
  },
  props: {
    obj: {
      type: Object,
      default: {}
    }
  }
}
