1.3.1 • Published 4 years ago

@findsoft/vue-cropper v1.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

vue-cropper

一个基于vue3&cropper&ant-design-vue2的图片上传组件

Install

npm install @findsoft/vue-cropper

Quick Start

<!-- vue -->
<template>
  <div class="about">
    <h1>This is an demo</h1>
    <a-upload>
      <template #prefix>
        可以插入前缀icon
      </template>
    </a-upload>
  </div>
</template>
import '@findsoft/vue-cropper/dist/vueCropper.css';
import Upload from '@findsoft/vue-cropper';

export default {
  components: {
    aUpload: Upload,
  },
};

Slot

namedescriptionversion
prefix上传按钮前缀插槽,可放置icon>1.2.0

Props

参数说明类型默认值
disabled是否需要禁用Booleanfalse
title裁剪框titleString图片裁剪
oldImgSrc之前的图片String''
aspectRatio裁剪比例 NaN表示自由尺寸Number16 / 9
sizeText推荐尺寸String210*118
fileSize限制大小,单位MNumber2
exportType输出格式 jpg、pngStringpng
importType输入格式Array'jpg', 'jpeg', 'png'

CallBack

upload = (file: File) => {
  // 裁切后的file对象
}
1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.2.2

4 years ago

1.1.3

4 years ago

1.2.1

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago