-
Notifications
You must be signed in to change notification settings - Fork 838
Conversation
veaba
commented
Oct 24, 2020
- 补齐 “reactive” 的翻译
- 校对部分内容
- PR 来源 几个名词的译法讨论 #217
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
Co-authored-by: Jinjiang <zhaojinjiang@me.com>
Merge suggested change done. |
@@ -10,7 +10,7 @@ | |||
const obj = reactive({ count: 0 }) | |||
``` | |||
|
|||
响应式转换是“深”的——它影响所有嵌套 property。在基于 [ES2015 Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) 的实现中,返回的代理是**不**等于原始对象。建议只使用响应式代理,避免依赖原始对象。 | |||
响应式转换是“深层”的——它影响所有嵌套 property。在基于 [ES2015 Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) 的实现中,返回的代理是**不**等于原始对象。建议只使用响应式代理,避免依赖原始对象。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
响应式转换是“深层”的——它影响所有嵌套 property。在基于 [ES2015 Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) 的实现中,返回的代理是**不**等于原始对象。建议只使用响应式代理,避免依赖原始对象。 | |
响应式转换是“深层”的——它影响所有嵌套 property。在基于 [ES2015 Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) 的实现中,返回的代理是**不**等于原始对象的。建议只使用响应式代理,避免依赖原始对象。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里漏了一个“代理”没处理。另外关于 proxy 的翻译,这里也讨论一下:https://github.com/orgs/vuejs/teams/docs-cn/discussions/12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“代理”的问题需要抽取出来单独处理,我会在下一个 PR 中,修复以下 suggested change
@@ -225,7 +225,7 @@ watchEffect(() => { | |||
console.log(shallow.value.greet) | |||
}) | |||
|
|||
// 这不会触发效果,因为ref很浅 | |||
// 这不会触发作用,因为 ref 很浅层 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 这不会触发作用,因为 ref 很浅层 | |
// 这不会触发作用,因为 ref 是浅层的 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effect flush timing 之前译为了“副作用刷新时机”。那么单独的 effect 我们是否应该翻译成“副作用”?
/cc @Jinjiang
@@ -1343,7 +1343,7 @@ computed: { | |||
5. **组合 API** (使用组合 API 的入口点) | |||
- `setup` | |||
|
|||
6. **Local State** (本地的响应式 property) | |||
6. **Local State** (原生响应式 property) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该是本地的吧
@@ -363,18 +363,18 @@ import { ref, onMounted, watch, toRefs, computed } from 'vue' | |||
|
|||
// in our component | |||
setup (props) { | |||
// 使用 `toRefs` 创建对props的 `user` property 的响应式引用 | |||
// 使用 `toRefs` 创建对 props 的 `user` property 的响应式引用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 使用 `toRefs` 创建对 props 的 `user` property 的响应式引用 | |
// 使用 `toRefs` 创建对 props 中的 `user` property 的响应式引用 |
|
||
### 强制更新 | ||
|
||
如果你发现自己需要在 Vue 中强制更新,在 99.99%的情况下,你在某个地方犯了错误。例如,你可能依赖于 Vue 反应性系统未跟踪的状态,例如,在组件创建之后添加了 `data` 属性。 | ||
如果你发现自己需要在 Vue 中强制更新,在 99.99%的情况下,你在某个地方犯了错误。例如,你可能依赖于 Vue 响应性系统未跟踪的状态,例如,在组件创建之后添加了 `data` 属性。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果你发现自己需要在 Vue 中强制更新,在 99.99%的情况下,你在某个地方犯了错误。例如,你可能依赖于 Vue 响应性系统未跟踪的状态,例如,在组件创建之后添加了 `data` 属性。 | |
如果你发现自己需要在 Vue 中强制更新,在 99.99% 的情况下,你在某个地方犯了错误。例如,你可能依赖于 Vue 响应性系统未跟踪的状态,比如在组件创建之后添加了 `data` 属性。 |
减少重复