Skip to content

Commit 5737f07

Browse files
committed
chore: playground
1 parent 8d6cf79 commit 5737f07

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/nuxt/playground/pages/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ if (import.meta.server) {
1515

1616
<template>
1717
<div>
18-
<p>Count: {{ counter.$state.count }}</p>
18+
<p>Count: {{ counter.count }} x 2 = {{ counter.double }}</p>
1919
<button @click="counter.increment()">+</button>
20+
<pre>{{ counter.$state }}</pre>
2021
</div>
2122
</template>

packages/nuxt/playground/stores/counter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ export const useCounter = defineStore('counter', {
1717
},
1818
},
1919
getters: {
20-
getCount: (state) => state.count,
20+
double: (state) => state.count * 2,
2121
},
2222
})

0 commit comments

Comments
 (0)