<!--
    上传文件的弹窗
-->

<template>
  <el-dialog title="上传文件" :visible.sync="dialog.uploadFiles" width="30%">
    <upload-files :readOnly="read" :keysArr="keysArr" @change="changeItem" max="2"></upload-files>
  </el-dialog>
</template>
<script>
import uploadFiles from "@/components/lib/uploadFiles";
export default {
  components: {
    uploadFiles
  },
  props: {
    dialog: {
      type: Object,
      default: function () {
        return {
          uploadFiles: false
        };
      }
    },
    keysArr: {
      type: Array,
      default: function () {
        return []
      }
    },
    read: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {};
  },
  created() { },
  mounted() { },
  methods: {
    changeItem(file) {
      console.log(file)
      this.$emit("changeFile", file)
    }
  },
};
</script>
<style>
</style>