Skip to content

Commit 5c0bf08

Browse files
committed
docs: translate migration guide > mount api changes
1 parent 9ce6fbd commit 5c0bf08

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/guide/migration/mount-changes.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: 'Mount API changes'
2+
title: 'マウント API の変更'
33
badges:
44
- breaking
55
---
66

7-
# Mounted application does not replace the element <MigrationBadges :badges="$frontmatter.badges" />
7+
# 要素を置換しないアプリケーションのマウント <MigrationBadges :badges="$frontmatter.badges" />
88

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

11-
In Vue 2.x, when mounting an application that has a `template`, the rendered content replaces the element we mount to. In Vue 3.x, the rendered application is appended as a child of such an element, replacing element's `innerHTML`.
11+
Vue 2.x では、 `template` を持つアプリケーションをマウントすると、レンダリングされたコンテンツがマウント先の要素を置き換えます。 Vue 3.x では、レンダリングされたアプリケーションは、子要素として追加され、要素の `innerHTML` を置き換えます。
1212

13-
## 2.x Syntax
13+
## 2.x での構文
1414

15-
In Vue 2.x, we pass an HTML element selector to `new Vue()` or `$mount`:
15+
Vue 2.x では、 HTML 要素セレクタを `new Vue()` または `$mount` に渡します:
1616

1717
```js
1818
new Vue({
@@ -27,7 +27,7 @@ new Vue({
2727
`
2828
})
2929

30-
// or
30+
// または
3131
const app = new Vue({
3232
data() {
3333
return {
@@ -42,7 +42,7 @@ const app = new Vue({
4242
app.$mount('#app')
4343
```
4444

45-
When we mount this application to the page that has a `div` with the passed selector (in our case, it's `id="app"`):
45+
このアプリケーションを渡されたセレクタ (ここでは `id="app"`) を持つ `div` のあるページにマウントした場合:
4646

4747
```html
4848
<body>
@@ -52,17 +52,17 @@ When we mount this application to the page that has a `div` with the passed sele
5252
</body>
5353
```
5454

55-
in the rendered result, the mentioned `div` will be replaced with the rendered application content:
55+
レンダリングされた結果は、上記の `div` がレンダリングされたアプリケーションのコンテンツと置き換えられます:
5656

5757
```html
5858
<body>
5959
<div id="rendered">Hello Vue!</div>
6060
</body>
6161
```
6262

63-
## 3.x Syntax
63+
## 3.x での構文
6464

65-
In Vue 3.x, when we mount an application, its rendered content will replace the `innerHTML` of the element we pass to `mount`:
65+
Vue 3.x では、アプリケーションをマウントすると、レンダリングされたコンテンツが `mount` に渡した要素の `innerHTML` を置き換えます:
6666

6767
```js
6868
const app = Vue.createApp({
@@ -79,7 +79,7 @@ const app = Vue.createApp({
7979
app.mount('#app')
8080
```
8181

82-
When this app is mounted to the page that has a `div` with `id="app"`, this will result in:
82+
このアプリケーションを `id="app"` を持つ `div` のあるページにマウントすると、このようになります:
8383

8484
```html
8585
<body>
@@ -89,6 +89,6 @@ When this app is mounted to the page that has a `div` with `id="app"`, this will
8989
</body>
9090
```
9191

92-
## See also
92+
## 参照
9393

9494
- [`mount` API](/api/application-api.html#mount)

0 commit comments

Comments
 (0)