|
2 | 2 |
|
3 | 3 | ## name
|
4 | 4 |
|
5 |
| -- **Type:** `string` |
| 5 | +- **Tipo:** `string` |
6 | 6 |
|
7 |
| -- **Details:** |
| 7 | +- **Detalhes:** |
8 | 8 |
|
9 |
| - Allow the component to recursively invoke itself in its template. Note that when a component is registered globally with `Vue.createApp({}).component({})`, the global ID is automatically set as its name. |
| 9 | + Permitir que o componente seja invocado recursivamente no *template*. Observe que quando um componente é registrado globalmente com `Vue.createApp({}).component({})`, o ID global é automaticamente definido como seu nome. |
10 | 10 |
|
11 |
| - Another benefit of specifying a `name` option is debugging. Named components result in more helpful warning messages. Also, when inspecting an app in the [vue-devtools](https://github.com/vuejs/vue-devtools), unnamed components will show up as `<AnonymousComponent>`, which isn't very informative. By providing the `name` option, you will get a much more informative component tree. |
| 11 | + Outro benefício de especificar a opção `name` é o *debugging*. Componentes nomeados resultam em mensagens de aviso mais úteis. Também, quando inspecionado um *app* no [vue-devtools](https://github.com/vuejs/vue-devtools), componentes sem nome vão ser exibidos como `<AnonymousComponent>`, o que não é muito informativo. Provendo a opção `name`, você vai ter uma árvore de componentes muito mais informativa. |
12 | 12 |
|
13 | 13 | ## delimiters
|
14 | 14 |
|
15 |
| -- **Type:** `Array<string>` |
| 15 | +- **Tipo:** `Array<string>` |
16 | 16 |
|
17 |
| -- **Default:** `{{ "['\u007b\u007b', '\u007d\u007d']" }}` |
| 17 | +- **Padrão:** `{{ "['\u007b\u007b', '\u007d\u007d']" }}` |
18 | 18 |
|
19 |
| -- **Restrictions:** This option is only available in the full build, with in-browser template compilation. |
| 19 | +- **Restrições:** Essa opção só é disponível na *full build*, com compilação de *template* no navegador. |
20 | 20 |
|
21 |
| -- **Details:** |
| 21 | +- **Detalhes:** |
22 | 22 |
|
23 |
| - Sets the delimiters used for text interpolation within the template. |
| 23 | + Define os delimitadores usados para interpolação de texto dentro do *template*. |
24 | 24 |
|
25 |
| - Typically this is used to avoid conflicting with server-side frameworks that also use mustache syntax. |
| 25 | + Tipicamente isso é usado para evitar conflito com frameworks *server-side* que também usam sintaxe *mustache*. |
26 | 26 |
|
27 |
| -- **Example:** |
| 27 | +- **Exemplo:** |
28 | 28 |
|
29 | 29 | ```js
|
30 | 30 | Vue.createApp({
|
31 |
| - // Delimiters changed to ES6 template string style |
| 31 | + // Delimitadores mudaram para o estilo template string ES6 |
32 | 32 | delimiters: ['${', '}']
|
33 | 33 | })
|
34 | 34 | ```
|
35 | 35 |
|
36 | 36 | ## inheritAttrs
|
37 | 37 |
|
38 |
| -- **Type:** `boolean` |
| 38 | +- **Tipo:** `boolean` |
39 | 39 |
|
40 |
| -- **Default:** `true` |
| 40 | +- **Padrão:** `true` |
41 | 41 |
|
42 |
| -- **Details:** |
| 42 | +- **Detalhes:** |
43 | 43 |
|
44 |
| - By default, parent scope attribute bindings that are not recognized as props will "fallthrough". This means that when we have a single-root component, these bindings will be applied to the root element of the child component as normal HTML attributes. When authoring a component that wraps a target element or another component, this may not always be the desired behavior. By setting `inheritAttrs` to `false`, this default behavior can be disabled. The attributes are available via the `$attrs` instance property and can be explicitly bound to a non-root element using `v-bind`. |
| 44 | + Por padrão, ligações de atributo de escopo pai que não são reconhecidas como props vão "cair". Isso signifca que quando nós temos um componente *single-root*, essas ligações vão ser aplicadas para o elemento raiz do componente filho como atributos normais de HTML. Ao criar um componente que envolve um elemento alvo ou outro componente, isso pode não ser sempre o comportamento desejado. Configurando `inheritAttrs` para `false`, esse comportamento padrão pode ser desabilitado. Os atributos estão disponíveis via instância de propriedade `$attrs` e pode ser explicitamente vinculada a um elemento não não raiz usando `v-bind`. |
45 | 45 |
|
46 |
| -- **Usage:** |
| 46 | + |
| 47 | +- **Uso:** |
47 | 48 |
|
48 | 49 | ```js
|
49 | 50 | app.component('base-input', {
|
|
63 | 64 | })
|
64 | 65 | ```
|
65 | 66 |
|
66 |
| -- **See also:** [Disabling Attribute Inheritance](../guide/component-attrs.html#disabling-attribute-inheritance) |
| 67 | +- **Veja também:** [Desativando a Herança de Atributos](../guide/component-attrs.html#disabling-attribute-inheritance) |
0 commit comments