From a3f19244e83c3c357a5a4d1a51f75e05d96a0a45 Mon Sep 17 00:00:00 2001 From: Adashuai5 Date: Thu, 1 Sep 2022 00:58:29 +0800 Subject: [PATCH] fix: cn.vuejs.org -> v2.cn.vuejs.org --- README.md | 9 +++------ _config.yml | 6 ++---- src/v2/guide/components-edge-cases.md | 9 +++------ src/v2/guide/installation.md | 1 - src/v2/guide/list.md | 3 +-- src/v2/guide/reactivity.md | 3 +-- themes/vue/layout/layout.ejs | 1 - themes/vue/layout/page.ejs | 3 +-- themes/vue/layout/partials/header.ejs | 1 - themes/vue/layout/partials/main_menu.ejs | 3 +-- 10 files changed, 12 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index cceb1a3e4..ba3d47ca3 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ $ pnpm start # 开发服务器地址为 http://localhost:4000 * 发 issue 讨论译法或书写格式 * 发 issue 讨论部署或协作流程上的问题 - -有劳在翻译之前移步 [wiki](https://github.com/vuejs/cn.vuejs.org/wiki) 了解相关注意事项。 +有劳在翻译之前移步 [wiki](https://github.com/vuejs/v2.cn.vuejs.org/wiki) 了解相关注意事项。 **注意:** @@ -38,10 +37,8 @@ $ pnpm start # 开发服务器地址为 http://localhost:4000 ## 致谢 - -网站在创立之初得到了很多朋友们的帮助,大家一起分工协作完成了整站的翻译工作。[这个页面](https://cn.vuejs.org/about/)集中记录了大家这段时期的努力和付出,以表谢意! +网站在创立之初得到了很多朋友们的帮助,大家一起分工协作完成了整站的翻译工作。[这个页面](https://v2.cn.vuejs.org/about/)集中记录了大家这段时期的努力和付出,以表谢意! **感谢所有参与翻译的朋友们!** - -目前网站已处于维护状态,最新的文档/翻译贡献情况可以参阅 GitHub 提供的 [contributors](https://github.com/vuejs/cn.vuejs.org/graphs/contributors) 页面。 +目前网站已处于维护状态,最新的文档/翻译贡献情况可以参阅 GitHub 提供的 [contributors](https://github.com/vuejs/v2.cn.vuejs.org/graphs/contributors) 页面。 diff --git a/_config.yml b/_config.yml index c61b45d24..5337aa4ad 100644 --- a/_config.yml +++ b/_config.yml @@ -12,8 +12,7 @@ language: zh-CN # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' -# TODO: update when v3 becomes the main docsite -url: https://cn.vuejs.org +url: https://v2.cn.vuejs.org root: / permalink: :year/:month/:day/:title/ tag_dir: tags @@ -146,8 +145,7 @@ markdown: ## Docs: https://hexo.io/docs/one-command-deployment deploy: type: git - # TODO: update when v3 becomes the main docsite - repository: git@github.com:vuejs/cn.vuejs.org.git + repository: git@github.com:vuejs/v2.cn.vuejs.org.git branch: gh-pages feed: diff --git a/src/v2/guide/components-edge-cases.md b/src/v2/guide/components-edge-cases.md index edc6c5782..0cb0cf135 100644 --- a/src/v2/guide/components-edge-cases.md +++ b/src/v2/guide/components-edge-cases.md @@ -163,8 +163,7 @@ inject: ['getMap']

然而,依赖注入还是有负面影响的。它将你应用程序中的组件与它们当前的组织方式耦合起来,使重构变得更加困难。同时所提供的 property 是非响应式的。这是出于设计的考虑,因为使用它们来创建一个中心化规模化的数据跟使用 $root做这件事都是不够好的。如果你想要共享的这个 property 是你的应用特有的,而不是通用化的,或者如果你想在祖先组件中更新所提供的数据,那么这意味着你可能需要换用一个像 Vuex 这样真正的状态管理方案了。

- -你可以在 [API 参考文档](https://cn.vuejs.org/v2/api/#provide-inject)学习更多关于依赖注入的知识。 +你可以在 [API 参考文档](https://v2.cn.vuejs.org/v2/api/#provide-inject)学习更多关于依赖注入的知识。 ## 程序化的事件侦听器 @@ -236,8 +235,7 @@ methods: { 查阅[这个示例](https://codesandbox.io/s/github/vuejs/v2.vuejs.org/tree/master/src/v2/examples/vue-20-programmatic-event-listeners)可以了解到完整的代码。注意,即便如此,如果你发现自己不得不在单个组件里做很多建立和清理的工作,最好的方式通常还是创建更多的模块化组件。在这个例子中,我们推荐创建一个可复用的 `` 组件。 - -想了解更多程序化侦听器的内容,请查阅[实例方法 / 事件](https://cn.vuejs.org/v2/api/#实例方法-事件)相关的 API。 +想了解更多程序化侦听器的内容,请查阅[实例方法 / 事件](https://v2.cn.vuejs.org/v2/api/#实例方法-事件)相关的 API。

注意 Vue 的事件系统不同于浏览器的 EventTarget API。尽管它们工作起来是相似的,但是 $emit$on, 和 $off 并不是 dispatchEventaddEventListenerremoveEventListener 的别名。

@@ -365,8 +363,7 @@ x-template 需要定义在 Vue 所属的 DOM 元素外。

如果你发现你自己需要在 Vue 中做一次强制更新,99.9% 的情况,是你在某个地方做错了事。

- -你可能还没有留意到[数组](https://cn.vuejs.org/v2/guide/list.html#注意事项)或[对象](https://cn.vuejs.org/v2/guide/list.html#对象变更检测注意事项)的变更检测注意事项,或者你可能依赖了一个未被 Vue 的响应式系统追踪的状态。 +你可能还没有留意到[数组](https://v2.cn.vuejs.org/v2/guide/list.html#注意事项)或[对象](https://v2.cn.vuejs.org/v2/guide/list.html#对象变更检测注意事项)的变更检测注意事项,或者你可能依赖了一个未被 Vue 的响应式系统追踪的状态。 然而,如果你已经做到了上述的事项仍然发现在极少数的情况下需要手动强制更新,那么你可以通过 [`$forceUpdate`](../api/#vm-forceUpdate) 来做这件事。 diff --git a/src/v2/guide/installation.md b/src/v2/guide/installation.md index 2e9b05606..b6070c79f 100644 --- a/src/v2/guide/installation.md +++ b/src/v2/guide/installation.md @@ -32,7 +32,6 @@ Vue 在其所有项目中公布的功能和行为都遵循[语义化版本控制

在开发环境下不要使用压缩版本,不然你就失去了所有常见错误相关的警告!

-
开发版本包含完整的警告和调试模式 diff --git a/src/v2/guide/list.md b/src/v2/guide/list.md index 7b3407546..1cf242c1f 100644 --- a/src/v2/guide/list.md +++ b/src/v2/guide/list.md @@ -237,8 +237,7 @@ new Vue({

不要使用对象或数组之类的非基本类型值作为 `v-for` 的 `key`。请用字符串或数值类型的值。

- -更多 `key` attribute 的细节用法请移步至 [`key` 的 API 文档](https://cn.vuejs.org/v2/api/#key)。 +更多 `key` attribute 的细节用法请移步至 [`key` 的 API 文档](https://v2.cn.vuejs.org/v2/api/#key)。 ## 数组更新检测 diff --git a/src/v2/guide/reactivity.md b/src/v2/guide/reactivity.md index fb02adb9a..8063865c6 100644 --- a/src/v2/guide/reactivity.md +++ b/src/v2/guide/reactivity.md @@ -88,8 +88,7 @@ Vue.set(vm.items, indexOfItem, newValue) vm.items.splice(indexOfItem, 1, newValue) ``` - -你也可以使用 [`vm.$set`](https://cn.vuejs.org/v2/api/#vm-set) 实例方法,该方法是全局方法 `Vue.set` 的一个别名: +你也可以使用 [`vm.$set`](https://v2.cn.vuejs.org/v2/api/#vm-set) 实例方法,该方法是全局方法 `Vue.set` 的一个别名: ``` js vm.$set(vm.items, indexOfItem, newValue) diff --git a/themes/vue/layout/layout.ejs b/themes/vue/layout/layout.ejs index 7c9e43d50..af5e54cba 100644 --- a/themes/vue/layout/layout.ejs +++ b/themes/vue/layout/layout.ejs @@ -10,7 +10,6 @@ - diff --git a/themes/vue/layout/page.ejs b/themes/vue/layout/page.ejs index ae5641a44..e6afc233a 100644 --- a/themes/vue/layout/page.ejs +++ b/themes/vue/layout/page.ejs @@ -56,8 +56,7 @@ <%- partial('partials/ad-text') %> <%_ } _%> 发现错误?想参与编辑? - - + 在 GitHub 上编辑此页! v3.x 的文档在这里
diff --git a/themes/vue/layout/partials/main_menu.ejs b/themes/vue/layout/partials/main_menu.ejs index 510313f51..325b30e72 100644 --- a/themes/vue/layout/partials/main_menu.ejs +++ b/themes/vue/layout/partials/main_menu.ejs @@ -15,6 +15,5 @@ <%- partial('partials/support_vue_dropdown') %> <%- partial('partials/language_dropdown') %> - -
  • 参与翻译
  • +
  • 参与翻译