|
2 | 2 |
|
3 | 3 | ## $data
|
4 | 4 |
|
5 |
| -- **Type:** `Object` |
| 5 | +- **型:** `Object` |
6 | 6 |
|
7 |
| -- **Details:** |
| 7 | +- **詳細:** |
8 | 8 |
|
9 |
| - The data object that the component instance is observing. The component instance proxies access to the properties on its data object. |
| 9 | + コンポーネントインスタンスが監視しているデータオブジェクトです。コンポーネントインスタンスは、この data オブジェクトのプロパティへのアクセスをプロキシします。 |
10 | 10 |
|
11 |
| -- **See also:** [Options / Data - data](./options-data.html#data-2) |
| 11 | +- **参照:** [オプション / Data - data](./options-data.html#data-2) |
12 | 12 |
|
13 | 13 | ## $props
|
14 | 14 |
|
15 |
| -- **Type:** `Object` |
| 15 | +- **型:** `Object` |
16 | 16 |
|
17 |
| -- **Details:** |
| 17 | +- **詳細:** |
18 | 18 |
|
19 |
| - An object representing the current props a component has received. The component instance proxies access to the properties on its props object. |
| 19 | + コンポーネントが受け取った現在のプロパティを表すオブジェクトです。コンポーネントインスタンスは、この props オブジェクトのプロパティへのアクセスをプロキシします。 |
20 | 20 |
|
21 | 21 | ## $el
|
22 | 22 |
|
23 |
| -- **Type:** `any` |
| 23 | +- **型:** `any` |
24 | 24 |
|
25 |
| -- **Read only** |
| 25 | +- **読み込みのみ** |
26 | 26 |
|
27 |
| -- **Details:** |
| 27 | +- **詳細:** |
28 | 28 |
|
29 |
| - The root DOM element that the component instance is managing. |
| 29 | + コンポーネントインスタンスが管理しているルート DOM 要素です。 |
30 | 30 |
|
31 |
| - For components using [fragments](../guide/migration/fragments), `$el` will be the placeholder DOM node that Vue uses to keep track of the component's position in the DOM. It is recommended to use [template refs](../guide/component-template-refs.html) for direct access to DOM elements instead of relying on `$el`. |
| 31 | + [Fragments](../guide/migration/fragments) を使っているコンポーネントでは、`$el` は DOM 内で Vue がコンポーネントの位置を追跡するために使う DOM ノードのプレースホルダになります。DOM 要素に直接アクセスするためには、`$el` に頼る代わりに [テンプレート参照](../guide/component-template-refs.html) を使うことをお勧めします。 |
32 | 32 |
|
33 | 33 | ## $options
|
34 | 34 |
|
35 |
| -- **Type:** `Object` |
| 35 | +- **型:** `Object` |
36 | 36 |
|
37 |
| -- **Read only** |
| 37 | +- **読み込みのみ** |
38 | 38 |
|
39 |
| -- **Details:** |
| 39 | +- **詳細:** |
40 | 40 |
|
41 |
| - The instantiation options used for the current component instance. This is useful when you want to include custom properties in the options: |
| 41 | + 現在のコンポーネントインスタンスに使われるインスタンス化オプションです。これはオプションにカスタムプロパティを含めたいときに便利です: |
42 | 42 |
|
43 | 43 | ```js
|
44 | 44 | const app = createApp({
|
|
51 | 51 |
|
52 | 52 | ## $parent
|
53 | 53 |
|
54 |
| -- **Type:** `Component instance` |
| 54 | +- **型:** `Component instance` |
55 | 55 |
|
56 |
| -- **Read only** |
| 56 | +- **読み込みのみ** |
57 | 57 |
|
58 |
| -- **Details:** |
| 58 | +- **詳細:** |
59 | 59 |
|
60 |
| - The parent instance, if the current instance has one. |
| 60 | + 現在のインスタンスに親インスタンスがある場合は、その親インスタンスです。 |
61 | 61 |
|
62 | 62 | ## $root
|
63 | 63 |
|
64 |
| -- **Type:** `Component instance` |
| 64 | +- **型:** `Component instance` |
65 | 65 |
|
66 |
| -- **Read only** |
| 66 | +- **読み込みのみ** |
67 | 67 |
|
68 |
| -- **Details:** |
| 68 | +- **詳細:** |
69 | 69 |
|
70 |
| - The root component instance of the current component tree. If the current instance has no parents this value will be itself. |
| 70 | + 現在のコンポーネントツリーのルートコンポーネントインスタンスです。現在のインスタンスが親を持たない場合、この値は自分自身になります。 |
71 | 71 |
|
72 | 72 | ## $slots
|
73 | 73 |
|
74 |
| -- **Type:** `{ [name: string]: (...args: any[]) => Array<VNode> | undefined }` |
| 74 | +- **型:** `{ [name: string]: (...args: any[]) => Array<VNode> | undefined }` |
75 | 75 |
|
76 |
| -- **Read only** |
| 76 | +- **読み込みのみ** |
77 | 77 |
|
78 |
| -- **Details:** |
| 78 | +- **詳細:** |
79 | 79 |
|
80 |
| - Used to programmatically access content [distributed by slots](../guide/component-basics.html#content-distribution-with-slots). Each [named slot](../guide/component-slots.html#named-slots) has its own corresponding property (e.g. the contents of `v-slot:foo` will be found at `this.$slots.foo()`). The `default` property contains either nodes not included in a named slot or contents of `v-slot:default`. |
| 80 | + [スロットにより配信された](../guide/component-basics.html#スロットによるコンテンツ配信) コンテンツにプログラム的にアクセスするために使われます。それぞれの [名前付きスロット](../guide/component-slots.html#名前付きスロット) は自身に対応するプロパティを持ちます(例えば、`v-slot:foo` のコンテンツは `this.$slots.foo()` にあります)。`default` プロパティは、名前付きスロットに含まれないノードか、`v-slot:default` のコンテンツを含みます。 |
81 | 81 |
|
82 |
| - Accessing `this.$slots` is most useful when writing a component with a [render function](../guide/render-function.html). |
| 82 | + `this.$slots` へのアクセスは、[render function](../guide/render-function.html) でコンポーネントを書くときにもっとも便利です。 |
83 | 83 |
|
84 |
| -- **Example:** |
| 84 | +- **例:** |
85 | 85 |
|
86 | 86 | ```html
|
87 | 87 | <blog-post>
|
|
116 | 116 | })
|
117 | 117 | ```
|
118 | 118 |
|
119 |
| -- **See also:** |
120 |
| - - [`<slot>` Component](built-in-components.html#slot) |
121 |
| - - [Content Distribution with Slots](../guide/component-basics.html#content-distribution-with-slots) |
122 |
| - - [Render Functions - Slots](../guide/render-function.html#slots) |
| 119 | +- **参照:** |
| 120 | + - [`<slot>` コンポーネント](built-in-components.html#slot) |
| 121 | + - [スロットによるコンテンツ配信](../guide/component-basics.html#スロットによるコンテンツ配信) |
| 122 | + - [Render 関数 - スロット](../guide/render-function.html#スロット) |
123 | 123 |
|
124 | 124 | ## $refs
|
125 | 125 |
|
126 |
| -- **Type:** `Object` |
| 126 | +- **型:** `Object` |
127 | 127 |
|
128 |
| -- **Read only** |
| 128 | +- **読み込みのみ** |
129 | 129 |
|
130 |
| -- **Details:** |
| 130 | +- **詳細:** |
131 | 131 |
|
132 |
| -An object of DOM elements and component instances, registered with [`ref` attributes](../guide/component-template-refs.html). |
| 132 | + [`ref` 属性](../guide/component-template-refs.html) で登録された DOM 要素のオブジェクトとコンポーネントインスタンスです。 |
133 | 133 |
|
134 |
| -- **See also:** |
135 |
| - - [Template refs](../guide/component-template-refs.html) |
136 |
| - - [Special Attributes - ref](./special-attributes.md#ref) |
| 134 | +- **参照:** |
| 135 | + - [テンプレート参照](../guide/component-template-refs.html) |
| 136 | + - [特別な属性 - ref](./special-attributes.md#ref) |
137 | 137 |
|
138 | 138 | ## $attrs
|
139 | 139 |
|
140 |
| -- **Type:** `Object` |
| 140 | +- **型:** `Object` |
141 | 141 |
|
142 |
| -- **Read only** |
| 142 | +- **読み込みのみ** |
143 | 143 |
|
144 |
| -- **Details:** |
| 144 | +- **詳細:** |
145 | 145 |
|
146 |
| -Contains parent-scope attribute bindings and events that are not recognized (and extracted) as component [props](./options-data.html#props) or [custom events](./options-data.html#emits). When a component doesn't have any declared props or custom events, this essentially contains all parent-scope bindings, and can be passed down to an inner component via `v-bind="$attrs"` - useful when creating higher-order components. |
| 146 | + コンポーネントの [プロパティ](./options-data.html#props) や [カスタムイベント](./options-data.html#emits) として認識されない(抽出されない)親スコープの属性バインディングやイベントを含みます。コンポーネントが宣言されたプロパティやカスタムイベントを持たない場合、これは基本的にすべての親スコープのバインディングを含み、`v-bind="$attrs"` を介して内部のコンポーネントに渡すことができます。これは高階(higher-order)コンポーネントを作成するときに便利です。 |
147 | 147 |
|
148 |
| -- **See also:** |
149 |
| - - [Non-Prop Attributes](../guide/component-attrs.html) |
150 |
| - - [Options / Misc - inheritAttrs](./options-misc.html#inheritattrs) |
| 148 | +- **参照:** |
| 149 | + - [プロパティでない属性](../guide/component-attrs.html) |
| 150 | + - [オプション / その他 - inheritAttrs](./options-misc.html#inheritattrs) |
0 commit comments