|
1 |
| -# Misc |
| 1 | +# Diversos |
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 | + Permite que o componente invoque si mesmo 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` é a depuração. Componentes nomeados resultam em mensagens de aviso mais úteis. Também, ao inspecionar um *app* no [vue-devtools](https://github.com/vuejs/vue-devtools), componentes sem nome serão exibidos como `<AnonymousComponent>`, o que não é muito informativo. Provendo a opção `name`, você 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 | +- **Predefiniçã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ó está disponível na distribuição (*build*) completa, 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 do lado do servidor 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 alterados para o estilo "template string" do 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 | +- **Predefiniçã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, vínculos de atributos do escopo pai irreconhecíveis como props vão "cair" (*fallthrough*). Isso signifca que quando nós temos um componente de raiz única, esses vínculos serão aplicados ao elemento raiz do componente filho como atributos normais do HTML. Ao criar um componente que envolve um elemento alvo ou outro componente, nem sempre este será o comportamento desejado. Configurando `inheritAttrs` para `false`, esse comportamento padrão pode ser desabilitado. Os atributos estarão disponíveis via a propriedade de instância `$attrs` que pode ser explicitamente vinculada a um elemento que não esteja na raiz usando `v-bind`. |
45 | 45 |
|
46 |
| -- **Usage:** |
| 46 | +- **Uso:** |
47 | 47 |
|
48 | 48 | ```js
|
49 | 49 | app.component('base-input', {
|
|
63 | 63 | })
|
64 | 64 | ```
|
65 | 65 |
|
66 |
| -- **See also:** [Disabling Attribute Inheritance](../guide/component-attrs.html#disabling-attribute-inheritance) |
| 66 | +- **Veja também:** [Desativando a Herança de Atributos](../guide/component-attrs.html#desativando-a-heranca-de-atributos) |
0 commit comments