]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: Update index.md (#2742)
authorlightnoway <lightnoway@qq.com>
Fri, 16 Aug 2024 09:06:42 +0000 (17:06 +0800)
committerGitHub <noreply@github.com>
Fri, 16 Aug 2024 09:06:42 +0000 (11:06 +0200)
code of zh is outdate to en

packages/docs/zh/core-concepts/index.md

index fdf7a0a23cf4f04ac0b1b820230c40bb15b1bfd6..5aa1519afbf0a0f6d2932b25ddb94d9de2393a8f 100644 (file)
@@ -34,9 +34,9 @@ export const useAlertsStore = defineStore('alerts', {
 
 ```js {2-10}
 export const useCounterStore = defineStore('counter', {
-  state: () => ({ count: 0 }),
+  state: () => ({ count: 0, name: 'Eduardo' }),
   getters: {
-    double: (state) => state.count * 2,
+    doubleCount: (state) => state.count * 2,
   },
   actions: {
     increment() {