Skip to content

Commit 39615a8

Browse files
committed
feature: v-if-v-for.mdの翻訳
1 parent f8c24f3 commit 39615a8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/guide/migration/v-if-v-for.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
2-
title: v-if vs. v-for Precedence
2+
title: v-if v-for の優先順位
33
badges:
44
- breaking
55
---
66

77
# {{ $frontmatter.title }} <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## 概要
1010

11-
- **BREAKING**: If used on the same element, `v-if` will have higher precedence than `v-for`
11+
- **BREAKING**: 二つを同じエレメントで利用している場合、`v-if` は `v-for` より優先されます。
1212

13-
## Introduction
13+
## イントロダクション
1414

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+
Vue.js で最も一般的に使われているディレクティブの二つは `v-if` `v-for` です。したがって開発者が両方を一緒に使用したいときが来るのは当然のことです。これは推奨される方法ではありませんが、必要な場合があるため、私たちはその仕組みについてのガイダンスを提供したいと思いました。
1616

17-
## 2.x Syntax
17+
## 2.x での構文
1818

19-
In 2.x, when using `v-if` and `v-for` on the same element, `v-for` would take precedence.
19+
2.x では、`v-if` `v-for` を同じエレメントで使うと、`v-for` が優先されます。
2020

21-
## 3.x Syntax
21+
## 3.x での構文
2222

23-
In 3.x, `v-if` will always have the higher precedence than `v-for`.
23+
3.x では、 `v-if` はいつも `v-for` より優先されます。
2424

25-
## Migration Strategy
25+
## 移行の戦略
2626

27-
It is recommended to avoid using both on the same element due to the syntax ambiguity.
27+
構文の曖昧さにより、同じエレメントで両方の使用を避けることをお勧めします。
2828

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+
これをテンプレートレベルで管理するのではなく、これを実現する一つの方法は表示されている要素のリストを除外する算出プロパティを作成することです。

0 commit comments

Comments
 (0)