Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 12 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { ref, computed } from 'vue' |
||
2 | import { defineStore } from 'pinia' |
||
3 | |||
4 | export const useCounterStore = defineStore('counter', () => { |
||
5 | const count = ref(0) |
||
6 | const doubleCount = computed(() => count.value * 2) |
||
7 | function increment() { |
||
|
|||
8 | count.value++ |
||
9 | } |
||
10 | |||
11 | return { count, doubleCount, increment } |
||
12 | }) |
||
13 |