From 257f0c1d02ade45f0557b51d8d4479cfd2fb4697 Mon Sep 17 00:00:00 2001
From: lion414 <84086945+lion414@users.noreply.github.com>
Date: Sat, 8 Apr 2023 19:55:08 +0800
Subject: [PATCH] docs(zh): update composing-stores.md (#2094)
---
packages/docs/cookbook/composing-stores.md | 3 ++-
packages/docs/zh/cookbook/composing-stores.md | 3 ++-
packages/docs/zh/core-concepts/actions.md | 2 +-
packages/docs/zh/core-concepts/index.md | 12 ++++++------
.../docs/zh/core-concepts/outside-component-usage.md | 6 +++---
packages/docs/zh/core-concepts/plugins.md | 2 +-
packages/docs/zh/core-concepts/state.md | 2 +-
7 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/packages/docs/cookbook/composing-stores.md b/packages/docs/cookbook/composing-stores.md
index fd3e7eca..c745f36d 100644
--- a/packages/docs/cookbook/composing-stores.md
+++ b/packages/docs/cookbook/composing-stores.md
@@ -51,9 +51,10 @@ import { useUserStore } from './user'
export const useCartStore = defineStore('cart', () => {
const user = useUserStore()
+ const list = ref([])
const summary = computed(() => {
- return `Hi ${user.name}, you have ${state.list.length} items in your cart. It costs ${state.price}.`
+ return `Hi ${user.name}, you have ${list.value.length} items in your cart. It costs ${price.value}.`
})
function purchase() {
diff --git a/packages/docs/zh/cookbook/composing-stores.md b/packages/docs/zh/cookbook/composing-stores.md
index c051c811..9b8a8def 100644
--- a/packages/docs/zh/cookbook/composing-stores.md
+++ b/packages/docs/zh/cookbook/composing-stores.md
@@ -51,9 +51,10 @@ import { useUserStore } from './user'
export const useCartStore = defineStore('cart', () => {
const user = useUserStore()
+ const list = ref([])
const summary = computed(() => {
- return `Hi ${user.name}, you have ${state.list.length} items in your cart. It costs ${state.price}.`
+ return `Hi ${user.name}, you have ${list.value.length} items in your cart. It costs ${price.value}.`
})
function purchase() {
diff --git a/packages/docs/zh/core-concepts/actions.md b/packages/docs/zh/core-concepts/actions.md
index e521dd64..220f5f55 100644
--- a/packages/docs/zh/core-concepts/actions.md
+++ b/packages/docs/zh/core-concepts/actions.md
@@ -208,7 +208,7 @@ unsubscribe()
```vue
```
diff --git a/packages/docs/zh/core-concepts/index.md b/packages/docs/zh/core-concepts/index.md
index 52907709..1e5340e7 100644
--- a/packages/docs/zh/core-concepts/index.md
+++ b/packages/docs/zh/core-concepts/index.md
@@ -77,7 +77,7 @@ Setup store æ¯ [Option Store](#option-stores) 带æ¥äºæ´å¤ççµæ´»æ§ï¼å
```vue
```
@@ -93,8 +93,8 @@ const store = useCounterStore()
```vue
```
--
2.47.2