Skip to content

Traduzindo readme para português #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions README-pt.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]
```

> 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
<!--Template-->
<vue-cropper
ref="cropper"
:src="imgSrc"
alt="Source Image"
:cropmove="cropImage"
>
</vue-cropper>
```

```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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)**
Expand Down