|
1 | 1 | # Vue 3 迁移指南
|
2 | 2 |
|
3 |
| -本指南主要针对有 Vue 2 经验的用户,他们希望了解 Vue 2 和 Vue 3 之间的变化。**在使用 Vue 3 之前,你不需要从头到尾阅读这篇文章**。学习 Vue 3 的推荐方法是阅读[新的文档](https://cn.vuejs.org)。 |
| 3 | +本指南主要是为有 Vue 2 经验的、希望了解 Vue 3 的新功能和更改的用户而提供的。**在试用 Vue 3 之前,你不必完整阅读这些内容**。学习 Vue 3 的推荐方法是阅读[新的文档](https://cn.vuejs.org)。 |
4 | 4 |
|
5 | 5 | <!-- VueMastery Start -->
|
6 | 6 | <style>
|
|
94 | 94 | Vue 3 中需要关注的一些新特性包括:
|
95 | 95 |
|
96 | 96 | - [组合式 API](https://cn.vuejs.org/guide/extras/composition-api-faq.html)<span class="note">\*</span>
|
97 |
| -- [单文件组件,组合式 API 语法糖 (`<script setup>`)](https://cn.vuejs.org/api/sfc-script-setup.html)<span class="note">\*</span> |
| 97 | +- [单文件组件中的组合式 API 语法糖 (`<script setup>`)](https://cn.vuejs.org/api/sfc-script-setup.html)<span class="note">\*</span> |
98 | 98 | - [Teleport 组件](https://cn.vuejs.org/guide/built-ins/teleport.html)
|
99 | 99 | - [Fragments 片段](./new/fragments.html)
|
100 | 100 | - [Emits 组件选项](https://cn.vuejs.org/api/options-state.html#emits)<span class="note">\*\*</span>
|
101 |
| -- [`createRenderer` API from `@vue/runtime-core`](https://cn.vuejs.org/api/custom-renderer.html) 用来创建自定义渲染函数 |
102 |
| -- [单文件组件,状态绑定 CSS 变量(`v-bind` in `<style>`)](https://cn.vuejs.org/api/sfc-css-features.html#v-bind-in-css)<span class="note">\*</span> |
103 |
| -- [SFC `<style scoped>` 新增全局规则和针对插槽内容规则](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md) |
| 101 | +- [来自 `@vue/runtime-core` 的 `createRenderer` API](https://cn.vuejs.org/api/custom-renderer.html) 用来创建自定义渲染函数 |
| 102 | +- [单文件组件中的状态驱动的 CSS 变量 (`<style>` 中的 `v-bind`)](https://cn.vuejs.org/api/sfc-css-features.html#v-bind-in-css)<span class="note">\*</span> |
| 103 | +- [SFC `<style scoped>` 新增全局规则和针对插槽内容的规则](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md) |
104 | 104 | - [Suspense](https://cn.vuejs.org/guide/built-ins/suspense.html) <sup class="warning">实验性</sup>
|
105 | 105 |
|
106 |
| -<sub class="note"><b>\*</b> 现在也支持在 <a href="https://blog.vuejs.org/posts/vue-2-7-naruto.html" target="_blank">Vue 2.7</a></sub><br> |
107 |
| -<sub class="note"><b>\*\*</b> Vue 2.7 中支持, 但仅用于类型推断</sub> |
| 106 | +<sub class="note"><b>\*</b> 现在也支持在 <a href="https://blog.vuejs.org/posts/vue-2-7-naruto.html" target="_blank">Vue 2.7</a> 中使用</sub><br> |
| 107 | +<sub class="note"><b>\*\*</b> Vue 2.7 中支持,但仅用于类型推断</sub> |
108 | 108 |
|
109 | 109 | ## 非兼容性改变
|
110 | 110 |
|
111 |
| -列出了 Vue 2 和 Vue 3 之间的非兼容性更改 [这里](./breaking-changes/)。 |
| 111 | +Vue 2 和 Vue 3 之间的非兼容性更改[在此](./breaking-changes/)列出。 |
112 | 112 |
|
113 |
| -## 新的框架级别推荐 |
| 113 | +## 新的推荐框架 |
114 | 114 |
|
115 |
| -列出了新的框架级建议 [这里](./recommendations)。 |
| 115 | +新的推荐框架[在此](./recommendations)列出。 |
116 | 116 |
|
117 |
| -## 迁移构建 |
| 117 | +## 用于迁移的构建版本 |
118 | 118 |
|
119 |
| -如果您有一个现有的 Vue 2 项目或库,并打算将其升级到 Vue 3,我们将提供一个 Vue 3 的构建版本,它提供与 Vue 2 兼容的 api。查看 [迁移构建](./migration-build) 页面了解更多细节。 |
| 119 | +如果您有一个现有的 Vue 2 项目或库,并打算将其升级到 Vue 3,我们将提供一个 Vue 3 的构建版本,它提供与 Vue 2 兼容的 api。查看[用于迁移的构建版本](./migration-build)页面了解更多细节。 |
0 commit comments