Skip to content

Commit d4d0430

Browse files
authored
docs: update on object spread syntax (#1642)
1 parent e60bc76 commit d4d0430

File tree

14 files changed

+14
-14
lines changed

14 files changed

+14
-14
lines changed

Diff for: docs/fr/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Puisqu'un état de store de Vuex est rendu réactif par Vue, lorsque nous mutons
8888

8989
- Utiliser `Vue.set(obj, 'newProp', 123)`, ou
9090

91-
- Remplacer cet objet par un nouvel objet. Par exemple, en utilisant [opérateur de décomposition](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs/Op%C3%A9rateur_de_d%C3%A9composition) (stage-2), il est possible d'écrire :
91+
- Remplacer cet objet par un nouvel objet. Par exemple, en utilisant [opérateur de décomposition](https://github.com/tc39/proposal-object-rest-spread), il est possible d'écrire :
9292

9393
``` js
9494
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/fr/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ computed: mapState([
9696

9797
### Opérateur de décomposition
9898

99-
Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/sebmarkbage/ecmascript-rest-spread) (qui est une proposition stage-4 ECMAScript), nous pouvons grandement simplifier la syntaxe :
99+
Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/tc39/proposal-object-rest-spread), nous pouvons grandement simplifier la syntaxe :
100100

101101
``` js
102102
computed: {

Diff for: docs/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Since a Vuex store's state is made reactive by Vue, when we mutate the state, Vu
8888

8989
- Use `Vue.set(obj, 'newProp', 123)`, or
9090

91-
- Replace that Object with a fresh one. For example, using the [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) we can write it like this:
91+
- Replace that Object with a fresh one. For example, using the [object spread syntax](https://github.com/tc39/proposal-object-rest-spread) we can write it like this:
9292

9393
``` js
9494
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ computed: mapState([
9898

9999
### Object Spread Operator
100100

101-
Note that `mapState` returns an object. How do we use it in combination with other local computed properties? Normally, we'd have to use a utility to merge multiple objects into one so that we can pass the final object to `computed`. However with the [object spread operator](https://github.com/sebmarkbage/ecmascript-rest-spread) (which is a stage-4 ECMAScript proposal), we can greatly simplify the syntax:
101+
Note that `mapState` returns an object. How do we use it in combination with other local computed properties? Normally, we'd have to use a utility to merge multiple objects into one so that we can pass the final object to `computed`. However with the [object spread operator](https://github.com/tc39/proposal-object-rest-spread), we can greatly simplify the syntax:
102102

103103
``` js
104104
computed: {

Diff for: docs/ja/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Vuex ストアの状態は Vue によってリアクティブになっている
9090

9191
- `Vue.set(obj, 'newProp', 123)` を使用する。あるいは
9292

93-
- 全く新しいオブジェクトで既存のオブジェクトを置き換える。例えば、[スプレッドシンタックス(object spread syntax)](https://github.com/sebmarkbage/ecmascript-rest-spread) を使用して、次のように書くことができます:
93+
- 全く新しいオブジェクトで既存のオブジェクトを置き換える。例えば、[スプレッドシンタックス(object spread syntax)](https://github.com/tc39/proposal-object-rest-spread) を使用して、次のように書くことができます:
9494

9595
``` js
9696
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/ja/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ computed: mapState([
9393

9494
### オブジェクトスプレッド演算子
9595

96-
`mapState` はオブジェクトを返すことに注意しましょう。どうやって、他のローカル算出プロパティと組み合わせるのでしょうか? 通常、最終的にひとつのオブジェクトを `computed` に渡せるように、複数のオブジェクトをひとつにマージするユーティリティを使わなければいけません。しかし、[オブジェクトスプレッド演算子](https://github.com/sebmarkbage/ecmascript-rest-spread) (ECMAScript プロポーサルの state-4 です) で、シンタックスをかなり単純にできます:
96+
`mapState` はオブジェクトを返すことに注意しましょう。どうやって、他のローカル算出プロパティと組み合わせるのでしょうか? 通常、最終的にひとつのオブジェクトを `computed` に渡せるように、複数のオブジェクトをひとつにマージするユーティリティを使わなければいけません。しかし、[オブジェクトスプレッド演算子](https://github.com/tc39/proposal-object-rest-spread)で、シンタックスをかなり単純にできます:
9797

9898
```js
9999
computed: {

Diff for: docs/kr/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Vuex 저장소의 상태는 Vue에 의해 반응하므로, 상태를 변경하
8787

8888
- `Vue.set(obj, 'newProp', 123)`을 사용하거나,
8989

90-
- 객체를 새로운 것으로 교체하십시오. 예를 들어, 3 단계 [객체 확산 문법](https://github.com/sebmarkbage/ecmascript-rest-spread)을 사용하면 다음과 같이 작성할 수 있습니다.
90+
- 객체를 새로운 것으로 교체하십시오. 예를 들어, [객체 확산 문법](https://github.com/tc39/proposal-object-rest-spread)을 사용하면 다음과 같이 작성할 수 있습니다.
9191

9292
``` js
9393
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/kr/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ computed: mapState([
9696

9797
### 객체 전개 연산자 (Object Spread Operator)
9898

99-
`mapState`는 객체를 반환합니다. 다른 로컬 영역의 계산된 속성과 함께 사용하려면 어떻게 해야 하나요? 일반적으로, 최종 객체를 `computed`에 전달할 수 있도록 여러 객체를 하나로 병합하는 유틸리티를 사용해야합니다. 그러나 (3 단계 ECMAScript 스펙) [객체 전개 연산자 (Object Spread Operator)](https://github.com/sebmarkbage/ecmascript-rest-spread)을 사용하면 문법을 매우 단순화 할 수 있습니다.
99+
`mapState`는 객체를 반환합니다. 다른 로컬 영역의 계산된 속성과 함께 사용하려면 어떻게 해야 하나요? 일반적으로, 최종 객체를 `computed`에 전달할 수 있도록 여러 객체를 하나로 병합하는 유틸리티를 사용해야합니다. 그러나 [객체 전개 연산자 (Object Spread Operator)](https://github.com/tc39/proposal-object-rest-spread)을 사용하면 문법을 매우 단순화 할 수 있습니다.
100100

101101
``` js
102102
computed: {

Diff for: docs/ptbr/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Como o estado de um _store_ Vuex é reativado pelo Vue, quando alteramos o estad
8888

8989
- Usar `Vue.set(obj, 'newProp', 123)`, ou
9090

91-
- Substitua esse objeto por um novo. Por exemplo, usando o _stage-3_ [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) nós podemos escrevê-lo assim:
91+
- Substitua esse objeto por um novo. Por exemplo, usando o [object spread syntax](https://github.com/tc39/proposal-object-rest-spread) nós podemos escrevê-lo assim:
9292

9393
``` js
9494
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/ptbr/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ computed: mapState([
9898

9999
### Objeto Spread Operator
100100

101-
Observe que _mapState_ retorna um objeto. Como usá-lo em combinação com outros dados computados locais? Normalmente, teríamos que usar um utilitário para fundir vários objetos em um para que possamos passar o objeto final para `computado`. No entanto, com o [Spread Operator](https://github.com/sebmarkbage/ecmascript-rest-spread) (que é uma proposta de ECMAScript em estágio 4), podemos simplificar muito a sintaxe:
101+
Observe que _mapState_ retorna um objeto. Como usá-lo em combinação com outros dados computados locais? Normalmente, teríamos que usar um utilitário para fundir vários objetos em um para que possamos passar o objeto final para `computado`. No entanto, com o [Spread Operator](https://github.com/tc39/proposal-object-rest-spread), podemos simplificar muito a sintaxe:
102102

103103
``` js
104104
computed: {

Diff for: docs/ru/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ mutations: {
8989

9090
* Использовать `Vue.set(obj, 'newProp', 123)`, или
9191

92-
* Целиком заменить старый объект новым. Например, используя [синтаксис расширения объектов](https://github.com/sebmarkbage/ecmascript-rest-spread) можно написать так:
92+
* Целиком заменить старый объект новым. Например, используя [синтаксис расширения объектов](https://github.com/tc39/proposal-object-rest-spread) можно написать так:
9393

9494
```js
9595
state.obj = { ...state.obj, newProp: 123 };

Diff for: docs/ru/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ computed: mapState([
9999

100100
### Оператор распространения объектов
101101

102-
Обратите внимание, `mapState` возвращает объект. Как же его использовать в сочетании с другими локальными вычисляемыми свойствами? Для этого обычно приходилось использовать вспомогательные утилиты для объединения нескольких объектов в один, который передавать в `computed`. Однако, с помощью [оператора распространения объектов](https://github.com/sebmarkbage/ecmascript-rest-spread) (предложение находится в статусе stage-4 ECMAScript) можно значительно упростить синтаксис:
102+
Обратите внимание, `mapState` возвращает объект. Как же его использовать в сочетании с другими локальными вычисляемыми свойствами? Для этого обычно приходилось использовать вспомогательные утилиты для объединения нескольких объектов в один, который передавать в `computed`. Однако, с помощью [оператора распространения объектов](https://github.com/tc39/proposal-object-rest-spread) можно значительно упростить синтаксис:
103103

104104
```js
105105
computed: {

Diff for: docs/zh/guide/mutations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ mutations: {
8888

8989
- 使用 `Vue.set(obj, 'newProp', 123)`, 或者
9090

91-
- 以新对象替换老对象。例如,利用 stage-3 的[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)我们可以这样写:
91+
- 以新对象替换老对象。例如,利用[对象展开运算符](https://github.com/tc39/proposal-object-rest-spread)我们可以这样写:
9292

9393
``` js
9494
state.obj = { ...state.obj, newProp: 123 }

Diff for: docs/zh/guide/state.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ computed: mapState([
9797

9898
### 对象展开运算符
9999

100-
`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)(现处于 ECMAScript 提案 stage-4 阶段),我们可以极大地简化写法:
100+
`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/tc39/proposal-object-rest-spread),我们可以极大地简化写法:
101101

102102
``` js
103103
computed: {

0 commit comments

Comments
 (0)