File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ A more practical example of real-world actions would be an action to checkout a
76
76
77
77
``` js
78
78
actions: {
79
- checkout ({ commit, state }, payload ) {
79
+ checkout ({ commit, state }, products ) {
80
80
// save the items currently in the cart
81
81
const savedCartItems = [... state .cart .added ]
82
82
// send out checkout request, and optimistically
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ Un exemple plus pratique d'une application du monde réel serait une action pour
76
76
77
77
``` js
78
78
actions: {
79
- checkout ({ commit, state }, payload ) {
79
+ checkout ({ commit, state }, products ) {
80
80
// sauvegarder les articles actuellement dans le panier
81
81
const savedCartItems = [... state .cart .added ]
82
82
// envoyer la requête de checkout, et vider le panier
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ store.dispatch({
76
76
77
77
``` js
78
78
actions: {
79
- checkout ({ commit, state }, payload ) {
79
+ checkout ({ commit, state }, products ) {
80
80
// сохраним находящиеся на данный момент в корзине товары
81
81
const savedCartItems = [... state .cart .added ]
82
82
// инициируем запрос и "оптимистично" очистим корзину
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ store.dispatch({
76
76
77
77
``` js
78
78
actions: {
79
- checkout ({ commit, state }, payload ) {
79
+ checkout ({ commit, state }, products ) {
80
80
// 把当前购物车的物品备份起来
81
81
const savedCartItems = [... state .cart .added ]
82
82
// 发出结账请求,然后乐观地清空购物车
You can’t perform that action at this time.
0 commit comments