import { ComponentDescription } from '@vtj/engine';
const Upload: ComponentDescription = {
  name: 'ElUpload',
  title: '上传',
  groupId: 'el',
  categoryId: 'form',
  childIncludes: false,
  package: 'element-plus',
  props: [
    {
      name: 'action',
      defaultValue: '',
      title: '请求 URL',
      setters: 'InputSetter'
    },
    {
      name: 'headers',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'method',
      defaultValue: 'post',
      setters: 'InputSetter'
    },
    {
      name: 'multiple',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'data',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'name',
      defaultValue: 'file',
      setters: 'ExpressionSetter'
    },
    {
      name: 'withCredentials',
      defaultValue: false,
      title: '支持发送 cookie 凭证信息',
      setters: 'BooleanSetter'
    },
    {
      name: 'showFileList',
      defaultValue: true,
      setters: 'BooleanSetter'
    },
    {
      name: 'drag',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'accept',
      defaultValue: false,
      setters: 'InputSetter'
    },
    {
      name: 'onPreview',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onRemove',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onSuccess',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onError',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onProgress',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onChange',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'onExceed',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'beforeUpload',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'beforeRemove',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'fileList',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'listType',
      defaultValue: 'text',
      options: ['text', 'picture', 'picture-card'],
      setters: 'SelectSetter'
    },
    {
      name: 'autoUpload',
      defaultValue: true,
      options: ['text', 'picture', 'picture-card'],
      setters: 'BooleanSetter'
    },
    {
      name: 'httpRequest',
      defaultValue: '',
      setters: 'ExpressionSetter'
    },
    {
      name: 'disabled',
      defaultValue: false,
      setters: 'BooleanSetter'
    },
    {
      name: 'limit',
      defaultValue: '',
      setters: 'NumberSetter'
    }
  ],
  slots: [
    { name: 'default' },
    { name: 'trigger' },
    { name: 'tip' },
    { name: 'file' }
  ]
};

export default Upload;
