Skip to content

Commit 99ccbd5

Browse files
committed
Update list.md
1 parent e87ff41 commit 99ccbd5

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

src/guide/list.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,7 @@ Similar ao uso de _template_ com `v-if`, você também pode usar a tag `<templat
268268
Note que **não** é recomendado usar `v-if` e `v-for` juntos. Consulte o [guia de estilos](../style-guide/#avoid-v-if-with-v-for-essential) para detalhes.
269269
:::
270270

271-
<<<<<<< HEAD
272-
Quando presentes em um mesmo nó, `v-for` tem maior prioridade que `v-if`. Isto significa que `v-if` será executado separadamente a cada iteração da repetição. Isto pode ser útil se quiser renderizar nós condicionalmente para apenas _alguns_ itens, como abaixo:
273-
=======
274-
When they exist on the same node, `v-if` has a higher priority than `v-for`. That means the `v-if` condition will not have access to variables from the scope of the `v-for`:
275-
>>>>>>> 84d3484c8edff3aff5e832d69ace073ea0e182a0
271+
Quando presentes em um mesmo nó, `v-if` tem maior prioridade que `v-for`. Isto significa que o `v-if` não terá acesso às variáveis criadas no escopo do `v-for`:
276272

277273
```html
278274
<!-- This will throw an error because property "todo" is not defined on instance. -->
@@ -282,25 +278,14 @@ When they exist on the same node, `v-if` has a higher priority than `v-for`. Tha
282278
</li>
283279
```
284280

285-
<<<<<<< HEAD
286-
O exemplo acima só renderiza apenas as tarefas que não estão completas.
287-
288-
Em vez disso, se sua intenção for condicionalmente pular toda a execução da repetição, você pode colocar o `v-if` em um elemento envolvendo o bloco (ou [`<template>`](conditional#conditional-groups-with-v-if-on-lt-template-gt)). Por exemplo:
289-
=======
290-
This can be fixed by moving `v-for` to a wrapping `<template>` tag:
291-
>>>>>>> 84d3484c8edff3aff5e832d69ace073ea0e182a0
281+
Isto pode ser resolvido envolvendo-se o `v-for` em uma _tag_ `<template>`:
292282

293283
```html
294284
<template v-for="todo in todos">
295285
<li v-if="!todo.isComplete">
296286
{{ todo }}
297287
</li>
298-
<<<<<<< HEAD
299-
</ul>
300-
<p v-else>Não há tarefas a fazer!</p>
301-
=======
302288
</template>
303-
>>>>>>> 84d3484c8edff3aff5e832d69ace073ea0e182a0
304289
```
305290

306291
## Componentes com `v-for`

0 commit comments

Comments
 (0)