File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ export class BridgeRpc {
52
52
const _payload = parse ( payload )
53
53
options . inspectorId === _payload . inspectorId && cb ( {
54
54
state : _payload . state ,
55
+ getters : _payload . getters ,
55
56
} as T )
56
57
} )
57
58
} ,
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ const app = useAppStore()
16
16
<p >
17
17
Pinia State Count: {{ app.count }}
18
18
</p >
19
+ <p >
20
+ Pinia Getter DoubledCount: {{ app.doubledCount }}
21
+ </p >
19
22
<button @click =" app.increment" >
20
23
Increment Count (Pinia)
21
24
</button >
Original file line number Diff line number Diff line change 1
1
import { defineStore } from 'pinia'
2
- import { ref } from 'vue'
2
+ import { computed , ref } from 'vue'
3
3
4
4
export const useAppStore = defineStore ( 'app' , ( ) => {
5
5
const count = ref ( 120 )
6
6
function increment ( ) {
7
7
count . value ++
8
8
}
9
+ const doubledCount = computed ( ( ) => count . value * 2 )
9
10
10
- return { count, increment }
11
+ return { count, doubledCount , increment }
11
12
} )
12
13
13
14
export const useCounterStore = defineStore ( 'counter' , ( ) => {
You can’t perform that action at this time.
0 commit comments