Skip to content

Commit 407353d

Browse files
authored
Merge pull request #213 from prika/api/built-in-components-translation
Translation of api/built-in-components.md to portuguese
2 parents 317eea9 + acab5fe commit 407353d

File tree

1 file changed

+75
-75
lines changed

1 file changed

+75
-75
lines changed

src/api/built-in-components.md

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
# Built-In Components
1+
# Componentes Integrados
22

33
## component
44

5-
- **Props:**
5+
- **Propriedades:**
66

77
- `is` - `string | Component`
88

9-
- **Usage:**
9+
- **Uso:**
1010

11-
A "meta component" for rendering dynamic components. The actual component to render is determined by the `is` prop. An `is` prop as a string could be either an HTML tag name or a Component name.
11+
Um "meta componente" para renderizar componentes dinâmicos. O componente real a ser renderizado é determinado pela propriedade `is`. Uma propriedade `is` como string pode ser um nome de tag HTML ou um nome de componente.
1212

13-
- **Example:**
13+
- **Exemplo:**
1414

1515
```html
16-
<!-- a dynamic component controlled by -->
17-
<!-- the `componentId` property on the vm -->
16+
<!-- um componente dinâmico controlado -->
17+
<!-- pela propriedade `componentId` na vm -->
1818
<component :is="componentId"></component>
1919

20-
<!-- can also render registered component or component passed as prop -->
20+
<!-- pode também renderizar um componente registrado ou componente passado como propriedade -->
2121
<component :is="$options.components.child"></component>
2222

23-
<!-- can reference components by string -->
23+
<!-- pode referenciar componentes por string -->
2424
<component :is="condition ? 'FooComponent' : 'BarComponent'"></component>
2525

26-
<!-- can be used to render native HTML elements -->
26+
<!-- pode ser usado para renderizar elementos HTML nativos -->
2727
<component :is="href ? 'a' : 'span'"></component>
2828
```
2929

30-
- **See also:** [Dynamic Components](../guide/component-dynamic-async.html)
30+
- **Ver também:** [Componentes Dinâmicos](../guide/component-dynamic-async.html)
3131

3232
## transition
3333

34-
- **Props:**
34+
- **Propriedades:**
3535

36-
- `name` - `string` Used to automatically generate transition CSS class names. e.g. `name: 'fade'` will auto expand to `.fade-enter`, `.fade-enter-active`, etc.
37-
- `appear` - `boolean`, Whether to apply transition on initial render. Defaults to `false`.
38-
- `persisted` - `boolean`. If true, indicates this is a transition that doesn't actually insert/remove the element, but toggles the show / hidden status instead. The transition hooks are injected, but will be skipped by the renderer. Instead, a custom directive can control the transition by calling the injected hooks (e.g. `v-show`).
39-
- `css` - `boolean`. Whether to apply CSS transition classes. Defaults to `true`. If set to `false`, will only trigger JavaScript hooks registered via component events.
40-
- `type` - `string`. Specifies the type of transition events to wait for to determine transition end timing. Available values are `"transition"` and `"animation"`. By default, it will automatically detect the type that has a longer duration.
41-
- `mode` - `string` Controls the timing sequence of leaving/entering transitions. Available modes are `"out-in"` and `"in-out"`; defaults to simultaneous.
42-
- `duration` - `number | {`enter`: number,`leave`: number }`. Specifies the duration of transition. By default, Vue waits for the first `transitionend` or `animationend` event on the root transition element.
36+
- `name` - `string` Usado para gerar automaticamente nomes de classes CSS de transições. Por exemplo, `name: 'fade'` expandirá automaticamente para `.fade-enter`, `.fade-enter-active`, etc.
37+
- `appear` - `boolean`, Se a transição deve ser aplicada na renderização inicial deverá ser configurado para `true`. Por padrão, `false`.
38+
- `persisted` - `boolean`. Se estiver `true`, indica que esta transição não insere/remove realmente o elemento, mas alterna o status entre mostrar/esconder. Os gatilhos de transição são injetados, mas serão ignorados pelo renderizador. Em vez disso, uma diretiva personalizada pode controlar a transição chamando os gatilhos injetados (por exemplo `v-show`).
39+
- `css` - `boolean`. Aplicar ou não classes de transição CSS. Por padrão é `true`. Se configurado para `false`, apenas acionará gatilhos registrados no JavaScript por meio de eventos de componentes.
40+
- `type` - `string`. Especifica o tipo de eventos de transição a serem aguardados para determinar o tempo de término da transição. Os valores disponíveis são `"transition"` and `"animation"`. Por padrão, será detectado automaticamente o tipo que tenha uma duração mais longa.
41+
- `mode` - `string`. Controla a sequência de temporização das transições de saída/entrada. Modos disponíveis são `"out-in"` e `"in-out"`; o padrão é simultâneo.
42+
- `duration` - `number | {`enter`: number,`leave`: number }`. Especifica a duração da transição. Por padrão, o Vue aguarda o primeiro evento de `transitionend` ou `animationend` no elemento de transição raiz.
4343
- `enter-from-class` - `string`
4444
- `leave-from-class` - `string`
4545
- `appear-class` - `string`
@@ -50,7 +50,7 @@
5050
- `leave-active-class` - `string`
5151
- `appear-active-class` - `string`
5252

53-
- **Events:**
53+
- **Eventos:**
5454

5555
- `before-enter`
5656
- `before-leave`
@@ -61,28 +61,28 @@
6161
- `after-leave`
6262
- `after-appear`
6363
- `enter-cancelled`
64-
- `leave-cancelled` (`v-show` only)
64+
- `leave-cancelled` (apenas `v-show`)
6565
- `appear-cancelled`
6666

67-
- **Usage:**
67+
- **Uso:**
6868

69-
`<transition>` serve as transition effects for **single** element/component. The `<transition>` only applies the transition behavior to the wrapped content inside; it doesn't render an extra DOM element, or show up in the inspected component hierarchy.
69+
`<transition>` servem como efeitos de transição para elemento/componente **único**. O `<transition>` aplica apenas o comportamento de transição para o conteúdo dentro do *wrapper*; Ele não renderiza um elemento DOM extra ou aparece na hierarquia dos componentes inspecionados.
7070

7171
```html
72-
<!-- simple element -->
72+
<!-- elemento simples -->
7373
<transition>
74-
<div v-if="ok">toggled content</div>
74+
<div v-if="ok">conteúdo alternado</div>
7575
</transition>
7676

77-
<!-- dynamic component -->
77+
<!-- componente dinâmico -->
7878
<transition name="fade" mode="out-in" appear>
7979
<component :is="view"></component>
8080
</transition>
8181

82-
<!-- event hooking -->
82+
<!-- gatilhos de evento -->
8383
<div id="transition-demo">
8484
<transition @after-enter="transitionComplete">
85-
<div v-show="ok">toggled content</div>
85+
<div v-show="ok">conteúdo alternado</div>
8686
</transition>
8787
</div>
8888
```
@@ -92,7 +92,7 @@
9292
...
9393
methods: {
9494
transitionComplete (el) {
95-
// for passed 'el' that DOM element as the argument, something ...
95+
// para o 'el' passado que é um elemento do DOM como um argumento ...
9696
}
9797
}
9898
...
@@ -101,27 +101,27 @@
101101
app.mount('#transition-demo')
102102
```
103103

104-
- **See also:** [Enter & Leave Transitions](/guide/transitions-enterleave.html#transitioning-single-elements-components)
104+
- **Ver também:** [Transições de entrada e saída](/guide/transitions-enterleave.html#transicao-de-elementos-componentes-unicos)
105105

106106
## transition-group
107107

108-
- **Props:**
108+
- **Propriedades:**
109109

110-
- `tag` - `string`, defaults to `span`.
111-
- `move-class` - overwrite CSS class applied during moving transition.
112-
- exposes the same props as `<transition>` except `mode`.
110+
- `tag` - `string`, `span` como padrão.
111+
- `move-class` - substitui a classe CSS aplicada durante a transição em movimento.
112+
- expõe as mesmas propriedades que `<transition>` exceto `mode`.
113113

114-
- **Events:**
114+
- **Eventos:**
115115

116-
- exposes the same events as `<transition>`.
116+
- expõe os mesmos eventos que `<transition>`.
117117

118-
- **Usage:**
118+
- **Uso:**
119119

120-
`<transition-group>` serve as transition effects for **multiple** elements/components. The `<transition-group>` renders a real DOM element. By default it renders a `<span>`, and you can configure what element it should render via the `tag` attribute.
120+
`<transition-group>` serve como efeito de transição para **múltiplos** elementos/componentes. O `<transition-group>` renderiza um elemento DOM real. Por padrão renderiza um `<span>`, e você pode configurar qual elemento deverá ser renderizado através do atributo `tag`.
121121

122-
Note that every child in a `<transition-group>` must be [**uniquely keyed**](./special-attributes.html#key) for the animations to work properly.
122+
Note que cada filho em um `<transition-group>` deve ser identificado com [**chave única**](./special-attributes.html#key) para as animações funcionarem corretamente.
123123

124-
`<transition-group>` supports moving transitions via CSS transform. When a child's position on screen has changed after an update, it will get applied a moving CSS class (auto generated from the `name` attribute or configured with the `move-class` attribute). If the CSS `transform` property is "transition-able" when the moving class is applied, the element will be smoothly animated to its destination using the [FLIP technique](https://aerotwist.com/blog/flip-your-animations/).
124+
`<transition-group>` suporta transições de movimento via transformações CSS. Quando a posição de um elemento filho na tela muda após uma atualização, ele aplicará uma classe de movimento CSS (gerada automaticamente a partir do atributo `name` ou configurada com o atributo `move-class` ). Se a propriedade CSS `transform` for passível de transição quando a classe de movimento é aplicada, o elemento será animado suavemente para o seu destino usando a [técnica FLIP](https://aerotwist.com/blog/flip-your-animations/).
125125

126126
```html
127127
<transition-group tag="ul" name="slide">
@@ -131,124 +131,124 @@
131131
</transition-group>
132132
```
133133

134-
- **See also:** [List Transitions](/guide/transitions-list.html)
134+
- **Ver também:** [Lista de Transições](/guide/transitions-list.html)
135135

136136
## keep-alive
137137

138-
- **Props:**
138+
- **Propriedades:**
139139

140-
- `include` - `string | RegExp | Array`. Only components with matching names will be cached.
141-
- `exclude` - `string | RegExp | Array`. Any component with a matching name will not be cached.
142-
- `max` - `number | string`. The maximum number of component instances to cache.
140+
- `include` - `string | RegExp | Array`. Apenas os componentes com nomes correspondentes serão colocados em cache.
141+
- `exclude` - `string | RegExp | Array`. Qualquer componente com o nome correspondente não será colocado em cache.
142+
- `max` - `number | string`. O número máximo de instâncias do componente a serem colocadas em cache.
143143

144-
- **Usage:**
144+
- **Uso:**
145145

146-
When wrapped around a dynamic component, `<keep-alive>` caches the inactive component instances without destroying them. Similar to `<transition>`, `<keep-alive>` is an abstract component: it doesn't render a DOM element itself, and doesn't show up in the component parent chain.
146+
Quando *wrapped* (envolvido) em torno de um componente dinâmico, `<keep-alive>` coloca as instâncias dos componentes inativos em cache sem os destruir. Semelhante a `<transition>`, `<keep-alive>` é um componente abstrato: ele não renderiza um elemento DOM em si, e não aparece na cadeia pai do componente.
147147

148-
When a component is toggled inside `<keep-alive>`, its `activated` and `deactivated` lifecycle hooks will be invoked accordingly.
148+
Quando um componente é alternado dentro de `<keep-alive>`, seus gatilhos de ciclo de vida `activated` e` deactivated` serão invocados de acordo.
149149

150-
Primarily used to preserve component state or avoid re-rendering.
150+
Usado principalmente para preservar o estado do componente ou evitar re-renderização.
151151

152152
```html
153-
<!-- basic -->
153+
<!-- básico -->
154154
<keep-alive>
155155
<component :is="view"></component>
156156
</keep-alive>
157157

158-
<!-- multiple conditional children -->
158+
<!-- filhos com multiplas condições -->
159159
<keep-alive>
160160
<comp-a v-if="a > 1"></comp-a>
161161
<comp-b v-else></comp-b>
162162
</keep-alive>
163163

164-
<!-- used together with `<transition>` -->
164+
<!-- usado juntamente com `<transition>` -->
165165
<transition>
166166
<keep-alive>
167167
<component :is="view"></component>
168168
</keep-alive>
169169
</transition>
170170
```
171171

172-
Note, `<keep-alive>` is designed for the case where it has one direct child component that is being toggled. It does not work if you have `v-for` inside it. When there are multiple conditional children, as above, `<keep-alive>` requires that only one child is rendered at a time.
172+
Note que, `<keep-alive>` é projetado para o caso em que ele possui um componente filho direto que está sendo alternado. Isso não funciona se você tiver `v-for` dentro dele. Quando há múltiplos filhos condicionais, como acima, `<keep-alive>` exige que apenas um filho seja renderizado de cada vez.
173173

174-
- **`include` and `exclude`**
174+
- **`include` e `exclude`**
175175

176-
The `include` and `exclude` props allow components to be conditionally cached. Both props can be a comma-delimited string, a RegExp or an Array:
176+
As propriedades `include` e `exclude` permitem que os componentes sejam cacheados condicionalmente. Ambas as propriedades podem ser uma String separada por vígulas, uma RegExp ou um Array:
177177

178178
```html
179-
<!-- comma-delimited string -->
179+
<!-- string separada por vírgulas -->
180180
<keep-alive include="a,b">
181181
<component :is="view"></component>
182182
</keep-alive>
183183

184-
<!-- regex (use `v-bind`) -->
184+
<!-- regex (usando `v-bind`) -->
185185
<keep-alive :include="/a|b/">
186186
<component :is="view"></component>
187187
</keep-alive>
188188

189-
<!-- Array (use `v-bind`) -->
189+
<!-- Array (usando `v-bind`) -->
190190
<keep-alive :include="['a', 'b']">
191191
<component :is="view"></component>
192192
</keep-alive>
193193
```
194194

195-
The match is first checked on the component's own `name` option, then its local registration name (the key in the parent's `components` option) if the `name` option is not available. Anonymous components cannot be matched against.
195+
A correspondência é verificada primeiro na opção `name` do componente, depois pelo nome no registro local (a chave dentro da opção `components` do pai) se a opção `name` não estiver disponível. Os componentes anônimos não poder ser comparados.
196196

197197
- **`max`**
198198

199-
The maximum number of component instances to cache. Once this number is reached, the cached component instance that was least recently accessed will be destroyed before creating a new instance.
199+
O número máximo de instâncias do componente a serem guardadas em cache. Quando esse número for atingido, a instância do componente em cache que foi acessada menos recentemente será destruída antes de criar uma nova instância.
200200

201201
```html
202202
<keep-alive :max="10">
203203
<component :is="view"></component>
204204
</keep-alive>
205205
```
206206

207-
::: warning
208-
`<keep-alive>` does not work with functional components because they do not have instances to be cached.
207+
::: warning Aviso
208+
`<keep-alive>` não funciona com componentes funcionais porque eles não têm instâncias a serem guardadas em cache.
209209
:::
210210

211-
- **See also:** [Dynamic Components - keep-alive](../guide/component-dynamic-async.html#dynamic-components-with-keep-alive)
211+
- **Ver também:** [Componentes dinâmicos - keep-alive](../guide/component-dynamic-async.html#componentes-dinamicos-com-keep-alive)
212212

213213
## slot
214214

215-
- **Props:**
215+
- **Propriedades:**
216216

217-
- `name` - `string`, Used for named slot.
217+
- `name` - `string`, Usado para o *slot* nomeado.
218218

219-
- **Usage:**
219+
- **Uso:**
220220

221-
`<slot>` serve as content distribution outlets in component templates. `<slot>` itself will be replaced.
221+
`<slot>` servem como pontos de distribuição de conteúdo em _templates_ de componentes. O `<slot>` em si será substituído.
222222

223-
For detailed usage, see the guide section linked below.
223+
Para obter detalhes sobre o uso, consulte a seção do guia no link abaixo.
224224

225-
- **See also:** [Content Distribution with Slots](../guide/component-basics.html#content-distribution-with-slots)
225+
- **Ver também:** [Distribuição de Conteúdo com Slots](../guide/component-basics.html#distribuicao-de-conteudo-com-slots)
226226

227227
## teleport
228228

229-
- **Props:**
229+
- **Propriedades:**
230230

231-
- `to` - `string`. Required prop, has to be a valid query selector, or an HTMLElement (if used in a browser environment). Specifies a target element where `<teleport>` content will be moved
231+
- `to` - `string`. Propriedade obrigatória, tem que ser um seletor (*query*) válido, ou um elemento HTML (*HTMLElement*) (se usado no ambiente do navegador). Especifica um elemento de destino para onde o conteúdo de `<teleport>` será movido.
232232

233233
```html
234234
<!-- ok -->
235235
<teleport to="#some-id" />
236236
<teleport to=".some-class" />
237237
<teleport to="[data-teleport]" />
238238

239-
<!-- Wrong -->
239+
<!-- Errado -->
240240
<teleport to="h1" />
241241
<teleport to="some-string" />
242242
```
243243

244-
- `disabled` - `boolean`. This optional prop can be used to disable the `<teleport>`'s functionality, which means that its slot content will not be moved anywhere and instead be rendered where you specified the `<teleport>` in the surrounding parent component.
244+
- `disabled` - `boolean`. Esta propriedade opcional pode ser usada para desativar a funcionalidade de `<teleport>`, o que significa que o conteúdo do slot não será movido para qualquer lugar, e em vez disso será renderizado onde você especificou o `<teleport>` no componente pai que o envolve.
245245

246246
```html
247247
<teleport to="#popup" :disabled="displayVideoInline">
248248
<video src="./my-movie.mp4">
249249
</teleport>
250250
```
251251

252-
Notice that this will move the actual DOM nodes instead of being destroyed and recreated, and it will keep any component instances alive as well. All stateful HTML elements (i.e. a playing video) will keep their state.
252+
Observe que isso moverá os nós DOM reais em vez de serem destruídos e recriados e também manterá todas as instâncias do componente vivas. Todos os elementos HTML com estado (por exemplo, um vídeo em reprodução) manterão seu estado.
253253

254-
- **See also:** [Teleport component](../guide/teleport.html#teleport)
254+
- **Ver também:** [Componente de teletransporte](../guide/teleport.html#teleporte)

0 commit comments

Comments
 (0)