You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**BREAKING**: If used on the same element, `v-if`will have higher precedence than`v-for`
11
+
-**QUEBRA**: Se usado no mesmo elemento, `v-if`terá uma maior precedência do que`v-for`
12
12
13
-
## Introduction
13
+
## Introdução
14
14
15
-
Two of the most commonly used directives in Vue.js are`v-if`and`v-for`. So it's no surprise that there comes a time when developers want to use both together. While this is not a recommended practice, there may be times when this is necessary, so we wanted to provide guidance for how it works.
15
+
Duas das diretivas mais comumente usadas em Vue.js são`v-if`e`v-for`. Portanto, não é surpresa que chegue um momento em que os desenvolvedores desejem usar os dois juntos. Embora não seja uma prática recomendada, pode haver momentos em que isso seja necessário, por isso gostaríamos de fornecer orientações sobre como isso funciona.
16
16
17
-
## 2.x Syntax
17
+
## 2.x Sintaxe
18
18
19
-
In 2.x, when using`v-if`and`v-for`on the same element, `v-for`would take precedence.
19
+
No 2.x, quando utilizado`v-if`e`v-for`no mesmo elemento, `v-for`teria precedência.
20
20
21
-
## 3.x Syntax
21
+
## 3.x Sintaxe
22
22
23
-
In 3.x, `v-if`will always have the higher precedence than`v-for`.
23
+
No 3.x, `v-if`terá sempre uma maior precedência do que`v-for`.
24
24
25
-
## Migration Strategy
25
+
## Estratégia de migração
26
26
27
-
It is recommended to avoid using both on the same element due to the syntax ambiguity.
27
+
Recomenda-se evitar o uso de ambos no mesmo elemento devido à ambiguidade da sintaxe.
28
28
29
-
Rather than managing this at the template level, one method for accomplishing this is to create a computed property that filters out a list for the visible elements.
29
+
Em vez de gerenciar isso no nível do modelo, um método para realizar isso é criar uma propriedade computada (computed property) que filtre uma lista para os elementos visíveis.
0 commit comments