From: lion414 <84086945+lion414@users.noreply.github.com> Date: Sat, 8 Apr 2023 11:55:08 +0000 (+0800) Subject: docs(zh): update composing-stores.md (#2094) X-Git-Tag: @pinia/nuxt@0.4.9~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=257f0c1d02ade45f0557b51d8d4479cfd2fb4697;p=thirdparty%2Fvuejs%2Fpinia.git docs(zh): update composing-stores.md (#2094) --- 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 ```