From: Caichong <951412526@qq.com> Date: Tue, 2 Apr 2024 13:37:13 +0000 (+0800) Subject: chore: add getter double in playground demo-counter (#2625) X-Git-Tag: @pinia/nuxt@0.5.2-beta.0~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6a8129410d28833b037d2161f930829da5fa5e8;p=thirdparty%2Fvuejs%2Fpinia.git chore: add getter double in playground demo-counter (#2625) --- diff --git a/packages/playground/src/stores/demo-counter.ts b/packages/playground/src/stores/demo-counter.ts index a2a39a6e..4db6edea 100644 --- a/packages/playground/src/stores/demo-counter.ts +++ b/packages/playground/src/stores/demo-counter.ts @@ -8,6 +8,9 @@ export const useCounter = defineStore('demo-counter', { state: () => ({ n: 0, }), + getters: { + double: (state) => state.n * 2, + }, }) if (import.meta.hot) {