Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Commit 75387a3

Browse files
authored
docs: fix unwrap translate (#542)
1 parent 5acbff2 commit 75387a3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/api/options-composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
</script>
222222
```
223223

224-
请注意,从 `setup` 返回的 [refs](refs-api.html#ref) 在模板中访问时会自动展开,因此模板中不需要 `.value`
224+
请注意,从 `setup` 返回的 [refs](refs-api.html#ref) 在模板中访问时会自动解包,因此模板中不需要 `.value`
225225

226226
- **渲染函数/JSX 的方法**
227227

src/guide/composition-api-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
}
9393
```
9494

95-
`attrs``slots` 是有状态的对象,它们总是会随组件本身的更新而更新。这意味着你应该避免对它们进行解构,并始终以 `attrs.x``slots.x` 的方式引用 property。请注意,与 `props` 不同,`attrs`` slots`****响应式的。如果你打算根据 `attrs``slots` 更改应用副作用,那么应该在 `onUpdated` 生命周期钩子中执行此操作。
95+
`attrs``slots` 是有状态的对象,它们总是会随组件本身的更新而更新。这意味着你应该避免对它们进行解构,并始终以 `attrs.x``slots.x` 的方式引用 property。请注意,与 `props` 不同,`attrs``slots`****响应式的。如果你打算根据 `attrs``slots` 更改应用副作用,那么应该在 `onUpdated` 生命周期钩子中执行此操作。
9696

9797
## 访问组件的 property
9898

@@ -137,7 +137,7 @@ export default {
137137
</script>
138138
```
139139

140-
注意,从 `setup` 返回的 [refs](../api/refs-api.html#ref) 在模板中访问时是[被自动浅解包](/guide/reactivity-fundamentals.html#ref-展开)的,因此不应在模板中使用 `.value`
140+
注意,从 `setup` 返回的 [refs](../api/refs-api.html#ref) 在模板中访问时是[被自动浅解包](/guide/reactivity-fundamentals.html#ref-解包)的,因此不应在模板中使用 `.value`
141141

142142
## 使用渲染函数
143143

src/guide/reactivity-fundamentals.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ count.value++
4343
console.log(count.value) // 1
4444
```
4545

46-
### Ref 展开
46+
### Ref 解包
4747

48-
当 ref 作为渲染上下文 (从 [setup()](composition-api-setup.html) 中返回的对象) 上的 property 返回并可以在模板中被访问时,它将自动浅层次展开内部值。只有访问嵌套的 ref 时需要在模板中添加 `.value`
48+
当 ref 作为渲染上下文 (从 [setup()](composition-api-setup.html) 中返回的对象) 上的 property 返回并可以在模板中被访问时,它将自动浅层次解包内部值。只有访问嵌套的 ref 时需要在模板中添加 `.value`
4949

5050
```vue-html
5151
<template>
@@ -85,7 +85,7 @@ nested: reactive({
8585

8686
### 访问响应式对象
8787

88-
`ref` 作为响应式对象的 property 被访问或更改时,为使其行为类似于普通 property,它会自动展开内部值
88+
`ref` 作为响应式对象的 property 被访问或更改时,为使其行为类似于普通 property,它会自动解包内部值
8989

9090
```js
9191
const count = ref(0)
@@ -109,7 +109,7 @@ console.log(state.count) // 2
109109
console.log(count.value) // 1
110110
```
111111

112-
Ref 展开仅发生在被响应式 `Object` 嵌套的时候。当从 `Array` 或原生集合类型如 [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)访问 ref 时,不会进行展开
112+
Ref 解包仅发生在被响应式 `Object` 嵌套的时候。当从 `Array` 或原生集合类型如 [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)访问 ref 时,不会进行解包
113113

114114
```js
115115
const books = reactive([ref('Vue 3 Guide')])

0 commit comments

Comments
 (0)