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

<template>
  <el-dialog
      title="上传文件"
      :visible.sync="dialog.uploadFiles"
      width="500px"
  >
    <div class='max-height: 500px; overflow-y: auto;'>
      <upload-files
        :readOnly="read"
        :keysArr="keysArr"
        :show-file-list="false"
        @change="changeItem"
        max="2"
      />
    </div>
  </el-dialog>
</template>
<script>
  import uploadFiles from "@/components/old-adm/business_space/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) {
        this.$emit("changeFile", file)
      },
    },
  };
</script>
<style>
</style>
