import snippets from './snippe';

export default {
  snippets,
  componentName: 'CropPhoto',
  title: '图片裁切',
  category: '通用',
  docUrl: "",
  screenshot: "",
  devMode: "proCode",
  npm: {
    package: "@pisell/materials",
    version: "1.0.1",
    exportName: "CropPhoto",
    main: "src/index.tsx",
    destructuring: true,
    subName: "",
  },
  props: [
    {
      name: 'cropShape',
      title: '裁剪框形状',
      propType: {
        type: 'oneOf',
        value: ['rect', 'round'],
      },
      defaultValue: 'rect',
      setter: [
        {
          componentName: 'RadioGroupSetter',
          props: {
            options: [
              {
                title: '正方形',
                value: 'rect',
              },
              {
                title: '圆形',
                value: 'round',
              },
            ],
          },
        },
        'VariableSetter',
      ],

    }
  ],
  configure: {
    component: { isContainer: true },
    supports: {
      style: true,
      events: [
        {
          name: 'onChange',
          template:
            "onChange({file,fileList,event},${extParams}){\n// 上传文件改变时的回调\nconsole.log('onChange',file,fileList,event);}",
        },
        {
          name: 'onPreview',
          template:
            "onPreview(file,${extParams}){\n// 点击文件链接或预览图标时的回调\nconsole.log('onPreview',file);}",
        },
        {
          name: 'onRemove',
          template:
            "onRemove(file,${extParams}){\n// 点击移除文件时的回调\nconsole.log('onRemove',file);}",
        },
        {
          name: 'onDownload',
          template:
            "onDownload(file,${extParams}){\n// 点击下载文件时的回调\nconsole.log('onDownload',file);}",
        },
      ],
    },
  },
};
