import type { PropType } from 'vue';
import { uploadBaseProps } from 'element-plus/es/components/upload/src/upload';
import type { Ifiles } from './type/index';

export const basicProps = {
  ...uploadBaseProps,
  limit: {
    type: Number as PropType<number>,
    default: Infinity,
  },
  listType: {
    type: String,
    default: 'picture-card',
  },
  //=================================== 自定义参数 ===========================
  maxSize: {
    type: Number as PropType<number>,
    default: 2,
  },
  circle: {
    type: Boolean,
    default: false,
  },
  uploadTitle: {
    type: String as PropType<string>,
    default: '上传图片',
  },
  helpText: {
    type: String as PropType<string>,
    default: '',
  },
  list: {
    type: Array as PropType<Ifiles[]>,
    default: () => [],
  },
  width: {
    type: Number as PropType<number>,
    default: 104,
  },
};
