You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Função Loader não recebe inerentemente os argumentos`resolve`e`reject`e deve retornar uma Promise
15
15
16
-
For a more in-depth explanation, read on!
16
+
Para uma explicação mais aprofundada, continue lendo!
17
17
18
-
## Introduction
18
+
## Introdução
19
19
20
-
Previously, async components were created by simply defining a component as a function that returned a promise, such as:
20
+
Anteriormente, componentes assíncronos eram criados simplesmente definindo um componente como uma função que retornava uma Promise, tal como:
21
21
22
22
```js
23
23
constasyncPage= () =>import('./NextPage.vue')
24
24
```
25
25
26
-
Or, for the more advanced component syntax with options:
26
+
Ou, para os componentes com sintaxe mais avançada com opções:
27
27
28
28
```js
29
29
constasyncPage= {
@@ -35,19 +35,19 @@ const asyncPage = {
35
35
}
36
36
```
37
37
38
-
## 3.x Syntax
38
+
## Sintaxe v3.x
39
39
40
-
Now, in Vue 3, since functional components are defined as pure functions, async components definitions need to be explicitly defined by wrapping it in a new`defineAsyncComponent` helper:
40
+
Agora, no Vue 3, uma vez que os componentes funcionais são definidos como funções puras, as definições de componentes assíncronos precisam ser definidas explicitamente, envolvendo-o em um novo helper`defineAsyncComponent`:
Another change that has been made from 2.x is that the `component`option is now renamed to `loader`in order to accurately communicate that a component definition cannot be provided directly.
60
+
Outra mudança em relação a v2.x é a de que a opção `component`foi renomeada para `loader`a fim de comunicar com precisão que uma definição de componente não pode ser fornecida diretamente.
0 commit comments