<!--
    上传图片的弹窗
-->

<template>
  <el-dialog title="上传图片" :visible.sync="dialog.uploadImgs" width="500px">
      <div class="max-height: 500px; overflow-y: auto;">
          <upload-imgs :readOnly="read" :keysArr="deepcopy(keysArr)" @change="changeItem" max="2"></upload-imgs>
      </div>
    
  </el-dialog>
</template>
<script>
import uploadImgs from "@/components/business_space/lib/uploadImgsName";
export default {
  components: {
    uploadImgs
  },
  props: {
    dialog: {
      type: Object,
      default: function () {
        return {
          uploadImgs: true
        };
      }
    },
    keysArr: {
      type: Array,
      default: function () {
        return []
      }
    },
    read: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {};
  },
  created() { },
  mounted() { },
  methods: {
    deepcopy(obj) {
      return JSON.parse(JSON.stringify(obj));
    },
    changeItem(file) {
      this.$emit("changeFile", file)
    }
  },
};
</script>
<style>
</style>