Skip to content

Commit b0dfc7f

Browse files
committed
Translate updated API files
1 parent 4c730a7 commit b0dfc7f

7 files changed

+237
-237
lines changed

src/api/effect-scope.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Effect Scope API <Badge text="3.2+" />
1+
# API do Escopo de Efeito <Badge text="3.2+" />
22

33
:::info
4-
Effect scope is an advanced API primarily intended for library authors. For details on how to leverage this API, please consult its corresponding [RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md).
4+
Escopo de efeito é uma API avançada destinada principalmente a autores de bibliotecas. Para obter detalhes sobre como aproveitar essa API, consulte o [RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md) correspondente.
55
:::
66

77
## `effectScope`
88

9-
Creates an effect scope object which can capture the reactive effects (e.g. computed and watchers) created within it so that these effects can be disposed together.
9+
Cria um objeto de escopo de efeito que pode capturar os efeitos reativos (por exemplo, computados e observadores) criados dentro dele para que esses efeitos possam ser descartados juntos.
1010

11-
**Typing:**
11+
**Tipando:**
1212

1313
```ts
1414
function effectScope(detached?: boolean): EffectScope
1515

1616
interface EffectScope {
17-
run<T>(fn: () => T): T | undefined // undefined if scope is inactive
17+
run<T>(fn: () => T): T | undefined // indefinido se o escopo estiver inativo
1818
stop(): void
1919
}
2020
```
2121

22-
**Example:**
22+
**Exemplo:**
2323

2424
```js
2525
const scope = effectScope()
@@ -29,30 +29,30 @@ scope.run(() => {
2929

3030
watch(doubled, () => console.log(doubled.value))
3131

32-
watchEffect(() => console.log('Count: ', doubled.value))
32+
watchEffect(() => console.log('Contagem: ', doubled.value))
3333
})
3434

35-
// to dispose all effects in the scope
35+
// para descartar todos os efeitos no escopo
3636
scope.stop()
3737
```
3838

3939
## `getCurrentScope`
4040

41-
Returns the current active [effect scope](#effectscope) if there is one.
41+
Retorna o [escopo de efeito](#effectscope) atualmente ativo se houver um.
4242

43-
**Typing:**
43+
**Tipando:**
4444

4545
```ts
4646
function getCurrentScope(): EffectScope | undefined
4747
```
4848

4949
## `onScopeDispose`
5050

51-
Registers a dispose callback on the current active [effect scope](#effectscope). The callback will be invoked when the associated effect scope is stopped.
51+
Registra um _callback_ de descarte no [escopo de efeito](#effectscope) atualmente ativo. O _callback_ será invocado quando o escopo de efeito associado for interrompido.
5252

53-
This method can be used as a non-component-coupled replacement of `onUnmounted` in reusable composition functions, since each Vue component's `setup()` function is also invoked in an effect scope.
53+
Este método pode ser usado como um substituto de `onUnmounted` "não acoplado a componentes" em funções de composição reutilizáveis, uma vez que a função `setup()` de cada componente Vue também é invocada em um escopo de efeito.
5454

55-
**Typing:**
55+
**Tipando:**
5656

5757
```ts
5858
function onScopeDispose(fn: () => void): void

src/api/index.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# API
22

3-
The Vue.js API contains the following categories:
3+
A API do Vue.js contém as seguintes categorias:
44

5-
- [Application Config](/api/application-config.html)
6-
- [Application API](/api/application-api.html)
7-
- [Global API](/api/global-api.html)
8-
- [Options API](/api/options-api.html)
9-
- [Instance Properties](/api/instance-properties.html)
10-
- [Instance Methods](/api/instance-methods.html)
11-
- [Directives](/api/directives.html)
12-
- [Special Attributes](/api/special-attributes.html)
13-
- [Built-in Components](/api/built-in-components.html)
14-
- [Reactivity API](/api/reactivity-api.html)
15-
- [Composition API](/api/composition-api.html)
5+
- [Configuração da Aplicação](/api/application-config.html)
6+
- [API da Aplicação](/api/application-api.html)
7+
- [API Global](/api/global-api.html)
8+
- [API de Opções](/api/options-api.html)
9+
- [Propriedades da Instância](/api/instance-properties.html)
10+
- [Métodos de Instância](/api/instance-methods.html)
11+
- [Diretivas](/api/directives.html)
12+
- [Atributos Especiais](/api/special-attributes.html)
13+
- [Componentes Integrados](/api/built-in-components.html)
14+
- [API de Reatividade](/api/reactivity-api.html)
15+
- [API de Composição](/api/composition-api.html)

src/api/reactivity-api.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Reactivity API
1+
# API de Reatividade
22

3-
The Reactivity API contains the following sections:
3+
A API de Reatividade contém as seguintes seções:
44

5-
- [Basic Reactivity APIs](/api/basic-reactivity.html)
5+
- [API's Básicas de Reatividade](/api/basic-reactivity.html)
66
- [Refs](/api/refs-api.html)
7-
- [Computed and watch](/api/computed-watch-api.html)
8-
- [Effect Scope API](/api/effect-scope.html)
7+
- [Dados Computados e Observadores](/api/computed-watch-api.html)
8+
- [API do Escopo de Efeito](/api/effect-scope.html)

0 commit comments

Comments
 (0)