Skip to content

Commit 0fcc0f3

Browse files
authored
Merge pull request #202 from kellydosocorro/docs/translates-slots-unification
Translates src/guide/migration/slots-unification
2 parents 3ed547a + a6d3d65 commit 0fcc0f3

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

src/guide/migration/slots-unification.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,63 @@ badges:
33
- breaking
44
---
55

6-
# Slots Unification <MigrationBadges :badges="$frontmatter.badges" />
6+
# Unificação de Slots <MigrationBadges :badges="$frontmatter.badges" />
77

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

10-
This change unifies normal and scoped slots in 3.x.
10+
Esta modificação unifica _slots_ normais e _slots_ com escopo na v3.x.
1111

12-
Here is a quick summary of what has changed:
12+
Aqui um pequeno sumário sobre o que mudou:
1313

14-
- `this.$slots` now exposes slots as functions
15-
- **BREAKING**: `this.$scopedSlots` is removed
14+
- `this.$slots` agora exibe os _slots_ como funções
15+
- **QUEBRA**: `this.$scopedSlots` foi removido
1616

17-
For more information, read on!
17+
Para mais informações, continue lendo!
1818

19-
## 2.x Syntax
19+
## Sintaxe v2.x
2020

21-
When using the render function, i.e., `h`, 2.x used to define the `slot` data property on the content nodes.
21+
Ao utilizar uma função de renderização, como `h`, a v2.x definia a propriedade `slot` nos nós do conteúdo.
2222

2323
```js
24-
// 2.x Syntax
24+
// Sintaxe v2.x
2525
h(LayoutComponent, [
2626
h('div', { slot: 'header' }, this.header),
2727
h('div', { slot: 'content' }, this.content)
2828
])
2929
```
3030

31-
In addition, when referencing scoped slots, they could be referenced using the following syntax:
31+
Além disso, ao referenciar _slots_ com escopo definido, eles poderiam ser referenciados usando a seguinte sintaxe:
3232

3333
```js
34-
// 2.x Syntax
34+
// Sintaxe v2.x
3535
this.$scopedSlots.header
3636
```
3737

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

40-
In 3.x, slots are defined as children of the current node as an object:
40+
Na v3.x, os _slots_ são definidos como um objeto, filhos do nó atual:
4141

4242
```js
43-
// 3.x Syntax
43+
// Sintaxe v3.x
4444
h(LayoutComponent, {}, {
4545
header: () => h('div', this.header),
4646
content: () => h('div', this.content)
4747
})
4848
```
4949

50-
And when you need to reference scoped slots programmatically, they are now unified into the `$slots` option.
50+
E quando você precisar referenciar _slots_ com escopo programaticamente, estes agora estão unificados na opção `$slots`.
5151

5252
```js
53-
// 2.x Syntax
53+
// Sintaxe v2.x
5454
this.$scopedSlots.header
5555

56-
// 3.x Syntax
56+
// Sintaxe v3.x
5757
this.$slots.header()
5858
```
5959

60-
## Migration Strategy
60+
## Estratégia de Migração
6161

62-
A majority of the change has already been shipped in 2.6. As a result, the migration can happen in one step:
62+
A maioria das alterações já estão presentes na versão 2.6. Desta forma, a migração pode acontecer em uma etapa:
6363

64-
1. Replace all `this.$scopedSlots` occurrences with `this.$slots` in 3.x.
65-
2. Replace all occurrences of `this.$slots.mySlot` with `this.$slots.mySlot()`
64+
1. Susbstitua todas as ocorrências de `this.$scopedSlots` por `this.$slots` na v3.x.
65+
2. Susbstitua todas as ocorrências de `this.$slots.mySlot` por `this.$slots.mySlot()`.

0 commit comments

Comments
 (0)