Skip to content

Commit a4ef58a

Browse files
committed
Docs: finish translation of render-function-api
1 parent 58ca336 commit a4ef58a

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

src/guide/migration/render-function-api.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ Na versão 2.x, o `domProps` continha uma lista aninhada dentro dos props VNode:
114114
}
115115
```
116116

117-
### 3.x Syntax
117+
### Sintaxe 3.x
118118

119-
In 3.x, the entire VNode props structure is flattened. Using the example from above, here is what it would look like now.
119+
Em 3.x, toda a estrutura de props do VNode é achatada. Usando o exemplo acima, ele ficaria algo assim agora.
120120

121121
```js
122-
// 3.x Syntax
122+
// Sintaxe 3.x
123123
{
124124
class: ['button', { 'is-outlined': isOutlined }],
125125
style: [{ color: '#34495E' }, { backgroundColor: buttonColor }],
@@ -130,11 +130,11 @@ In 3.x, the entire VNode props structure is flattened. Using the example from ab
130130
}
131131
```
132132

133-
## Registered Component
133+
## Componente registrado
134134

135-
### 2.x Syntax
135+
### Sintaxe 2.x
136136

137-
In 2.x, when a component has been registered, the render function would work well when passing the component's name as a string to the first argument:
137+
Em 2.x, quando um componente foi registrado, a função render funcionaria bem quando passasse o nome do componente como uma string para o primeiro argumento:
138138

139139
```js
140140
// 2.x
@@ -158,9 +158,9 @@ export default {
158158
}
159159
```
160160

161-
### 3.x Syntax
161+
### Sintaxe 3.x
162162

163-
In 3.x, with VNodes being context-free, we can no longer use a string ID to implicitly lookup registered components. Instead, we need to use an imported `resolveComponent` method:
163+
Em 3.x, com os VNodes sendo livres de contexto, não podemos usar um ID como string para implicitamente buscar por componentes registrado. Em vez disos, precisamos usar o método importado `resolveComponent`:
164164

165165
```js
166166
// 3.x
@@ -173,19 +173,20 @@ export default {
173173
}
174174
}
175175
```
176+
Para mais informações, veja [O RFC* das mudanças da API da Função Render](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0008-render-function-api-change.md#context-free-vnodes).
176177

177-
For more information, see [The Render Function Api Change RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0008-render-function-api-change.md#context-free-vnodes).
178+
* **Nota da tradução**: RFC significa Request For Comments, e é um processo que visa prover um caminho consistente e controlado para as novas funcionalidades de um framework.
178179

179-
## Migration Strategy
180+
## Estratégia de Migração
180181

181-
### Library Authors
182+
### Autores da biblioteca
182183

183-
`h` being globally imported means that any library that contains Vue components will include `import { h } from 'vue'` somewhere. As a result, this creates a bit of overhead since it requires library authors to properly configure the externalization of Vue in their build setup:
184+
A Importação global do `h` significa que qualquer biblioteca que contenha componentes Vue vão incluir `import { h } from 'vue'` em algum lugar. Como resultado, isso cria um pouco de sobrecarga, pois requer que os autores da biblioteca configurem corretamente a externalização do Vue em suas configurações de compilação:
184185

185-
- Vue should not be bundled into the library
186-
- For module builds, the import should be left alone and be handled by the end user bundler
187-
- For UMD / browser builds, it should try the global Vue.h first and fallback to require calls
186+
- o Vue não deve estar no bundle da biblioteca
187+
- Para construções de módulo, a importação deve ser deixada sozinha e tratada pelo empacotador do usuário final
188+
- Para UMD / compilações de navegador, deve-se tentar o Vue.h global primeiro e alternar para exigir chamadas
188189

189-
## Next Steps
190+
## Próximos passos
190191

191-
See [Render Function Guide](/guide/render-function) for more detailed documentation!
192+
Veja [O Guia da Função Render](/guide/render-function) para documentação mais detalhada!

0 commit comments

Comments
 (0)