Skip to content

Commit f106793

Browse files
committed
Translate updated Migration files & Deployment
1 parent 0f9fcc7 commit f106793

12 files changed

+213
-213
lines changed

Diff for: src/guide/migration/attrs-includes-class-style.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
---
2-
title: $attrs includes class & style
2+
title: $attrs inclui classe e estilo
33
badges:
44
- breaking
55
---
66

7-
# `$attrs` includes `class` & `style` <MigrationBadges :badges="$frontmatter.badges" />
7+
# `$attrs` inclui `class` & `style` <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## Visão Geral
1010

11-
`$attrs` now contains _all_ attributes passed to a component, including `class` and `style`.
11+
`$attrs` agora contém _todos_ atributos passados ​​para um componente, incluindo `class` e `style`.
1212

13-
## 2.x Behavior
13+
## Comportamento v2.x
1414

15-
`class` and `style` attributes get some special handling in the Vue 2 virtual DOM implementation. For that reason, they are _not_ included in `$attrs`, while all other attributes are.
15+
Os atributos `class` e `style` recebem algum tratamento especial na implementação do DOM virtual do Vue 2. Por essa razão, eles _não_ são incluídos em `$attrs`, enquanto todos os outros atributos são.
1616

17-
A side effect of this manifests when using `inheritAttrs: false`:
17+
Um efeito colateral disso se manifesta ao usar `inheritAttrs: false`:
1818

19-
- Attributes in `$attrs` are no longer automatically added to the root element, leaving it to the developer to decide where to add them.
20-
- But `class` and `style`, not being part of `$attrs`, will still be applied to the component's root element:
19+
- Atributos em `$attrs` não são mais adicionados automaticamente ao elemento raiz, deixando para o desenvolvedor decidir onde adicioná-los.
20+
- Mas `class` e `style`, não sendo parte de `$attrs`, ainda serão aplicados ao elemento raiz do componente:
2121

2222
```vue
2323
<template>
@@ -32,23 +32,23 @@ export default {
3232
</script>
3333
```
3434

35-
when used like this:
35+
quando usado assim:
3636

3737
```html
3838
<my-component id="my-id" class="my-class"></my-component>
3939
```
4040

41-
...will generate this HTML:
41+
...irá gerar este HTML:
4242

4343
```html
4444
<label class="my-class">
4545
<input type="text" id="my-id" />
4646
</label>
4747
```
4848

49-
## 3.x Behavior
49+
## Comportamento v3.x
5050

51-
`$attrs` contains _all_ attributes, which makes it easier to apply all of them to a different element. The example from above now generates the following HTML:
51+
`$attrs` contém _todos_ atributos, o que facilita a aplicação de todos eles a um elemento diferente. O exemplo acima agora gera o seguinte HTML:
5252

5353
```html
5454
<label>
@@ -58,14 +58,14 @@ when used like this:
5858

5959
## Estratégia de Migração
6060

61-
In components that use `inheritAttrs: false`, make sure that styling still works as intended. If you previously relied on the special behavior of `class` and `style`, some visuals might be broken as these attributes might now be applied to another element.
61+
Em componentes que usam `inheritAttrs: false`, certifique-se de que o estilo ainda funcione como pretendido. Se você confiava anteriormente no comportamento especial de `class` e `style`, alguns visuais podem ser quebrados, pois esses atributos agora podem ser aplicados a outro elemento.
6262

6363
[Sinalizador na compilação de migração: `INSTANCE_ATTRS_CLASS_STYLE`](migration-build.html#configuracao-de-compatibilidade)
6464

65-
## See also
65+
## Veja também
6666

67-
- [Relevant RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
68-
- [Migration guide - `$listeners` removed](./listeners-removed.md)
69-
- [Migration guide - New Emits Option](./emits-option.md)
70-
- [Migration guide - `.native` modifier removed](./v-on-native-modifier-removed.md)
71-
- [Migration guide - Changes in the Render Functions API](./render-function-api.md)
67+
- [RFC Relevante](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
68+
- [Guia de migração - `$listeners` removido](./listeners-removed.md)
69+
- [Guia de migração - Nova opção _Emits_](./emits-option.md)
70+
- [Guia de migração - modificador `.native` removido](./v-on-native-modifier-removed.md)
71+
- [Guia de migração - Mudanças na API de Funções de Renderização](./render-function-api.md)

Diff for: src/guide/migration/children.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ badges:
55

66
# $children <MigrationBadges :badges="$frontmatter.badges" />
77

8-
## Overview
8+
## Visão Geral
99

10-
The `$children` instance property has been removed from Vue 3.0 and is no longer supported.
10+
A propriedade de instância `$children` foi removida do Vue 3.0 e não é mais suportada.
1111

12-
## 2.x Syntax
12+
## Sintaxe v2.x
1313

14-
In 2.x, developers could access direct child components of the current instance with `this.$children`:
14+
Na v2.x, os desenvolvedores podiam acessar componentes filhos diretos da instância atual com `this.$children`:
1515

1616
```vue
1717
<template>
1818
<div>
1919
<img alt="Vue logo" src="./assets/logo.png">
20-
<my-button>Change logo</my-button>
20+
<my-button>Alterar logotipo</my-button>
2121
</div>
2222
</template>
2323
@@ -35,9 +35,9 @@ export default {
3535
</script>
3636
```
3737

38-
## 3.x Update
38+
## Atualização v3.x
3939

40-
In 3.x, the `$children` property is removed and no longer supported. Instead, if you need to access a child component instance, we recommend using [$refs](/guide/component-template-refs.html#template-refs).
40+
Na v3.x, a propriedade `$children` foi removida e não é mais suportada. Em vez disso, se você precisar acessar uma instância de componente filho, recomendamos usar [$refs](/guide/component-template-refs.html#refs-de-template).
4141

4242
## Estratégia de Migração
4343

Diff for: src/guide/migration/emits-option.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: emits Option
2+
title: Opção emits
33
badges:
44
- new
55
---
66

7-
# `emits` Option <MigrationBadges :badges="$frontmatter.badges" />
7+
# Opção `emits` <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## Visão Geral
1010

11-
Vue 3 now offers an `emits` option, similar to the existing `props` option. This option can be used to define the events that a component can emit to its parent.
11+
O Vue 3 agora oferece uma opção `emits`, semelhante à opção `props` existente. Esta opção pode ser usada para definir os eventos que um componente pode emitir para seu pai.
1212

13-
## 2.x Behavior
13+
## Comportamento v2.x
1414

15-
In Vue 2, you can define the props that a component receives, but you can't declare which events it can emit:
15+
No Vue 2, você pode definir as props que um componente recebe, mas não pode declarar quais eventos ele pode emitir:
1616

1717
```vue
1818
<template>
@@ -28,9 +28,9 @@ In Vue 2, you can define the props that a component receives, but you can't decl
2828
</script>
2929
```
3030

31-
## 3.x Behavior
31+
## Comportamento v3.x
3232

33-
Similar to props, the events that the component emits can now be defined with the `emits` option:
33+
Semelhante a props, os eventos que o componente emite agora podem ser definidos com a opção `emits`:
3434

3535
```vue
3636
<template>
@@ -47,51 +47,51 @@ Similar to props, the events that the component emits can now be defined with th
4747
</script>
4848
```
4949

50-
The option also accepts an object, which allows the developer to define validators for the arguments that are passed with the emitted event, similar to validators in `props` definitions.
50+
A opção também aceita um objeto, que permite ao desenvolvedor definir validadores para os argumentos que são passados ​​com o evento emitido, semelhante aos validadores nas definições de `props`.
5151

52-
For more information on this, please read the [API documentation for this feature](../../api/options-data.md#emits).
52+
Para obter mais informações sobre isso, leia a [documentação da API para este recurso](../../api/options-data.md#emits).
5353

5454
## Estratégia de Migração
5555

56-
It is highly recommended that you document all the events emitted by each of your components using `emits`.
56+
É altamente recomendado que você documente todos os eventos emitidos por cada um de seus componentes usando `emits`.
5757

58-
This is especially important because of [the removal of the `.native` modifier](./v-on-native-modifier-removed.md). Any listeners for events that aren't declared with `emits` will now be included in the component's `$attrs`, which by default will be bound to the component's root node.
58+
Isso é especialmente importante por causa da [remoção do modificador `.native`](./v-on-native-modifier-removed.md). Quaisquer escutadores para eventos que não são declarados com `emits` agora serão incluídos no `$attrs` do componente, que por padrão será vinculado ao nó raiz do componente.
5959

60-
### Example
60+
### Exemplo
6161

62-
For components that re-emit native events to their parent, this would now lead to two events being fired:
62+
Para componentes que reemitem eventos nativos para seus pais, isso agora levaria ao disparo de dois eventos:
6363

6464
```vue
6565
<template>
6666
<button v-on:click="$emit('click', $event)">OK</button>
6767
</template>
6868
<script>
6969
export default {
70-
emits: [] // without declared event
70+
emits: [] // sem evento declarado
7171
}
7272
</script>
7373
```
7474

75-
When a parent listens for the `click` event on the component:
75+
Quando um pai escuta o evento `click` no componente:
7676

7777
```html
7878
<my-button v-on:click="handleClick"></my-button>
7979
```
8080

81-
it would now be triggered _twice_:
81+
agora seria acionado _duas vezes_:
8282

83-
- Once from `$emit()`.
84-
- Once from a native event listener applied to the root element.
83+
- Uma vez de `$emit()`.
84+
- Uma vez de um escutador de evento nativo aplicado ao elemento raiz.
8585

86-
Here you have two options:
86+
Aqui você tem duas opções:
8787

88-
1. Properly declare the `click` event. This is useful if you actually do add some logic to that event handler in `<my-button>`.
89-
2. Remove the re-emitting of the event, since the parent can now listen for the native event easily, without adding `.native`. Suitable when you really only re-emit the event anyway.
88+
1. Declare corretamente o evento `click`. Isso é útil se você realmente adicionar alguma lógica a esse manipulador de eventos em `<my-button>`.
89+
2. Remova a reemissão do evento, pois o pai agora pode escutar o evento nativo facilmente, sem adicionar `.native`. Adequado quando você realmente apenas reemite o evento de qualquer maneira.
9090

91-
## See also
91+
## Veja também
9292

93-
- [Relevant RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0030-emits-option.md)
94-
- [Migration guide - `.native` modifier removed](./v-on-native-modifier-removed.md)
95-
- [Migration guide - `$listeners` removed](./listeners-removed.md)
96-
- [Migration guide - `$attrs` includes `class` & `style`](./attrs-includes-class-style.md)
97-
- [Migration guide - Changes in the Render Functions API](./render-function-api.md)
93+
- [RFC relevante](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0030-emits-option.md)
94+
- [Guia de migração - modificador `.native` removido](./v-on-native-modifier-removed.md)
95+
- [Guia de migração - `$listeners` removido](./listeners-removed.md)
96+
- [Guia de migração - `$attrs` inclui `class` e `style`](./attrs-includes-class-style.md)
97+
- [Guia de migração - Mudanças na API de Funções de Renderização](./render-function-api.md)

Diff for: src/guide/migration/listeners-removed.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
2-
title: $listeners removed
2+
title: $listeners removido
33
badges:
44
- breaking
55
---
66

7-
# `$listeners` removed <MigrationBadges :badges="$frontmatter.badges" />
7+
# `$listeners` removido <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## Visão Geral
1010

11-
The `$listeners` object has been removed in Vue 3. Event listeners are now part of `$attrs`:
11+
O objeto `$listeners` foi removido no Vue 3. Os escutadores de eventos agora fazem parte do `$attrs`:
1212

1313
```js
1414
{
15-
text: 'this is an attribute',
16-
onClose: () => console.log('close Event triggered')
15+
text: 'este é um atributo',
16+
onClose: () => console.log('Evento close acionado')
1717
}
1818
```
1919

20-
## 2.x Syntax
20+
## Sintaxe v2.x
2121

22-
In Vue 2, you can access attributes passed to your components with `this.$attrs`, and event listeners with `this.$listeners`.
23-
In combination with `inheritAttrs: false`, they allow the developer to apply these attributes and listeners to some other element instead of the root element:
22+
No Vue 2, você pode acessar atributos passados ​​para seus componentes com `this.$attrs`, e escutadores de eventos com `this.$listeners`.
23+
Em combinação com `inheritAttrs: false`, eles permitem que o desenvolvedor aplique esses atributos e escutadores a algum outro elemento em vez do elemento raiz:
2424

2525
```html
2626
<template>
@@ -35,9 +35,9 @@ In combination with `inheritAttrs: false`, they allow the developer to apply the
3535
</script>
3636
```
3737

38-
## 3.x Syntax
38+
## Sintaxe v3.x
3939

40-
In Vue 3's virtual DOM, event listeners are now just attributes, prefixed with `on`, and as such are part of the `$attrs` object, so `$listeners` has been removed.
40+
No DOM virtual do Vue 3, os escutadores de eventos agora são apenas atributos, prefixados com `on`, e como tal são parte do objeto `$attrs`, então `$listeners` foi removido.
4141

4242
```vue
4343
<template>
@@ -52,25 +52,25 @@ export default {
5252
</script>
5353
```
5454

55-
If this component received an `id` attribute and a `v-on:close` listener, the `$attrs` object will now look like this:
55+
Se este componente recebeu um atributo `id` e um escutador `v-on:close`, o objeto `$attrs` agora ficará assim:
5656

5757
```js
5858
{
5959
id: 'my-input',
60-
onClose: () => console.log('close Event triggered')
60+
onClose: () => console.log('Evento close acionado')
6161
}
6262
```
6363

6464
## Estratégia de Migração
6565

66-
Remove all usages of `$listeners`.
66+
Remova todos os usos de `$listeners`.
6767

6868
[Sinalizador na compilação de migração: `INSTANCE_LISTENERS`](migration-build.html#configuracao-de-compatibilidade)
6969

70-
## See also
70+
## Veja também
7171

72-
- [Relevant RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
73-
- [Migration guide - `$attrs`includes `class` & `style` ](./attrs-includes-class-style.md)
74-
- [Migration guide - Changes in the Render Functions API](./render-function-api.md)
75-
- [Migration guide - New Emits Option](./emits-option.md)
76-
- [Migration guide - `.native` modifier removed](./v-on-native-modifier-removed.md)
72+
- [RFC relevante](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
73+
- [Guia de migração - `$attrs` inclui `class` & `style`](./attrs-includes-class-style.md)
74+
- [Guia de migração - Alterações na API de Funções de Renderização](./render-function-api.md)
75+
- [Guia de migração - Nova Opção Emits](./emits-option.md)
76+
- [Guia de migração - Modificador `.native` removido](./v-on-native-modifier-removed.md)

0 commit comments

Comments
 (0)