Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init the Chinese translation and import existing files from a legacy repo #19

Merged
merged 49 commits into from
Nov 6, 2022
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ce3f418
translation: start the zh version from legacy repo (docs-next-zh-cn)
Jinjiang Nov 3, 2022
a289ca8
translation: init locales config and create missing md file
zhousg Nov 4, 2022
d04973a
translation: add todos
zhousg Nov 4, 2022
bf1aa8c
translation: add Overview content
zhousg Nov 5, 2022
5699783
translation: add New Framework-level Recommendations about Build Tool…
chaichai-fe Nov 5, 2022
c21ae04
translation: add New Framework-level Recommendations about Vue Router
chaichai-fe Nov 5, 2022
444face
translation: add New Framework-level Recommendations about State Mana…
chaichai-fe Nov 5, 2022
b654b1d
translation: add how to use the Vuex 4.0 to support Vue3
chaichai-fe Nov 5, 2022
9cd56d1
translation: add New Framework-level Recommendations about IDE Suppor…
chaichai-fe Nov 5, 2022
7eb6763
translation: add New Framework-level Recommendations about Typescript…
chaichai-fe Nov 5, 2022
a748090
Merge pull request #20 from zhousg/translation-zh
Jinjiang Nov 5, 2022
aba40c8
translation: add some warnings for unfinished Chinese docs
Jinjiang Nov 5, 2022
0b3b15a
translation: update vue-tsc link
zhousg Nov 5, 2022
327553a
translation: update vue-tsc link
zhousg Nov 5, 2022
51fdc7e
fix: VNode Lifecycle Event
Megasu Nov 5, 2022
8c4ba9b
Merge branch 'translation-zh' of https://github.com/zhousg/v3-migrati…
Megasu Nov 5, 2022
2731411
update jsx repo
Megasu Nov 5, 2022
d524075
Expose configureCompat types
Megasu Nov 5, 2022
e1c60db
update vue-router vuex url
Megasu Nov 5, 2022
ce07656
translation: add Breaking Changes about Global API and Template Direc…
chaichai-fe Nov 5, 2022
b4d89ba
translation: add Breaking Changes about Components
chaichai-fe Nov 5, 2022
c3aa503
translation: update dead links end components
zhousg Nov 5, 2022
b679407
Merge branch 'translation-zh' of github.com:zhousg/v3-migration-guide…
zhousg Nov 5, 2022
7e796d9
translation: Breaking Changes
Megasu Nov 5, 2022
123ab63
translation: update all dead links
Megasu Nov 5, 2022
67f89ae
translation: update zh index links
Megasu Nov 5, 2022
8b13111
translation: update migration-badges component
zhousg Nov 5, 2022
0e7cf9c
Merge branch 'translation-zh' of github.com:zhousg/v3-migration-guide…
zhousg Nov 5, 2022
25f3e9d
translation: update vue-tsc link
zhousg Nov 5, 2022
4f37dd4
translation: update vue-tsc link
zhousg Nov 5, 2022
6f4e60c
translation: update dead links end components
zhousg Nov 5, 2022
69a8ffe
fix: VNode Lifecycle Event
Megasu Nov 5, 2022
e356275
update jsx repo
Megasu Nov 5, 2022
7f5936a
Expose configureCompat types
Megasu Nov 5, 2022
8386b0b
update vue-router vuex url
Megasu Nov 5, 2022
5acbc97
translation: add Breaking Changes about Global API and Template Direc…
chaichai-fe Nov 5, 2022
1976ca6
translation: add Breaking Changes about Components
chaichai-fe Nov 5, 2022
b0a23ec
translation: update migration-badges component
zhousg Nov 5, 2022
28860f2
translation: Breaking Changes
Megasu Nov 5, 2022
16e08dc
translation: update all dead links
Megasu Nov 5, 2022
ba6de4f
translation: update zh index links
Megasu Nov 5, 2022
25309b0
Merge branch 'translation-zh' of github.com:zhousg/v3-migration-guide…
zhousg Nov 5, 2022
08d0668
translation: reset en md
zhousg Nov 6, 2022
231f2e7
translation: reset en md
zhousg Nov 6, 2022
adc693a
translation: updated relative link
zhousg Nov 6, 2022
9bd70fb
translation: updated badges locales
zhousg Nov 6, 2022
8bfcf62
Merge pull request #22 from zhousg/translation-zh
Jinjiang Nov 6, 2022
0336fa9
translation: fix broken links in zh
Jinjiang Nov 6, 2022
97ccd22
docs(zh): avoid internal weak map key error
Jinjiang Nov 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
translation: add Overview content
  • Loading branch information
zhousg committed Nov 5, 2022
commit bf1aa8c6824cf347500b2061ab2b91a34ada1e0f
118 changes: 116 additions & 2 deletions src/zh/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,119 @@
# Vue 3 迁移指南

本指南主要针对有 Vue 2经验的用户,他们希望了解 Vue 2和 Vue 3之间的变化。 **在使用 Vue 3之前,你不需要从头到尾阅读这篇文章。** 学习 Vue 3的推荐方法是阅读[新的文档](https://cn.vuejs.org)。
本指南主要针对有 Vue 2经验的用户,他们希望了解 Vue 2和 Vue 3之间的变化。**在使用 Vue 3之前,你不需要从头到尾阅读这篇文章**。学习 Vue 3的推荐方法是阅读[新的文档](https://cn.vuejs.org)。

<!-- TODO -->
<!-- VueMastery Start -->
<style>
.vue-mastery-link {
background-color: #f9f9f9;
border-radius: 8px;
padding: 8px 16px 8px 8px;
}

.vue-mastery-link a {
display: flex;
align-items: center;
text-decoration: none;
}

.vue-mastery-link .banner {
background-color: #f9f9f9;
border-radius: 4px;
width:96px;
height:56px;
object-fit: cover;
}

.vue-mastery-link .description {
flex: 1;
font-weight: 500;
font-size: 14px;
line-height: 20px;
color: #213547;
margin: 0 0 0 16px;
}

.vue-mastery-link .description span {
color: #42b883;
}

.vue-mastery-link .logo-wrapper {
position: relative;
width: 48px;
height: 48px;
border-radius: 50%;
background-color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
}

.vue-mastery-link .logo-wrapper img {
width: 25px;
object-fit: contain;
}

@media (max-width: 576px) {
.vue-mastery-link .banner {
width:56px;
}

.vue-mastery-link .description {
font-size: 12px;
line-height: 18px;
}
.vue-mastery-link .logo-wrapper {
position: relative;
width: 32px;
height: 32px;
}
}
</style>

<div class="vue-mastery-link">
<a href="https://www.vuemastery.com/migration-guide-cheat-sheet/" target="_blank">
<div class="banner-wrapper">
<img class="banner" alt="Vue Mastery banner" width="96px" height="56px" src="https://storage.googleapis.com/vue-mastery.appspot.com/flamelink/media/vuemastery-graphical-link-96x56.png" />
</div>
<p class="description">Get the free Migration Guide Cheat Sheet at <span>VueMastery.com</span></p>
<div class="logo-wrapper">
<img alt="Vue Mastery Logo" width="25px" src="https://storage.googleapis.com/vue-mastery.appspot.com/flamelink/media/vue-mastery-logo.png" />
</div>
</a>
</div>
<!-- VueMastery End -->

<style>
.note {
color: #476582;
}
</style>

## 值得注意的新特性

Vue 3中需要关注的一些新特性包括:

- [组合式 API](https://vuejs.org/guide/extras/composition-api-faq.html)<span class="note">\*</span>
- [单文件组件,组合式 API 语法糖 (`<script setup>`)](https://vuejs.org/api/sfc-script-setup.html)<span class="note">\*</span>
- [Teleport 组件](https://vuejs.org/guide/built-ins/teleport.html)
- [Fragments 片段](/new/fragments.html)
- [Emits 组件选项](https://vuejs.org/api/options-state.html#emits)<span class="note">\*\*</span>
- [`createRenderer` API from `@vue/runtime-core`](https://vuejs.org/api/custom-renderer.html) 用来创建自定义渲染函数
- [单文件组件,状态绑定 CSS 变量(`v-bind` in `<style>`)](https://vuejs.org/api/sfc-css-features.html#v-bind-in-css)<span class="note">\*</span>
- [SFC `<style scoped>` 新增全局规则和针对插槽内容规则](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md)
- [Suspense](https://vuejs.org/guide/built-ins/suspense.html) <sup class="warning">实验性</sup>

<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>
<sub class="note"><b>\*\*</b> Vue 2.7 中支持, 但仅用于类型推断</sub>

## 非兼容性改变

列出了Vue 2和Vue 3之间的非兼容性更改 [这里](/breaking-changes/)。

## 新的框架级别推荐

列出了新的框架级建议 [这里](/recommendations)。

## 迁移构建

如果您有一个现有的Vue 2项目或库,并打算将其升级到 Vue 3,我们将提供一个 Vue 3的构建版本,它提供与 Vue 2兼容的 api。查看 [迁移构建](/migration-build) 页面了解更多细节。