From 6453ba62ca31b43826f686c946032554ba389eed Mon Sep 17 00:00:00 2001 From: Israel Sampaio Date: Thu, 10 Oct 2019 14:34:27 -0400 Subject: [PATCH] =?UTF-8?q?Traduzindo=20readme=20para=20portugu=C3=AAs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-pt.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 ++ 2 files changed, 84 insertions(+) create mode 100644 README-pt.md diff --git a/README-pt.md b/README-pt.md new file mode 100644 index 0000000..9a7688a --- /dev/null +++ b/README-pt.md @@ -0,0 +1,81 @@ +# vue-cropperjs + +Um componente em Vue para [cropperjs](https://github.com/fengyuanchen/cropperjs). + +[![NPM](https://nodei.co/npm/vue-cropperjs.png?downloads=true)](https://nodei.co/npm/vue-cropperjs/) + + +## Demonstração + +Visualize já **[agontuk.github.io/vue-cropperjs](https://agontuk.github.io/vue-cropperjs/)** + +## Instalação + +```shell +npm install --save vue-cropperjs +``` + +Vue v1.x : + +```shell +npm install --save vue-cropperjs@1.0.3 +``` + +> Você também precisará do css & style loader para webpack + +## Como usar: + +```jsx +// Global +import Vue from 'vue'; +import VueCropper from 'vue-cropperjs'; +import 'cropperjs/dist/cropper.css'; +Vue.component(VueCropper); + +// Local +import VueCropper from 'vue-cropperjs'; +import 'cropperjs/dist/cropper.css'; +export default { + components: { VueCropper} +} +``` +```html + + + +``` + +```js +// VM do Vue +this.$refs.cropper.rotate(45); +``` + +Veja o [exemplo](https://github.com/Agontuk/vue-cropperjs/tree/master/example) de arquivos e documentação do [cropperjs](https://github.com/fengyuanchen/cropperjs#cropperjs) + +## Opções + +| Nome | Tipo | Obrigatório | Descrição | +| -------------- | -------- | -------- | ------------------------------- | +| src | `string` | -- | Fonte da imagem | +| containerStyle | `object` | -- | Estilo para o contêiner de imagem | +| imgStyle | `object` | -- | Estilo para a imagem | +| alt | `string` | -- | Texto alternativo para a imagem | + +## Opções relacionadas ao Cropperjs + + +Consulte a [documentação](https://github.com/fengyuanchen/cropperjs#options) do cropperjs para todas as opções e métodos possíveis. + +### Métodos renomeados + +- `relativeZoom` para `zoom` +- `initCrop` para `crop` + +## Licença + +MIT diff --git a/README.md b/README.md index 2da20ce..d0c073b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # vue-cropperjs +### [Leia esta página em português](https://github.com/Agontuk/vue-cropperjs/blob/master/README-pt.md) + A Vue wrapper component for [cropperjs](https://github.com/fengyuanchen/cropperjs). [![NPM](https://nodei.co/npm/vue-cropperjs.png?downloads=true)](https://nodei.co/npm/vue-cropperjs/) + ## Demo Checkout here **[agontuk.github.io/vue-cropperjs](https://agontuk.github.io/vue-cropperjs/)**