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
Show file tree
Hide file tree
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: update all dead links
  • Loading branch information
Megasu committed Nov 5, 2022
commit 123ab636dc3362c1a8496bea0d8f25eb395b3c3c
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/async-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ const asyncComponent = defineAsyncComponent(

有关异步组件用法的详细信息,请参阅:

- [指南:动态 & 异步组件](/guide/component-dynamic-async.html#在动态组件上使用-keep-alive)
- [迁移构建开关:`COMPONENT_ASYNC`](migration-build.html#兼容性配置)
- [指南:异步组件](https://cn.vuejs.org/guide/components/async.html)
- [迁移构建开关:`COMPONENT_ASYNC`](/zh/migration-build.html#兼容性配置)
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/attribute-coercion.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ badges:
</tbody>
</table>

[迁移构建开关:](migration-build.html#兼容性配置)
[迁移构建开关:](/zh/migration-build.html#兼容性配置)

- `ATTR_FALSE_VALUE`
- `ATTR_ENUMERATED_COERCION`
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/attrs-includes-class-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default {

在使用了 `inheritAttrs: false` 的组件中,请确保样式仍然符合预期。如果你之前依赖了 `class` 和 `style` 的特殊行为,那么一些视觉效果可能会遭到破坏,因为这些 attribute 现在可能被应用到了另一个元素中。

[迁移构建开关:`INSTANCE_ATTRS_CLASS_STYLE`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_ATTRS_CLASS_STYLE`](/zh/migration-build.html#兼容性配置)

## 参考

Expand Down
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/children.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export default {

## 3.x 更新

在 3.x 中,`$children` property 已被移除,且不再支持。如果你需要访问子组件实例,我们建议使用 [$refs](/guide/component-template-refs.html#模板引用)。
在 3.x 中,`$children` property 已被移除,且不再支持。如果你需要访问子组件实例,我们建议使用 [模板引用](https://cn.vuejs.org/guide/essentials/template-refs.html#template-refs)。

## 迁移策略

[迁移构建开关:`INSTANCE_CHILDREN`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_CHILDREN`](/zh/migration-build.html#兼容性配置)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/custom-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ mounted(el, binding, vnode) {
```

:::warning
有了[片段](/guide/migration/fragments.html#概览)的支持,组件可能会有多个根节点。当被应用于多根组件时,自定义指令将被忽略,并将抛出警告。
有了[片段](../new/fragments.html#概览)的支持,组件可能会有多个根节点。当被应用于多根组件时,自定义指令将被忽略,并将抛出警告。
:::

## 迁移策略

[迁移构建开关:`CUSTOM_DIR`](migration-build.html#兼容性配置)
[迁移构建开关:`CUSTOM_DIR`](/zh/migration-build.html#兼容性配置)
6 changes: 5 additions & 1 deletion src/zh/breaking-changes/custom-elements-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Vue.config.ignoredElements = ['plastic-button']
document.createElement('button', { is: 'plastic-button' })
```

[迁移构建开关:`COMPILER_IS_ON_ELEMENT`](migration-build.html#兼容性配置)
[迁移构建开关:`COMPILER_IS_ON_ELEMENT`](/zh/migration-build.html#兼容性配置)

## 使用 `vue:` 前缀来解决 DOM 内模板解析问题

Expand Down Expand Up @@ -128,3 +128,7 @@ Vue.config.ignoredElements = ['plastic-button']
- 将 `config.ignoredElements` 替换为 `vue-loader` 的 `compilerOptions` (使用构建步骤) 或 `app.config.compilerOptions.isCustomElement` (使用动态模板编译)

- 将所有非针对 `<component>` 标签的 `is` 用法更改为 `<component is="...">` (对于 SFC 模板) 或为其添加 `vue:` 前缀 (对于 DOM 内模板)。

## 参考

- [迁移指南 - Vue 与 Web Components](https://cn.vuejs.org/guide/extras/web-components.html)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/data-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const CompA = {
}
```

[迁移构建开关:`OPTIONS_DATA_FN`](migration-build.html#兼容性配置)
[迁移构建开关:`OPTIONS_DATA_FN`](/zh/migration-build.html#兼容性配置)

## 迁移策略

Expand All @@ -122,7 +122,7 @@ const CompA = {

对于依赖 mixin 的深度合并行为的用户,我们建议重构代码以完全避免这种依赖,因为 mixin 的深度合并非常隐式,这让代码逻辑更难理解和调试。

[迁移构建开关:](migration-build.html#兼容性配置)
[迁移构建开关:](/zh/migration-build.html#兼容性配置)

- `OPTIONS_DATA_FN`
- `OPTIONS_DATA_MERGE`
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/emits-option.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Vue 3 现在提供一个 `emits` 选项,和现有的 `props` 选项类似。

该选项也可以接收一个对象,该对象允许开发者定义传入事件参数的验证器,和 `props` 定义里的验证器类似。

更多信息请参阅[这部分特性的 API 文档](../../api/options-data.md#emits)。
更多信息请参阅[这部分特性的 API 文档](https://cn.vuejs.org/api/options-state.html#emits)。

## 迁移策略

Expand Down
10 changes: 5 additions & 5 deletions src/zh/breaking-changes/events-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {

## 迁移策略

[迁移构建开关:`INSTANCE_EVENT_EMITTER`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_EVENT_EMITTER`](/zh/migration-build.html#兼容性配置)

在 Vue 3 中,借助这些 API 从一个组件内部监听其自身触发的事件已经不再可能了。该用例没有办法迁移。

Expand Down Expand Up @@ -97,8 +97,8 @@ export default {

在绝大多数情况下,不鼓励使用全局的事件总线在组件之间进行通信。虽然在短期内往往是最简单的解决方案,但从长期来看,它维护起来总是令人头疼。根据具体情况来看,有多种事件总线的替代方案:

* [Prop](/guide/component-basics.html#passing-data-to-child-components-with-props) 和[事件](/guide/component-basics.html#listening-to-child-components-events)应该是父子组件之间沟通的首选。兄弟节点可以通过它们的父节点通信。
* [Provide 和 inject](/guide/component-provide-inject.html) 允许一个组件与它的插槽内容进行通信。这对于总是一起使用的紧密耦合的组件非常有用。
* `provide`/`inject` 也能够用于组件之间的远距离通信。它可以帮助避免“prop 逐级透传”,即 prop 需要通过许多层级的组件传递下去,但这些组件本身可能并不需要那些 prop。
* Props 和 事件 应该是父子组件之间沟通的首选。兄弟节点可以通过它们的父节点通信。
* `provide` / `inject` 允许一个组件与它的插槽内容进行通信。这对于总是一起使用的紧密耦合的组件非常有用。
* `provide` / `inject` 也能够用于组件之间的远距离通信。它可以帮助避免“prop 逐级透传”,即 prop 需要通过许多层级的组件传递下去,但这些组件本身可能并不需要那些 prop。
* Prop 逐级透传也可以通过重构以使用插槽来避免。如果一个中间组件不需要某些 prop,那么表明它可能存在关注点分离的问题。在该类组件中使用 slot 可以允许父节点直接为它创建内容,因此 prop 可以被直接传递而不需要中间组件的参与。
* [全局状态管理](/guide/state-management.html),比如 [Vuex](https://vuex.vuejs.org/zh/index.html)。
* [全局状态管理](https://cn.vuejs.org/guide/scaling-up/state-management.html),比如 [Pinia](https://pinia.vuejs.org/zh/index.html)。
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ badges:

我们建议用计算属性或方法代替过滤器,而不是使用过滤器。

[迁移构建开关:](migration-build.html#兼容性配置)
[迁移构建开关:](/zh/migration-build.html#兼容性配置)

- `FILTERS`
- `COMPILER_FILTERS`
Expand All @@ -82,7 +82,7 @@ badges:

如果在应用中全局注册了过滤器,那么在每个组件中用计算属性或方法调用来替换它可能就没那么方便了。

取而代之的是,你可以通过[全局属性](../../api/application-config.html#globalproperties)以让它能够被所有组件使用到:
取而代之的是,你可以通过[全局属性](https://cn.vuejs.org/api/application.html#app-config-globalproperties)以让它能够被所有组件使用到:

```js
// main.js
Expand Down
6 changes: 3 additions & 3 deletions src/zh/breaking-changes/functional-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ export default {

有关新的函数式组件的用法和对渲染函数的更改的详细信息,请参考:

- [迁移:渲染函数](/guide/migration/render-function-api.html)
- [指南:渲染函数](/guide/render-function.html)
- [迁移构建开关:`COMPONENT_FUNCTIONAL`](migration-build.html#兼容性配置)
- [迁移:渲染函数](./render-function-api.html)
- [指南:渲染函数](https://cn.vuejs.org/guide/extras/render-function.html#render-functions-jsx)
- [迁移构建开关:`COMPONENT_FUNCTIONAL`](/zh/migration-build.html#兼容性配置)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/inline-template-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ badges:

`inline-template` 的大多数用例都假设是在没有构建工具的环境中,也就是所有模板都直接写在 HTML 页面中。

[迁移构建开关:`COMPILER_INLINE_TEMPLATE`](migration-build.html#兼容性配置)
[迁移构建开关:`COMPILER_INLINE_TEMPLATE`](/zh/migration-build.html#兼容性配置)

### 选项 #1:使用 `<script>` 标签

Expand Down Expand Up @@ -81,4 +81,4 @@ const MyComp = {
</template>
```

> - 提示:在 3.x 中,由于原生[片段](/guide/migration/fragments)的支持,插槽也可以渲染为根节点!
> - 提示:在 3.x 中,由于原生[片段](../new/fragments)的支持,插槽也可以渲染为根节点!
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/keycode-modifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Vue.config.keyCodes = {

语法的限制导致某些特定字符无法被匹配,比如 `"`、`'`、`/`、`=`、`>` 和 `.`。对于这些字符,你应该在监听器内使用 `event.key` 代替。

[迁移构建开关:](migration-build.html#兼容性配置)
[迁移构建开关:](/zh/migration-build.html#兼容性配置)

- `CONFIG_KEY_CODES`
- `V_ON_KEYCODE_MODIFIER`
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/listeners-removed.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {

删除所有的 `$listeners` 用法。

[迁移构建开关:`INSTANCE_LISTENERS`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_LISTENERS`](/zh/migration-build.html#兼容性配置)

## 参考

Expand Down
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/mount-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ app.mount('#app')

## 迁移策略

[迁移构建开关:`GLOBAL_MOUNT_CONTAINER`](migration-build.html#兼容性配置)
[迁移构建开关:`GLOBAL_MOUNT_CONTAINER`](/zh/migration-build.html#兼容性配置)

## 参考

- [`mount` API](/api/application-api.html#mount)
- [`mount` API](https://cn.vuejs.org/api/application.html#app-mount)
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/props-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ badges:

## 概述

`propsData` 选项之前用于在创建 Vue 实例的过程中传入 prop,现在它被移除了。如果想为 Vue 3 应用的根组件传入 prop,请使用 [createApp](/api/global-api.html#createapp) 的第二个参数。
`propsData` 选项之前用于在创建 Vue 实例的过程中传入 prop,现在它被移除了。如果想为 Vue 3 应用的根组件传入 prop,请使用 [createApp](https://cn.vuejs.org/api/application.html#createapp) 的第二个参数。

## 2.x 语法

Expand Down
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/props-default-this.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ badges:

- 组件接收到的原始 prop 将作为参数传递给默认函数;

- [inject](../composition-api-provide-inject.md) API 可以在默认函数中使用。
- [inject](https://cn.vuejs.org/api/composition-api-dependency-injection.html#inject) API 可以在默认函数中使用。

```js
import { inject } from 'vue'
Expand All @@ -33,4 +33,4 @@ export default {

## 迁移策略

[迁移构建开关:`PROPS_DEFAULT_THIS`](migration-build.html#兼容性配置)
[迁移构建开关:`PROPS_DEFAULT_THIS`](/zh/migration-build.html#兼容性配置)
51 changes: 2 additions & 49 deletions src/zh/breaking-changes/render-function-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,6 @@ export default {
}
```

## 渲染函数签名更改

### 2.x 语法

在 2.x 中,`render` 函数自动接收参数,如 `h` 函数。

```js
// Vue 2 渲染函数示例
export default {
render(h) {
return h('div')
}
}
```

### 3.x 语法

在 3.x 中,由于 `render` 函数不再接收任何参数,它将主要在 `setup()` 函数内部使用。这还有一个好处:可以访问在作用域中声明的响应式状态和函数,以及传递给 `setup()` 的参数。

```js
import { h, reactive } from 'vue'

export default {
setup(props, { slots, attrs, emit }) {
const state = reactive({
count: 0
})

function increment() {
state.count++
}

// 返回渲染函数
return () =>
h(
'div',
{
onClick: increment
},
state.count
)
}
}
```

有关 `setup()` 如何工作的详细信息,请参考[组合式 API 指南](/guide/composition-api-introduction.html)。

## VNode Prop 格式化

### 2.x 语法
Expand Down Expand Up @@ -178,7 +131,7 @@ export default {

## 迁移策略

[迁移构建开关:`RENDER_FUNCTION`](migration-build.html#兼容性配置)
[迁移构建开关:`RENDER_FUNCTION`](/zh/migration-build.html#兼容性配置)

### 工具库作者

Expand All @@ -190,4 +143,4 @@ export default {

## 下一步

详细文档请参考 [Render 函数指南](/guide/render-function)!
详细文档请参考 [Render 函数指南](https://cn.vuejs.org/guide/extras/render-function.html)!
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/slots-unification.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ this.$slots.header()
1. 在 3.x 中,将所有 `this.$scopedSlots` 替换为 `this.$slots`。
2. 将所有 `this.$slots.mySlot` 替换为 `this.$slots.mySlot()`。

[迁移构建开关:`INSTANCE_SCOPED_SLOTS`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_SCOPED_SLOTS`](/zh/migration-build.html#兼容性配置)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/transition-as-root.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ export default {

## 参考

- [一些过渡的 class 被重命名](/guide/migration/transition.html)
- [`<TransitionGroup>` 不再默认渲染根元素](/guide/migration/transition-group.html)
- [一些过渡的 class 被重命名](./transition.html)
- [`<TransitionGroup>` 不再默认渲染根元素](./transition-group.html)
8 changes: 4 additions & 4 deletions src/zh/breaking-changes/transition-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ badges:

## 3.x 语法

在 Vue 3 中,我们有了[片段的支持](/guide/migration/fragments.html),因此组件不再*需要*根节点。所以,`<transition-group>` 不再默认渲染根节点。
在 Vue 3 中,我们有了[片段的支持](../new/fragments.html),因此组件不再*需要*根节点。所以,`<transition-group>` 不再默认渲染根节点。

- 如果像上面的示例一样,已经在 Vue 2 代码中定义了 `tag` attribute,那么一切都会和之前一样
- 如果没有定义 `tag` attribute,*而且*样式或其它行为依赖于 `<span>` 根元素的存在才能正常工作,那么只需将 `tag="span"` 添加到 `<transition-group>`:
Expand All @@ -37,9 +37,9 @@ badges:

## 迁移策略

[迁移构建开关:`TRANSITION_GROUP_ROOT`](migration-build.html#兼容性配置)
[迁移构建开关:`TRANSITION_GROUP_ROOT`](/zh/migration-build.html#兼容性配置)

## 参考

- [过渡的 class 名更改](/guide/migration/transition.html)
- [`<Transition>` 作为根元素不再从外界被切换](/guide/migration/transition-as-root.html)
- [过渡的 class 名更改](./transition.html)
- [`<Transition>` 作为根元素不再从外界被切换](./transition-as-root.html)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ badges:

## 参考

- [`<Transition>` 作为根元素不再能够从外界被切换](/guide/migration/transition-as-root.html)
- [`<TransitionGroup>` 现在默认不渲染包裹器元素](/guide/migration/transition-group.html)
- [`<Transition>` 作为根元素不再能够从外界被切换](./transition-as-root.html)
- [`<TransitionGroup>` 现在默认不渲染包裹器元素](./transition-group.html)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/vnode-lifecycle-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ badges:

绝大多数情况下只需要修改前缀。生命周期钩子 `beforeDestroy` 和 `destroyed` 已经分别被重命名为 `beforeUnmount` 和 `unmounted`,所以相应的事件名也需要更新。

[迁移构建开关:`INSTANCE_EVENT_HOOKS`](migration-build.html#兼容性配置)
[迁移构建开关:`INSTANCE_EVENT_HOOKS`](/zh/migration-build.html#兼容性配置)

## 参考

- [迁移指南:事件 API](/guide/migration/events-api.html)
- [迁移指南:事件 API](./events-api.html)
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ badges:

## 3.x 语法

当使用 [`watch` 选项](/api/options-data.html#watch)侦听数组时,只有在数组被替换时才会触发回调。换句话说,在数组被改变时侦听回调将不再被触发。要想在数组被改变时触发侦听回调,必须指定 `deep` 选项。
当使用 [`watch` 选项](https://cn.vuejs.org/api/options-state.html#watch)侦听数组时,只有在数组被替换时才会触发回调。换句话说,在数组被改变时侦听回调将不再被触发。要想在数组被改变时触发侦听回调,必须指定 `deep` 选项。

```js
watch: {
Expand All @@ -29,4 +29,4 @@ watch: {

如果你依赖于侦听数组的改变,添加 `deep` 选项以确保回调能被正确地触发。

[迁移构建开关:`WATCH_ARRAY`](migration-build.html#兼容性配置)
[迁移构建开关:`WATCH_ARRAY`](/zh/migration-build.html#兼容性配置)
2 changes: 1 addition & 1 deletion src/zh/new/fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Vue 3 现在正式支持了多根节点的组件,也就是片段!
</template>
```

有关 attribute 继承如何工作的详细信息,见[非 Prop 的 Attribute](/guide/component-attrs.html)。
有关 attribute 继承如何工作的详细信息,见[透传 Attributes](https://cn.vuejs.org/guide/components/attrs.html#fallthrough-attributes)。