Skip to content

Commit 0364f92

Browse files
committed
Translate migration guide introduction to Japanese
1 parent 6b0f033 commit 0364f92

File tree

1 file changed

+161
-49
lines changed

1 file changed

+161
-49
lines changed

src/guide/migration/introduction.md

Lines changed: 161 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,190 @@
1-
# Introduction
1+
# はじめに
22

3-
> There's so much here! Does that mean 3.0 is completely different, I'll have to learn the basics all over again, and migrating will be practically impossible?
3+
::: info
4+
Vue.js を使うのは初めてですか? [エッセンシャルガイド](/guide/introduction.html) を参考に使い始めてみてください。
5+
:::
46

5-
We're glad you asked! The answer is no. We've gone to great lengths to ensure most of the API is the same and the core concepts haven't changed. It's long because we like to offer very detailed explanations and include a lot of examples. Rest assured, **this is not something you have to read from top to bottom!**
7+
このガイドは主に、Vue 3 の新機能と変更点について学びたい Vue 2 の経験があるユーザーを対象としています。 **Vue 3 を試す前にこのガイドを上から下まで読む必要はありません。** 多くの変更があったように見えますが、Vue についてあなたが知っていて愛していることの多くは同じままです。 しかし、私たちは可能な限り徹底し、文書化されたすべての変更について詳細な説明と例を提供したいと考えました。
68

7-
Possibly the biggest change is our new [Composition API](/guide/composition-api-introduction.html), which is entirely additive- the previous Options API will continue to be supported, as the Composition API is an advanced feature.
9+
- [クイックスタート](#クイックスタート)
10+
- [注目すべき新機能](#注目すべき新機能)
11+
- [破壊的変更](#破壊的変更)
12+
- [サポートライブラリ](#サポートライブラリ)
813

9-
## Overview
14+
## 概要
1015

1116
<br>
1217
<iframe src="https://player.vimeo.com/video/440868720" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
1318

14-
Start learning Vue 3 at [Vue Mastery](https://www.vuemastery.com/courses-path/vue3).
19+
[Vue Mastery](https://www.vuemastery.com/courses-path/vue3) で Vue 3 を学び始める。
1520

16-
### New Features
21+
## クイックスタート
1722

18-
Some of the new features to keep an eye on in Vue 3 include:
23+
- CDN 経由: `<script src="https://unpkg.com/vue@next"></script>`
24+
- [Codepen](https://codepen.io/yyx990803/pen/OJNoaZL) 上のブラウザ内プレイグラウンド
25+
- [CodeSandbox](https://v3.vue.new) 上のブラウザ内サンドボックス
26+
- [Vite](https://github.com/vitejs/vite) を使った Scaffold:
27+
28+
```bash
29+
npm init vite-app hello-vue3 # OR yarn create vite-app hello-vue3
30+
```
31+
32+
- [vue-cli](https://cli.vuejs.org/) を使った Scaffold:
33+
34+
```bash
35+
npm install -g @vue/cli # OR yarn global add @vue/cli
36+
vue create hello-vue3
37+
# select vue 3 preset
38+
```
39+
40+
## 注目すべき新機能
41+
42+
Vue 3 で注目すべきいくつかの新機能の次のとおりです。
1943

2044
- [Composition API](/guide/composition-api-introduction.html)
2145
- [Teleport](/guide/teleport.html)
2246
- [Fragments](/guide/migration/fragments.html)
2347
- [Emits Component Option](/guide/component-custom-events.html)
24-
- `createRenderer` API from `@vue/runtime-core` to create custom renderers
25-
26-
### Breaking
27-
28-
The following consists a list of breaking changes from 2.x:
29-
30-
- [Global Vue API is changed to use an application instance](/guide/migration/global-api.html)
31-
- [Global and internal APIs have been restructured to be tree-shakable](/guide/migration/global-api-treeshaking.html)
32-
- [`model` component option and `v-bind`'s `sync` modifier are removed in favor of `v-model` arguments](/guide/migration/v-model.html)
33-
- [Render function API changed](/guide/migration/render-function-api.html)
34-
- [Functional components can only be created using a plain function](/guide/migration/functional-components.html)
35-
- [`functional` attribute on single-file component (SFC) `<template>` and `functional` component option are deprecated](/guide/migration/functional-components.html)
36-
- [Async components now require `defineAsyncComponent` method to be created](/guide/migration/async-components.html)
37-
- [Component data option should always be declared as a function](/guide/migration/data-option.html)
38-
- [Custom elements whitelisting is now performed during template compilation](/guide/migration/custom-elements-interop.html)
39-
- [Special `is` prop usage is restricted to the reserved `<component>` tag only](/guide/migration/custom-elements-interop.html)
40-
- [`$scopedSlots` property is removed and need to be replaced with `$slots`](/guide/migration/slots-unification.html)
41-
- [Attributes coercion strategy changed](/guide/migration/attribute-coercion.html)
42-
- [Custom directive API changed to align with component lifecycle](/guide/migration/custom-directives.html)
43-
- [Some transition classes got a rename](/guide/migration/transition.md)
44-
- [Component watch option](/api/options-data.html#watch) and [instance method `$watch`](/api/instance-methods.html#watch) no longer supports dot-delimited string paths, use a computed function as the parameter instead
45-
- In Vue 2.x, application root container's `outerHTML` is replaced with root component template (or eventually compiled to a template, if root component has no template/render option). Vue 3.x now uses application container's `innerHTML` instead.
46-
47-
### Removed
48-
49-
- [`keyCode` support as `v-on` modifiers](/guide/migration/keycode-modifiers.html)
50-
- [$on, $off and \$once instance methods](/guide/migration/events-api.html)
48+
- カスタムレンダラを作るための [`@vue/runtime-core``createRenderer` API](https://github.com/vuejs/vue-next/tree/master/packages/runtime-core)
49+
- [SFC での Composition API の Syntax Sugar (`<script setup>`)](https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-script-setup.md) <Badge text="experimental" type="warning" />
50+
- [SFC でのステートドリブンな CSS Variables (`<style vars>`)](https://github.com/vuejs/rfcs/blob/sfc-improvements/active-rfcs/0000-sfc-style-variables.md) <Badge text="experimental" type="warning" />
51+
- [SFC での `<style scoped>` は、グローバルルールまたはスロットされたコンテンツのみを対象とするルールを含めることができるようになった](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md)
52+
53+
## 破壊的変更
54+
55+
::: info INFO
56+
Vue 2 と互換性のある動作と、互換性のない使用法に対する実行時警告を備えた Vue 3 の移行専用ビルドの開発に取り組んでいます。 重要な Vue 2 アプリの移行を計画している場合は、よりスムーズな体験のために移行ビルドを待つことを強くお勧めします。
57+
:::
58+
59+
以下は、2.x からの破壊的変更の一覧です。:
60+
61+
### グローバル API
62+
63+
- [グローバルな Vue API は、アプリケーションインスタンスを使用するように変更されました](/guide/migration/global-api.html)
64+
- [グローバル API と内部 API は、ツリーシェイキングが可能になるように再構築されました](/guide/migration/global-api-treeshaking.html)
65+
66+
### テンプレートディレクティブ
67+
68+
- [コンポーネントでの `v-model` の使用法が改定されました](/guide/migration/v-model.html)
69+
- [`<templatev-for>` ノードと非 `v-for` ノードでの `key` の使用法が変更されました](/guide/migration/key-attribute.html)
70+
- [同じ要素で使用した場合の `v-if``v-for` の優先順位が変更されました](/guide/migration/v-if-v-for.html)
71+
- [`v-bind="object"` は順序依存(order-sensitive)になりました](/guide/migration/v-bind.html)
72+
- [`v-for` 内の `ref` は refs の配列を登録しなくなりました](/guide/migration/array-refs.html)
73+
74+
### コンポーネント
75+
76+
- [関数コンポーネントは、単純な関数を使用してのみ作成可能になりました](/guide/migration/functional-components.html)
77+
- [単一ファイルコンポーネント (SFC) における `functional` 属性の `<template>` および `functional` コンポーネントオプションは非推奨になりました](/guide/migration/functional-components.html)
78+
- [非同期コンポーネントは、 `defineAsyncComponent` メソッドを使って作成することが必要になりました](/guide/migration/async-components.html)
79+
80+
### Render 関数
81+
82+
- [Render 関数の API が変更されました](/guide/migration/render-function-api.html)
83+
- [`$scopedSlots` プロパティが削除され、すべてのスロットが `$slots` を介して関数として公開されるようになりました](/guide/migration/slots-unification.html)
84+
85+
### カスタム要素
86+
87+
- [テンプレートのコンパイル中にカスタム要素のホワイトリスト化が実行されるようになりました](/guide/migration/custom-elements-interop.html)
88+
- [特別な `is` prop の使用は、予約済みの `<component>` タグのみに制限されるようになりました](/guide/migration/custom-elements-interop.html#customized-built-in-elements)
89+
90+
### その他の細かな変更
91+
92+
- `destroyed` ライフサイクルオプションの名前が `unmounted` に変更されました
93+
- `beforeDestroy` ライフサイクルオプションの名前が `beforeUnmount` に変更されました
94+
- [Props の `default` ファクトリ関数は `this` コンテキストにアクセスできなくなりました](/guide/migration/props-default-this.html)
95+
- [コンポーネントライフサイクルに合わせてカスタムディレクティブ API が変更されました](/guide/migration/custom-directives.html)
96+
- [`data` オプションは常に関数として宣言されることが必要になりました](/guide/migration/data-option.html)
97+
- [ミックスインの `data` オプションは浅くマージされるようになりました](/guide/migration/data-option.html#mixin-merge-behavior-change)
98+
- [属性強制の戦略が変更されました](/guide/migration/attribute-coercion.html)
99+
- [一部のトランジションクラスの名前が変更されました](/guide/migration/transition.html)
100+
- [配列を監視している場合、コールバックは配列が置き換えられたときにのみ発火されるようになりました。 ミューテーションで発火する必要がある場合は、 `deep` オプションを指定する必要があります。](/guide/migration/watch.html)
101+
- 特別なディレクティブ(`v-if/else-if/else``v-for` 、または `v-slot`)が使われていない `<template>` タグはプレーンな要素として扱われ、内部コンテンツをレンダリングする代わりにネイティブの `<template>` 要素となります。
102+
- Vue 2.x では、アプリケーションルートコンテナの `outerHTML` はルートコンポーネントのテンプレートに置き換えられます(または、ルートコンポーネントにテンプレート/レンダーのオプションがない場合は、最終的にテンプレートにコンパイルされます)。 Vue 3.x では、代わりにアプリケーションコンテナの `innerHTML` を使用するようになりました。これは、コンテナ自体がテンプレートの一部とは見なされなくなったことを意味します。
103+
104+
### 削除された API
105+
106+
- [`v-on` の修飾子としての `keyCode` のサポート](/guide/migration/keycode-modifiers.html)
107+
- [$on, $off そして \$once のインスタンスメソッド](/guide/migration/events-api.html)
51108
- [Filters](/guide/migration/filters.html)
52-
- [Inline templates attributes](/guide/migration/inline-template-attribute.html)
109+
- [インラインテンプレート属性](/guide/migration/inline-template-attribute.html)
110+
- `$destroy` インスタンスメソッド。 ユーザーは、個々の Vue コンポーネントのライフサイクルを手動で管理べきではなくなりました。
111+
112+
## サポートライブラリ
113+
114+
現在、すべての公式ライブラリとツールが Vue 3 をサポートしていますが、それらのほとんどはまだベータ版であり、NPM の `next` 配布 (dist) タグで配布されています。 **2020 年末までにすべてのプロジェクトを安定させて `latest` 配布タグを使用するように切り替える予定です。**
115+
116+
### Vue CLI
117+
118+
<a href="https://www.npmjs.com/package/@vue/cli" target="_blank" noopener noreferrer><img src="https://img.shields.io/npm/v/@vue/cli"></a>
119+
120+
v4.5.0 以降、 `vue-cli` は新しいプロジェクトを作成するときに、Vue 3 のプリセットを選択するための組み込みオプションを提供するようになりました。 `vue-cli` をアップグレードし、 `vue create` を実行して、Vue3 プロジェクトを今すぐ作成できます。
121+
122+
- [Documentation](https://cli.vuejs.org/)
123+
- [GitHub](https://github.com/vuejs/vue-cli)
124+
125+
### Vue Router
126+
127+
<a href="https://www.npmjs.com/package/vue-router/v/next" target="_blank" noopener noreferrer><img src="https://img.shields.io/npm/v/vue-router/next.svg"></a>
128+
129+
Vue Router 4.0 は Vue 3 のサポートを提供し、独自の破壊的変更がいくつかあります。 詳細については、[README](https://github.com/vuejs/vue-router-next#vue-router-next-)を確認してください。
130+
131+
- [GitHub](https://github.com/vuejs/vue-router-next)
132+
- [RFCs](https://github.com/vuejs/rfcs/pulls?q=is%3Apr+is%3Amerged+label%3Arouter)
133+
134+
### Vuex
53135

54-
## FAQ
136+
<a href="https://www.npmjs.com/package/vuex/v/next" target="_blank" noopener noreferrer><img src="https://img.shields.io/npm/v/vuex/next.svg"></a>
55137

56-
### Where should I start in a migration?
138+
Vuex 4.0 は、3.x と大部分は同じ API で Vue3 のサポートを提供します。 唯一の破壊的変更は、[プラグインのインストール方法](https://github.com/vuejs/vuex/tree/4.0#breaking-changes)です。
57139

58-
1. Start by running the migration helper (still under development) on a current project. We've carefully minified and compressed a senior Vue dev into a simple command line interface. Whenever they recognize an obsolete feature, they'll let you know, offer suggestions, and provide links to more info.
140+
- [GitHub](https://github.com/vuejs/vuex/tree/4.0)
59141

60-
2. After that, browse through the table of contents for this page in the sidebar. If you see a topic you may be affected by, but the migration helper didn't catch, check it out.
142+
### Devtools Extension
61143

62-
3. If you have any tests, run them and see what still fails. If you don't have tests, just open the app in your browser and keep an eye out for warnings or errors as you navigate around.
144+
新しい UI を備え、複数の Vue のバージョンをサポートするために、内部処理にリファクタリングを施した新しいバージョンの Devtools を開発中です。 新しいバージョンは現在ベータ版であり、Vue 3 のみをサポートしています(現時点では)。 Vuex と Router の統合も進行中です。
63145

64-
4. By now, your app should be fully migrated. If you're still hungry for more though, you can read the rest of this page - or dive in to the new and improved guide from [the beginning](#overview). Many parts will be skimmable, since you're already familiar with the core concepts.
146+
- Chrome の場合: [Chrome ウェブストアからインストール](https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg?hl=ja)
65147

66-
### How long will it take to migrate a Vue 2.x app to 3.0?
148+
- 注:ベータチャネルは devtools の安定バージョンと競合する可能性があるため、ベータチャネルが正しく機能するには、安定バージョンを一時的に無効にする必要があるかもしれません。
67149

68-
It depends on a few factors:
150+
- Firefox の場合: [署名された拡張機能をダウンロード](https://github.com/vuejs/vue-devtools/releases/tag/v6.0.0-beta.2) (Assets の下の `.xpi` ファイル)
69151

70-
- The size of your app (small to medium-sized apps will probably be less than a day)
152+
### IDE のサポート
71153

72-
- How many times you get distracted and start playing with a cool new feature. 😉 &nbsp;Not judging, it also happened to us while building 3.0!
154+
[VSCode](https://code.visualstudio.com/) を公式の拡張機能である [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur), とともに使用することをお勧めします。それにより Vue3 の包括的な IDE のサポートを得ることができます。
73155

74-
- Which obsolete features you're using. Most can be upgraded with find-and-replace, but others might take a few minutes. If you're not currently following best practices according to [our styleguide](/style-guide/), Vue 3.0 will also try harder to force you to. This is a good thing in the long run, but could also mean a significant (though possibly overdue) refactor.
156+
## その他のプロジェクト
75157

76-
### If I upgrade to Vue 3, will I also have to upgrade Vuex and Vue Router?
158+
| Project | NPM | Repo |
159+
| --------------------- | ----------------------------- | -------------------- |
160+
| @vue/babel-plugin-jsx | [![rc][jsx-badge]][jsx-npm] | [[GitHub][jsx-code]] |
161+
| eslint-plugin-vue | [![ga][epv-badge]][epv-npm] | [[GitHub][epv-code]] |
162+
| @vue/test-utils | [![beta][vtu-badge]][vtu-npm] | [[GitHub][vtu-code]] |
163+
| vue-class-component | [![beta][vcc-badge]][vcc-npm] | [[GitHub][vcc-code]] |
164+
| vue-loader | [![beta][vl-badge]][vl-npm] | [[GitHub][vl-code]] |
165+
| rollup-plugin-vue | [![beta][rpv-badge]][rpv-npm] | [[GitHub][rpv-code]] |
77166

78-
Yes, currently both [Vuex](https://github.com/vuejs/vuex/tree/4.0#vuex-4) and [Vue Router](https://github.com/vuejs/vue-router-next) are in beta
167+
[jsx-badge]: https://img.shields.io/npm/v/@vue/babel-plugin-jsx.svg
168+
[jsx-npm]: https://www.npmjs.com/package/@vue/babel-plugin-jsx
169+
[jsx-code]: https://github.com/vuejs/jsx-next
170+
[vd-badge]: https://img.shields.io/npm/v/@vue/devtools/beta.svg
171+
[vd-npm]: https://www.npmjs.com/package/@vue/devtools/v/beta
172+
[vd-code]: https://github.com/vuejs/vue-devtools/tree/next
173+
[epv-badge]: https://img.shields.io/npm/v/eslint-plugin-vue.svg
174+
[epv-npm]: https://www.npmjs.com/package/eslint-plugin-vue
175+
[epv-code]: https://github.com/vuejs/eslint-plugin-vue
176+
[vtu-badge]: https://img.shields.io/npm/v/@vue/test-utils/next.svg
177+
[vtu-npm]: https://www.npmjs.com/package/@vue/test-utils/v/next
178+
[vtu-code]: https://github.com/vuejs/vue-test-utils-next
179+
[jsx-badge]: https://img.shields.io/npm/v/@ant-design-vue/babel-plugin-jsx.svg
180+
[jsx-npm]: https://www.npmjs.com/package/@ant-design-vue/babel-plugin-jsx
181+
[jsx-code]: https://github.com/vueComponent/jsx
182+
[vcc-badge]: https://img.shields.io/npm/v/vue-class-component/next.svg
183+
[vcc-npm]: https://www.npmjs.com/package/vue-class-component/v/next
184+
[vcc-code]: https://github.com/vuejs/vue-class-component/tree/next
185+
[vl-badge]: https://img.shields.io/npm/v/vue-loader/next.svg
186+
[vl-npm]: https://www.npmjs.com/package/vue-loader/v/next
187+
[vl-code]: https://github.com/vuejs/vue-loader/tree/next
188+
[rpv-badge]: https://img.shields.io/npm/v/rollup-plugin-vue/next.svg
189+
[rpv-npm]: https://www.npmjs.com/package/rollup-plugin-vue/v/next
190+
[rpv-code]: https://github.com/vuejs/rollup-plugin-vue/tree/next

0 commit comments

Comments
 (0)