Skip to content

Commit b79990c

Browse files
committed
Migration Guide > Props Default Function this Access の翻訳 (vuejs-jp#122)
1 parent 7c1c5a6 commit b79990c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/guide/migration/props-default-this.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Props Default Function this Access
2+
title: プロパティのデフォルト値ファクトリ関数の `this` アクセス
33
badges:
44
- breaking
55
---
66

7-
# Props Default Function `this` Access <MigrationBadges :badges="$frontmatter.badges" />
7+
# プロパティのデフォルト値ファクトリ関数の `this` アクセス <MigrationBadges :badges="$frontmatter.badges" />
88

9-
Props default value factory functions no longer have access to `this`.
9+
プロパティのデフォルト値ファクトリ関数が `this` にアクセスできなくなりました。
1010

11-
Instead:
11+
代わりの方法は以下です。
1212

13-
- Raw props received by the component are passed to the default function as argument;
13+
- コンポーネントが受け取った生のプロパティは、引数としてデフォルト関数に渡されます。
1414

15-
- The [inject](../composition-api-provide-inject.md) API can be used inside default functions.
15+
- [inject](../composition-api-provide-inject.md) API がデフォルト関数の内部で使用できます。
1616

1717
```js
1818
import { inject } from 'vue'
@@ -21,9 +21,9 @@ export default {
2121
props: {
2222
theme: {
2323
default (props) {
24-
// `props` is the raw values passed to the component,
25-
// before any type / default coercions
26-
// can also use `inject` to access injected properties
24+
// `props` 引数はコンポーネントに渡される生の値で、
25+
// 型やデフォルトの強制より前のものです。
26+
// また、`inject` を使用して注入されたプロパティにアクセスすることもできます。
2727
return inject('theme', 'default-theme')
2828
}
2929
}

0 commit comments

Comments
 (0)