Skip to content

Commit

Permalink
translation: fix broken links in zh
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang committed Nov 6, 2022
1 parent 8bfcf62 commit 0336fa9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/zh/breaking-changes/array-refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {

## 迁移策略

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

- `V_FOR_REF`
- `COMPILER_V_FOR_REF`
83 changes: 41 additions & 42 deletions src/zh/breaking-changes/introduction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 介绍

::: info 提示
刚接触 Vue.js?先从[基础指南](/guide/introduction.html)开始吧。
刚接触 Vue.js?先从[基础指南](http://cn.vuejs.org/guide/introduction.html)开始吧。
:::

本指南主要是为有 Vue 2 经验的、希望了解 Vue 3 的新功能和更改的用户而提供的。**在试用 Vue 3 之前,你不必完整阅读这些内容**。虽然看起来有很多变化,但很多你已经了解和喜欢 Vue 的部分仍是一样的。不过我们希望尽可能全面,并为每处变化提供详细的例子。
Expand All @@ -20,14 +20,13 @@ Generated from
[![观看视频 What's new in Vue 3 (英文)](/cn/whatsnew.jpg)](https://vimeo.com/440868720)
to replace this iframe with an image link to avoid the assets from vimeo being blocked
<iframe src="https://player.vimeo.com/video/440868720" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
-->
<style>
#video-whatsnew { display: block; width: 640px; height: 360px; }
#video-whatsnew:hover { outline: 3px #3eaf7c solid; }
</style>
<a href="https://vimeo.com/440868720" id="video-whatsnew" target="_blank" rel="noopener noreferrer"><img src="/cn/whatsnew.jpg" alt="观看视频 What's new in Vue 3 (英文)" /></a>

<a href="https://vimeo.com/440868720" id="video-whatsnew" target="_blank" rel="noopener noreferrer"><img src="/cn/whatsnew.jpg" alt="观看视频 What's new in Vue 3 (英文)" style="display: block; width: 640px; height: 360px;" /></a>
开始学习 Vue 3 [Vue Mastery](https://www.vuemastery.com/courses-path/vue3)。
-->

## 快速开始

Expand All @@ -52,83 +51,83 @@ to replace this iframe with an image link to avoid the assets from vimeo being b

## 用于迁移的构建版本

如果你打算要将一个基于 Vue 2 的项目或者库升级到 Vue 3,我们提供了一个与 Vue 2 API 兼容的 Vue 3 构建版本,详情见[用于迁移的构建版本](./migration-build.html)。
如果你打算要将一个基于 Vue 2 的项目或者库升级到 Vue 3,我们提供了一个与 Vue 2 API 兼容的 Vue 3 构建版本,详情见[用于迁移的构建版本](../migration-build.html)。

## 值得注意的新特性

Vue 3 中一些需要关注的新功能包括:

- [组合式 API](/guide/composition-api-introduction.html)
- [Teleport](/guide/teleport.html)
- [片段](/guide/migration/fragments.html)
- [Emits 组件选项](/guide/component-custom-events.html)
- [组合式 API](https://cn.vuejs.org/guide/composition-api-introduction.html)
- [Teleport](https://cn.vuejs.org/guide/teleport.html)
- [片段](../new/fragments.html)
- [Emits 组件选项](https://cn.vuejs.org/guide/component-custom-events.html)
- [来自 `@vue/runtime-core``createRenderer` API](https://github.com/vuejs/vue-next/tree/master/packages/runtime-core),用于创建自定义渲染器
- [单文件组件组合式 API 语法糖 (`<script setup>`)](/api/sfc-script-setup.html)
- [单文件组件状态驱动的 CSS 变量 (`<style>` 中的 `v-bind`)](/api/sfc-style.html#状态驱动的动态-css)
- [单文件组件组合式 API 语法糖 (`<script setup>`)](https://cn.vuejs.org/api/sfc-script-setup.html)
- [单文件组件状态驱动的 CSS 变量 (`<style>` 中的 `v-bind`)](https://cn.vuejs.org/api/sfc-style.html#状态驱动的动态-css)
- [SFC `<style scoped>` 现在可以包含全局规则或只针对插槽内容的规则](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0023-scoped-styles-changes.md)
- [Suspense](/guide/migration/suspense.html) <Badge text="实验性" type="warning" />
- [Suspense](./suspense.html) <Badge text="实验性" type="warning" />

## 非兼容的变更

下面列出了从 2.x 开始的非兼容的变更:

### 全局 API

- [全局 Vue API 已更改为使用应用程序实例](/guide/migration/global-api.html)
- [全局和内部 API 已经被重构为支持 tree-shake](/guide/migration/global-api-treeshaking.html)
- [全局 Vue API 已更改为使用应用程序实例](./global-api.html)
- [全局和内部 API 已经被重构为支持 tree-shake](./global-api-treeshaking.html)

### 模板指令

- [组件上 `v-model` 用法已更改,以替换 `v-bind.sync`](/guide/migration/v-model.html)
- [`<template v-for>` 和非 `v-for` 节点上的 `key` 用法已更改](/guide/migration/key-attribute.html)
- [在同一元素上使用的 `v-if``v-for` 优先级已更改](/guide/migration/v-if-v-for.html)
- [`v-bind="object"` 现在排序敏感](/guide/migration/v-bind.html)
- [组件上 `v-model` 用法已更改,以替换 `v-bind.sync`](./v-model.html)
- [`<template v-for>` 和非 `v-for` 节点上的 `key` 用法已更改](./key-attribute.html)
- [在同一元素上使用的 `v-if``v-for` 优先级已更改](./v-if-v-for.html)
- [`v-bind="object"` 现在排序敏感](./v-bind.html)
- [`v-on:event.native` 修饰符已移除](./v-on-native-modifier-removed.md)
- [`v-for` 中的 `ref` 不再注册 ref 数组](/guide/migration/array-refs.html)
- [`v-for` 中的 `ref` 不再注册 ref 数组](./array-refs.html)

### 组件

- [只能使用普通函数创建函数式组件](/guide/migration/functional-components.html)
- [`functional` attribute 在单文件组件 (SFC) 的 `<template>``functional` 组件选项中被废弃](/guide/migration/functional-components.html)
- [异步组件现在需要使用 `defineAsyncComponent` 方法来创建](/guide/migration/async-components.html)
- [只能使用普通函数创建函数式组件](./functional-components.html)
- [`functional` attribute 在单文件组件 (SFC) 的 `<template>``functional` 组件选项中被废弃](./functional-components.html)
- [异步组件现在需要使用 `defineAsyncComponent` 方法来创建](./async-components.html)
- [组件事件现在需要在 `emits` 选项中声明](./emits-option.md)

### 渲染函数

- [渲染函数 API 更改](/guide/migration/render-function-api.html)
- [`$scopedSlots` property 已移除,所有插槽都通过 `$slots` 作为函数暴露](/guide/migration/slots-unification.html)
- [渲染函数 API 更改](./render-function-api.html)
- [`$scopedSlots` property 已移除,所有插槽都通过 `$slots` 作为函数暴露](./slots-unification.html)
- [`$listeners` 被移除或整合到 `$attrs`](./listeners-removed)
- [`$attrs` 现在包含 `class``style` attribute](./attrs-includes-class-style.md)

### 自定义元素

- [自定义元素检测现在在模板编译时执行](/guide/migration/custom-elements-interop.html)
- [特殊的 `is` attribute 的使用被严格限制在被保留的 `<component>` 标签中](/guide/migration/custom-elements-interop.html#定制内置元素)
- [自定义元素检测现在在模板编译时执行](./custom-elements-interop.html)
- [特殊的 `is` attribute 的使用被严格限制在被保留的 `<component>` 标签中](./custom-elements-interop.html#定制内置元素)

### 其他小改变

- `destroyed` 生命周期选项被重命名为 `unmounted`
- `beforeDestroy` 生命周期选项被重命名为 `beforeUnmount`
- [`default` prop 工厂函数不再可以访问 `this` 上下文](/guide/migration/props-default-this.html)
- [自定义指令的 API 已更改为与组件生命周期一致,且 `binding.expression` 已移除](/guide/migration/custom-directives.html)
- [`data` 选项应始终被声明为一个函数](/guide/migration/data-option.html)
- [来自 mixin 的 `data` 选项现在为浅合并](/guide/migration/data-option.html#mixin-合并行为变更)
- [Attribute 强制策略已更改](/guide/migration/attribute-coercion.html)
- [一些过渡的 class 被重命名](/guide/migration/transition.html)
- [`<TransitionGroup>` 不再默认渲染包裹元素](/guide/migration/transition-group.html)
- [当侦听一个数组时,只有当数组被替换时,回调才会触发,如果需要在变更时触发,则必须指定 `deep` 选项](/guide/migration/watch.html)
- [`default` prop 工厂函数不再可以访问 `this` 上下文](./props-default-this.html)
- [自定义指令的 API 已更改为与组件生命周期一致,且 `binding.expression` 已移除](./custom-directives.html)
- [`data` 选项应始终被声明为一个函数](./data-option.html)
- [来自 mixin 的 `data` 选项现在为浅合并](./data-option.html#mixin-合并行为变更)
- [Attribute 强制策略已更改](./attribute-coercion.html)
- [一些过渡的 class 被重命名](./transition.html)
- [`<TransitionGroup>` 不再默认渲染包裹元素](./transition-group.html)
- [当侦听一个数组时,只有当数组被替换时,回调才会触发,如果需要在变更时触发,则必须指定 `deep` 选项](./watch.html)
- 没有特殊指令的标记 (`v-if/else-if/else``v-for``v-slot`) 的 `<template>` 现在被视为普通元素,并将渲染为原生的 `<template>` 元素,而不是渲染其内部内容。
- [已挂载的应用不会取代它所挂载的元素](/guide/migration/mount-changes.html)
- [生命周期的 `hook:` 事件前缀改为 `vnode-`](/guide/migration/vnode-lifecycle-events.html)
- [已挂载的应用不会取代它所挂载的元素](./mount-changes.html)
- [生命周期的 `hook:` 事件前缀改为 `vnode-`](./vnode-lifecycle-events.html)

### 被移除的 API

- [`keyCode` 作为 `v-on` 修饰符的支持](/guide/migration/keycode-modifiers.html)
- [$on$off$once 实例方法](/guide/migration/events-api.html)
- [过滤器 (filter)](/guide/migration/filters.html)
- [内联模板 attribute](/guide/migration/inline-template-attribute.html)
- [`$children` 实例 property](/guide/migration/children.html)
- [`propsData` 选项](/guide/migration/props-data.html)
- [`keyCode` 作为 `v-on` 修饰符的支持](./keycode-modifiers.html)
- [$on$off$once 实例方法](./events-api.html)
- [过滤器 (filter)](./filters.html)
- [内联模板 attribute](./inline-template-attribute.html)
- [`$children` 实例 property](./children.html)
- [`propsData` 选项](./props-data.html)
- `$destroy` 实例方法。用户不应再手动管理单个 Vue 组件的生命周期。
- 全局函数 `set``delete` 以及实例方法 `$set``$delete`。基于代理的变化检测已经不再需要它们了。

Expand Down
4 changes: 2 additions & 2 deletions src/zh/breaking-changes/suspense.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Suspense 是一个试验性的新特性,其 API 可能随时会发生变动。

`<suspense>` 组件提供了另一个方案,允许将等待过程提升到组件树中处理,而不是在单个组件中。

一个常见的[异步组件](/guide/component-dynamic-async.html#异步组件)用例:
一个常见的[异步组件](https://cn.vuejs.org/guide/component-dynamic-async.html#异步组件)用例:

```vue{2-4,6,17}
<template>
Expand Down Expand Up @@ -79,7 +79,7 @@ export default {

## 和其它组件结合

`<suspense>`[`<transition>`](/api/built-in-components.html#transition)[`<keep-alive>`](/api/built-in-components.html#keep-alive) 组件相结合是常见的情形。这些组件的嵌套顺序对于它们的正确工作很重要。
`<suspense>`[`<transition>`](https://cn.vuejs.org/api/built-in-components.html#transition)[`<keep-alive>`](https://cn.vuejs.org/api/built-in-components.html#keep-alive) 组件相结合是常见的情形。这些组件的嵌套顺序对于它们的正确工作很重要。

额外的,这些组件经常用于衔接 [Vue Router](https://router.vuejs.org/zh/)`<router-view>` 组件。

Expand Down

0 comments on commit 0336fa9

Please sign in to comment.