<template>
  <u-upload
    class="image-upload"
    :file-list="previewFileList"
    :multiple="multiple"
    :maxCount="limit"
    @after-read="afterRead"
    @delete="onDelete"
    :width="width"
    :height="height"
    :accept="accept"
    :disabled="disabled"
    :deletable="deletable"
  />
</template>

<script>

import {$upload} from "@/utils/mixins";

export default {
  name: "ImageUpload",
  mixins: [$upload],
  props: {
    limit: {
      type: Number,
      default: 10
    },
    multiple: {
      type: Boolean,
      default: false,
    },
    enabledSlot: {
      type: Boolean,
      default: false,
    },
    width: {
      type: String,
      default: null,
    },
    height: {
      type: String,
      default: null,
    },
    accept: {
      type: String,
      default: 'image',
    },
    disabled: {
      type: Boolean,
      default: null,
    },
    deletable: {
      type: Boolean,
      default: true,
    }
  },
}

</script>
