Skip to content

Commit 34ec818

Browse files
authored
API Reference > Options DOM の翻訳を追従 (#396)
* Fix tip colons vuejs/docs@4f66158 * docs: reduce the reliance on the global Vue in API Reference examples vuejs/docs@35f5b52 * Mention application mounting changes in migration guide and API vuejs/docs@3147cc5 * docs: translate api reference > options dom
1 parent 89259e3 commit 34ec818

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

src/api/options-dom.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,35 @@
22

33
## template
44

5-
- **Type:** `string`
5+
- **:** `string`
66

7-
- **Details:**
7+
- **詳細:**
88

9-
A string template to be used as the markup for the component instance. The template will **replace** the mounted element. Any existing markup inside the mounted element will be ignored, unless content distribution slots are present in the template.
9+
コンポーネントインスタンスのマークアップとして使われる文字列のテンプレートです。そのテンプレートはマウントされた要素の `innerHTML`**置換** します。マウントされた要素内の既存マークアップは、テンプレート内にコンテンツ配信スロットが存在しない限り、どれも無視されます。
1010

11-
If the string starts with `#` it will be used as a `querySelector` and use the selected element's innerHTML as the template string. This allows the use of the common `<script type="x-template">` trick to include templates.
11+
文字列が `#` から始まる場合は、`querySelector` として扱われ、テンプレート文字列として選択された要素の innerHTML を使います。これは一般的な `<script type="x-template">` の方法を使って、テンプレートを含むことができます。
1212

1313
:::tip Note
14-
From a security perspective, you should only use Vue templates that you can trust. Never use user-generated content as your template.
14+
セキュリティの観点からは、あなたが信頼できる Vue テンプレートだけを使うべきです。ユーザが作成したコンテンツをテンプレートとして使ってはいけません。
1515
:::
1616

1717
:::tip Note
18-
If render function is present in the Vue option, the template will be ignored.:::
18+
Render 関数が Vue オプションに存在する場合、テンプレートは無視されます。
19+
:::
1920

20-
- **See also:**
21-
- [Lifecycle Diagram](../guide/instance.html#lifecycle-diagram)
22-
- [Content Distribution with Slots](../guide/component-basics.html#content-distribution-with-slots)
21+
- **参照:**
22+
- [ライフサイクルダイアグラム](../guide/instance.html#ライフサイクルダイアグラム)
23+
- [スロットによるコンテンツ配信](../guide/component-basics.html#スロットによるコンテンツ配信)
2324

2425
## render
2526

26-
- **Type:** `Function`
27+
- **:** `Function`
2728

28-
- **Details:**
29+
- **詳細:**
2930

30-
An alternative to string templates allowing you to leverage the full programmatic power of JavaScript.
31+
文字列テンプレートの代わりに、JavaScript のプログラム能力をフル活用することができます。
3132

32-
- **Usage:**
33+
- **使用方法:**
3334

3435
```html
3536
<div id="app" class="demo">
@@ -38,11 +39,12 @@
3839
```
3940

4041
```js
41-
const app = Vue.createApp({})
42+
const { createApp, h } = Vue
43+
const app = createApp({})
4244

4345
app.component('my-title', {
4446
render() {
45-
return Vue.h(
47+
return h(
4648
'h1', // tag name,
4749
this.blogTitle // tag content
4850
)
@@ -59,7 +61,7 @@
5961
```
6062

6163
:::tip Note
62-
The `render` function has priority over the render function compiled from `template` option or in-DOM HTML template of the mounting element
64+
`render` 関数は、`template` オプションや、マウントした要素の DOM HTML テンプレートからコンパイルされたレンダリング関数よりも高い優先度を持ちます。
6365
:::
6466

65-
- **See also:** [Render Functions](../guide/render-function.html)
67+
- **参照:** [Render 関数](../guide/render-function.html)

0 commit comments

Comments
 (0)