File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- title : Props Default Function this Access
2
+ title : Acesso ao this na função padrão props
3
3
badges :
4
4
- breaking
5
5
---
6
6
7
- # Props Default Function ` this ` Access <MigrationBadges :badges =" $frontmatter.badges " />
7
+ # Acesso ao ` this ` na função padrão Props <MigrationBadges :badges =" $frontmatter.badges " />
8
8
9
- Props default value factory functions no longer have access to ` this ` .
9
+ A função padrão props não terá mais acesso a variavel ` this ` .
10
10
11
- Instead :
11
+ Ao invez disso :
12
12
13
- - Raw props received by the component are passed to the default function as argument ;
13
+ - Propriedades brutas são recebidads pelo componente e passadas para as funções como argumento ;
14
14
15
- - The [ inject ] ( ../composition-api-provide-inject.md ) API can be used inside default functions .
15
+ - A API de [ injeção ] ( ../composition-api-provide-inject.md ) pode ser utilizada dentro da função padrão .
16
16
17
17
``` js
18
18
import { inject } from ' vue'
@@ -21,9 +21,9 @@ export default {
21
21
props: {
22
22
theme: {
23
23
default (props ) {
24
- // `props` is the raw values passed to the component,
25
- // before any type / default coercions
26
- // can also use `inject` to access injected properties
24
+ // `props` é o novo valor bruto passado para o componente.
25
+ // antes de algum tipo / coerção padrao
26
+ // tambem pode ser utilizado `inject` para acessar as propriedades
27
27
return inject (' theme' , ' default-theme' )
28
28
}
29
29
}
You can’t perform that action at this time.
0 commit comments